
Video Compression and Decompression Concepts
A-3
Figure A.1
MPEG Macroblock Structure
Motion vectors dene the displacement of the image in the current
macroblock from its position in the previous picture. P pictures use
motion compensation to exploit temporal redundancy in the video.
When an encoder provides B pictures, it must reorder the picture
sequence so that the decoder operates properly. Because B pictures use
motion compensation based on previously sent I or P pictures, they can
only be decoded after the referenced pictures have been sent.
For a given macroblock, the encoder must choose a coding mode. The
coding mode depends on the picture type, the effectiveness of motion
compensation in the particular region of the picture, and the nature of the
signal within the macroblock. In addition for MPEG-2, the encoder must
code the macroblock as either a eld or frame. After it selects the coding
method, the encoder performs a motion-compensated prediction of the
block contents based on past and/or future reference pictures. The
encoder then produces an error signal by subtracting the prediction from
the actual data in the current macroblock. The error signal is a
macroblock and a discrete cosine transform (DCT) is performed on each
8 x 8 block.
The DCT operation converts an 8 x 8 block of pixel values to an 8 x 8
matrix of horizontal and vertical spatial frequency coefcients. An 8 x 8
block of pixel values can be reconstructed by performing the inverse
discrete cosine transform (IDCT) on the spatial frequency coefcients. In
general, most of the energy is concentrated in the low frequency
coefcients, which are located in the upper left corner of the transformed
matrix. A quantization step achieves compression—where an index
identies the quantization intervals. Because the encoder identies the
interval and not the exact value within the interval, the pixel values of the
block reconstructed by the IDCT have reduced accuracy.
8
88
Y
Cr
Cb
01
23
45