As previously eluded to, there are a few more important subroutines of the mp3 encoder. Due to the grueling details provided for the psycho-acoustic model, I will treat these subroutines more topically. We can see the adaptive segmentation MDCT in Figure 5 as well as the full mp3 compression diagram in Figure 6.
Figure 5
The MDCT, or modified discrete cosine transform, further breaks down the input signal in a frequency sense. In this case and at a sampling rate of Fs = 44100, the input signal is further broken down to 41.67 Hz/harm. As previously stated, the MDCT takes inputs from the subband analysis bank as well as the psycho-acoustic model. The psycho-acoustic model tells the MDCT whether there
are transients in the system so the encoder can begin the switch to short block transforms. The short block is 1/3 the size of the long block size of 18. The switch to short blocks is not instantaneous. We can see this in Figure 7 which shows the ASM machine of the window switching process.
Figure 6
The normal type is the long block and the start and stop type are the transition blocks to and from the short block. The notated attack decision is the perceptual entropy calculation as previously discussed.
Figure 6 also depicts four other important blocks contained within the Iteration Loops block. The scale factors block applies scalefactors to MDCT critical bands hence the term scalefactor bands. The scalefactor bands enable the input to use the full range of the quantizer.
Figure 7
The quantizer is a non-linear 3/4 power compander which adds some additional noise shaping capability. The Noiseless coding block is the application of variable length Huffman codes in order to exploit non-uniform pdf's of the input signal. Controlling these three blocks is the Rate/Distortion control block which basically adjusts the scalefactor bands and the bits allocated to each band so that the noise is below the masking threshold while maintaining a tolerable bit rate. It should be noted that this block uses a bit reservoir so that adjacent granules can share bits if need be.