d u p a t o r
Samsung Electronics
8-3
Reference Information
Inner iteration loop (rate loop)
The Huffman code tables assign shorter code words to (more frequent) smaller quantized values. If the number
of bits resulting from the coding operation exceeds the number of bits available to code a given block of data, this
can be corrected by adjusting the global gain to result in a larger quantization step size, leading to smaller
quantized values. This operation is repeated with different quantization step sizes until the resulting bit demand
for Huffman coding is small enough. The loop is called rate loop because it modifies the overall coder rate until it
is small enough.
Outer iteration loop (noise control/distortion loop)
To shape the quantization noise according to the masking threshold, scalefactors are applied to each scalefactor
band. The systems starts with a default factor of 1.0 for each band. If the quantization noise in a given band is
found to exceed the masking threshold (allowed noise) as supplied by the perceptual model, the scalefactor for
this band is adjusted to reduce the quantization noise. Since achieving a smaller quantization noise requires a
larger number of quantization steps and thus a higher bitrate, the rate adjustment loop has to be repeated every
time new scalefactors are used. In other words, the rate loop is nested within the noise control loop. The outer
(noise control) loop is executed until the actual noise (computed from the difference of the original spectral values
minus the quantized spectral values) is below the masking threshold for every scalefactor band (i.e. critical band).