Patent ID: 8019601

Claim:
An apparatus for coding audio signals, comprising: a device comprising: a quantizer that quantizes spectrum signals in each subband to produce quantized values; a quantized bit counter that calculates at least a codeword length representing the number of bits of a Huffman codeword corresponding to the quantized values and accumulates the calculated codeword length into a cumulative codeword length; a bit count estimator that calculates a total bit count estimate representing how many bits will be produced as result of quantization, based on the cumulative codeword length and other bit counts related to the quantization; a comparator that determines whether the total bit count estimate falls within a bit count limit; and a parameter updater that updates quantization parameters including a common scale factor and individual scale factors when the total bit count estimate exceeds the bit count limit; wherein: the apparatus executes quantization in first and second stages; in the first stage, the quantizer quantizes every nth subband, where n is greater than 1; in the first stage, the quantized bit counter accumulates codeword lengths corresponding to the quantized values that the quantizer has produced for every nth subband; and in the first stage, the bit count estimator calculates the total bit count estimate by adding up n times the cumulative codeword length and the other bit counts.