Signal encoding method and device and signal decoding method and device
A spectrum encoding method includes selecting an important spectral component in band units for a normalized spectrum and encoding information of the selected important spectral component for a band, based on a number, a position, a magnitude and a sign thereof. A spectrum decoding method includes obtaining from a bitstream, information about an important spectral component for a band of an encoded spectrum and decoding the obtained information of the important spectral component, based on a number, a position, a magnitude and a sign of the important spectral component.
1. A spectrum encoding method for an audio signal, the method comprising:
determining an encoding mode for a band as a first mode or a second mode based on a bit allocation for the band;
when the encoding mode for the band is determined as the first mode, selecting at least one important spectral component among spectral components comprised in the band; and
encoding a number of the selected at least one important spectral component, a position of the selected at least one important spectral component, a magnitude of the selected at least one important spectral component and a sign of the selected at least one important spectral component for the band,
wherein the magnitude of the selected at least one important spectral component is encoded using a first quantization scheme or a second quantization scheme based on signal characteristics including at least one of a length of the band and the bit allocation for the band, the first quantization scheme and the second quantization scheme being different each other, and
wherein when the encoding mode for the band is determined as the second mode, all samples included in the band are encoded to zero.
2. The method of claim 1 further comprising performing scaling on a normalized spectrum based on the bit allocation of the band, wherein the selecting comprises selecting the at least one important spectral component from the scaled spectrum.
3. The method of claim 1 , wherein the first quantization scheme comprises trellis coded quantization which uses an 8-state 4-coset trellis structure with 2 zero levels.
4. A spectrum decoding method for an audio signal, the method comprising:
determining a decoding mode for a band as a first mode or a second mode based on a bit allocation for the band;
when the decoding mode for the band is determined as the first mode, obtaining, from a bitstream of an encoded spectrum, information about at least one important spectral component among spectral components comprised in the band; and
decoding the obtained information about the at least one important spectral component based on a number of the at least one important spectral component, a position of the at least one important spectral component, a magnitude of the at least one important spectral component and a sign of the at least one important spectral component,
wherein the magnitude of the selected at least one important spectral component is decoded using a first quantization scheme or a second quantization scheme based on signal characteristics including at least one of a length of the band and the bit allocation for the band, the first quantization scheme and the second quantization scheme being different each other, and
wherein when the encoding mode for the band is determined as the second mode, all samples included in the band are decoded to zero.
5. The method of claim 4 , wherein the first quantization scheme comprises trellis coded quantization which uses an 8-state 4-coset trellis structure with 2 zero levels.