A quantizer finds a quantization threshold using a quantization loop with
a heuristic approach. Following the heuristic approach reduces the number
of iterations in the quantization loop required to find an acceptable
quantization threshold, which instantly improves the performance of an
encoder system by eliminating costly compression operations. A heuristic
model relates actual bit-rate of output following compression to
quantization threshold for a block of a particular type of data. The
quantizer determines an initial approximation for the quantization
threshold based upon the heuristic model. The quantizer evaluates actual
bit-rate following compression of output quantized by the initial
approximation. If the actual bit-rate satisfies a criterion such as
proximity to a target bit-rate, the quantizer sets accepts the initial
approximation as the quantization threshold. Otherwise, the quantizer
adjusts the heuristic model and repeats the process with a new
approximation of the quantization threshold. In an illustrative example,
a quantizer finds a uniform, scalar quantization threshold using a
quantization loop with a heuristic model adapted to spectral audio data.
During decoding, a dequantizer applies the quantization threshold to
decompressed output in an inverse quantization operation.