MPEG Video Compression Standard

Recent chapters have dealt with the MPEG-1 system syntax, video syntax, and motion-compensated prediction. All of these are necessary precursors to the pel reconstruction process that actually creates the decoded pictures. To reconstruct the pel values, the coefficients in each block must be dequantized and the inverse DCT (IDCT) taken. Then, for nonintra blocks in P- and B-pictures, the motion-compensated prediction must be added to the results of the IDCT. The pel reconstruction process in MPEG-1 and MPEG-2 is the central topic of this chapter.
The IDCT is not rigidly standardized in MPEG; rather, the standard requires that the IDCT meet certain tolerances. The intent here is to prevent the buildup of excessive differences between encoder and decoder IDCT outputs when a sequence has many P-pictures pictures between each I-picture. The predictions of P-pictures are daisy-chained, and small differences between implementations then accumulate. IDCT mismatch, the term for this effect, is a subtle problem. This chapter presents an analysis of the rather different procedures used in MPEG-1 and MPEG-2 for reducing IDCT mismatch.
Figure 12.1 gives the invQ_intra() function, pseudocode for the dequantization (i.e., inverse quantization) for intra-coded blocks. (A mathematical description of quantization and dequantization is given in Section 3.6.2.) The flowchart corresponding to this procedure is shown in Figure 12.2. The pseudocode converts from zigzag scan order to row-column indexing almost, immediately, whereas the flowchart does that conversion as nearly the last step. Both forms are valid.
Following the pseudocode in Figure...