08.01.2013 Views

DigitalVideoAndHDTVAlgorithmsAndInterfaces.pdf

DigitalVideoAndHDTVAlgorithmsAndInterfaces.pdf

DigitalVideoAndHDTVAlgorithmsAndInterfaces.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 38.1 A JPEG 4:2:0<br />

minimum coded unit (MCU)<br />

comprises six 8×8 blocks:<br />

a luma block, a block of C B , and<br />

a block of C R . The six constituent<br />

blocks result from<br />

nonlinear R’G’B’ data being<br />

matrixed to Y’C B C R , then<br />

subsampled according to the<br />

4:2:0 scheme; chroma subsampling<br />

is effectively the first stage<br />

of compression. The blocks are<br />

processed independently.<br />

In MPEG, a macroblock is the area<br />

covered by a 16×16 array of luma<br />

samples. In DV, a macroblock<br />

comprises the Y’, C B , and C R<br />

blocks covered by an 8×8 array<br />

(block) of chroma samples. In<br />

JPEG, an MCU comprises those<br />

blocks covered by the minimumsized<br />

tiling of Y’, C B , and C R blocks.<br />

For 4:2:0 subsampling, all of these<br />

definitions are equivalent; they<br />

differ for 4:1:1 and 4:2:2 (or for<br />

JPEG’s other rarely used patterns).<br />

In desktop graphics, saving JPEG at<br />

high quality may cause R’G’B’ to be<br />

compressed without subsampling.<br />

Quantizer matrices and VLE tables<br />

will be described in the example<br />

starting on page 452.<br />

I use zero-origin array indexing.<br />

Four 8×8 Luma (Y’) blocks<br />

8×8 C B block<br />

8×8 C R block<br />

JPEG blocks and MCUs<br />

An 8×8 array of sample data is known in JPEG terminology<br />

as a block. Prior to JPEG compression of a color<br />

image, normally the nonlinear R’G’B’ data is matrixed<br />

to Y’CBCR , then subsampled 4:2:0. According to the<br />

JPEG standard (and the JFIF standard, to be described),<br />

other color subsampling schemes are possible;<br />

strangely, different subsampling ratios are permitted for<br />

CB and CR . However, only 4:2:0 is widely deployed, and<br />

the remainder of this discussion assumes 4:2:0. Four<br />

8×8 luma blocks, an 8×8 block of CB, and an 8×8<br />

block of CR are known in JPEG terminology as<br />

a minimum coded unit (MCU); this corresponds to<br />

a macroblock in DV or MPEG terminology. The 4:2:0<br />

macroblock arrangement is shown in Figure 38.1 above.<br />

The luma and color difference blocks are processed<br />

independently by JPEG, using virtually the identical<br />

algorithm. The only significant difference is that the<br />

quantizer matrix and the VLE tables used for chroma<br />

blocks are usually different from the quantizer matrix<br />

and VLE tables used for luma blocks.<br />

As I explained in Spatial frequency domain on page 188,<br />

typical images are dominated by power at low spatial<br />

frequencies. In Figure 38.4, on page 452, I present an<br />

example 8×8 array of luma samples from an image. In<br />

Figure 38.2 at the top of the facing page, I show an<br />

8×8 array the spatial frequencies computed from this<br />

luma array through the DCT. The [0, 0] entry (the DC<br />

term), at the upper left-hand corner of that array<br />

448 DIGITAL VIDEO AND HDTV ALGORITHMS AND INTERFACES

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!