Image Processing Reference
In-Depth Information
The zigzag scanning yields a single-dimensional array of DCT-coded values with the
higher order and hence the smaller values sorted to one end of the array. At this point, no
data have yet been lost and the DCT process is reversed using the same algorithm as the
encoder. This is why DCT is mathematically so clever, but it isn't necessary to delve into
the proof of that here.
There is a small caveat here with DCT and MPEG-1. Because MPEG-1 does not sup-
port interlacing, this 45-degree zigzag must be modified when interlaced content is being
compressed. This only applies to MPEG-1 but the modification of this zigzag pattern
enhances the preservation of vertical detail. It is useful to know that alternative mapping
techniques for the coefficients will modify the compression behavior like this. Figure 10-19
shows how this traversal is modified for interlace support in MPEG-1. This is sometimes
rather unkindly referred to as the “Yeltsin Walk.”
The compression happens when this list of values is truncated. Any zeros that are
discarded on the end will not make any difference at all. Dropping any values where a
small coefficient is coded will lose some data and the recovered image will not be faithful
to the original. This is where the encoder makes a bit-rate trade-off. Other techniques also
reduce the run length of this sequence of numbers. Discarding more of the pixels to the
right throws away the higher-frequency data.
The very top-left cell is called a DC coefficient. This is an offset value to set the aver-
age color of the macroblock. Everything else is then expressed relative to that value. In
the extreme case, the block could be reduced to just that one value. For a pixel block that
is 8
8 pixels, this is effectively reducing the resolution of the image by a factor of 8:1 in
both the X and Y dimensions or 64:1 by area. Reconstructing a thumbnail image just by
using DC coefficients is a neat shortcut and computationally very inexpensive. It might be
used to show the video playing back as an icon on the desktop, for example.
Figure 10-19 Modified zigzag scanning.
Search WWH ::

Custom Search