摘要 |
An encoding method and apparatus relate to the field of communications, and can perform proper allocation of quantization bits on spectral coefficients of an audio signal, so as to improve quality of signal from a decoder. The method comprises: dividing spectral coefficients of a current data frame into subbands, and then acquiring a quantization frequency domain envelop value of each subband; modifying quantization frequency domain envelop values of a first quantity of subbands among the subbands; allocating a quantization bit to each subband according to the modified quantization frequency domain envelop values of the first quantity of subbands; quantizing a spectral coefficient of a subband to which a quantization bit is allocated among the subbands; and writing, into a code stream, the quantized spectral coefficient of the subband to which the quantization bit is allocated. |