
1-4
Introduction
Final Rev F
Copyright 1996 by LSI Logic Corporation. All rights reserved.
compensation in the particular region of the picture, and the nature of the
signal within the block. In addition, for MPEG-2 the encoder must choose
to code the macroblock as either a eld or frame. After it selects the cod-
ing 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 separated
into 8 x 8 blocks (four luminance blocks and two chrominance blocks)
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 dis-
crete cosine transform (IDCT) on the spatial frequency coefcients. In
general, most of the energy is concentrated in the low frequency coef-
cients, 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.
The DCT coefcient in the upper left location (0, 0) of the block repre-
sents the zero horizontal and zero vertical frequencies and is known as
the
DC coefcient. The DC coefcient is proportional to the average pixel
value of the 8 x 8 block, and additional compression is provided through
predictive coding because the difference in the average value of neigh-
boring 8 x 8 blocks tends to be relatively small. The other coefcients
represent one or more nonzero horizontal or nonzero vertical spatial fre-
quencies, and are called
AC coefcients. The quantization level of the
coefcients corresponding to the higher spatial frequencies favors the
creation of an AC coefcient of zero by choosing a quantization step size
such that the human visual system is unlikely to perceive the loss of the
particular spatial frequency, unless the coefcient value lies above the
particular quantization level. The statistical encoding of the expected
runs of consecutive zero-valued coefcients of higher-order coefcients
accounts for some coding gain.
To cluster nonzero coefcients early in the series and to encode as many
zero coefcients as possible following the last nonzero coefcient in the
ordering, the coefcient sequence is specied to be a zigzag ordering.
Zigzag ordering concentrates the highest spatial frequencies at the end