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.4 An 8×8 array of<br />

luma samples from an<br />

image is shown. This 8×8<br />

array is known in JPEG<br />

terminology as a block.<br />

Figure 38.5 DCT tends to<br />

concentrate the power of the<br />

image block into low-frequency<br />

DCT coefficients (those coefficients<br />

in the upper left-hand<br />

corner of the matrix). No information<br />

is lost at this stage. The<br />

DCT is its own inverse, so<br />

performing the DCT on these<br />

transform coefficients would<br />

reconstruct the original samples<br />

(subject only to roundoff error).<br />

If implemented directly according to these equations,<br />

an 8×8 DCT requires 64 multiply operations (and 49<br />

additions) for each of the 64 result coefficients, for<br />

a total of 4096 multiplies, an average of 8 multiplication<br />

operations per pixel. However, the DCT is separable:<br />

an 8×8 DCT can be computed as eight 8×1<br />

horizontal transforms followed by eight 1×8 vertical<br />

transforms. This optimization, combined with other<br />

optimizations comparable to those of the fast Fourier<br />

transform (FFT), greatly reduces computational<br />

complexity: A fully optimized 8×8 DCT requires as few<br />

as 11 multiplies for each 8 samples (or in an IDCT,<br />

transform coefficients).<br />

JPEG encoding example<br />

I will illustrate JPEG encoding by walking through<br />

a numerical example. Figure 38.4 represents an 8×8<br />

array of luma samples from an image, prior to level<br />

shifting:<br />

f =<br />

139 144 149 153 155 155 155 155<br />

144 151 153 156 159 156 156 156<br />

150 155 160 163 158 156 156 156<br />

159 161 162 160 160 159 159 159<br />

159 160 161 162 162 155 155 155<br />

161 161 161 161 160 157 157 157<br />

162 162 161 163 162 157 157 157<br />

162 162 161 161 163 158 158 158<br />

The result of computing the DCT, rounded to integers,<br />

is shown in Figure 38.5:<br />

F<br />

=<br />

1260 -1 -12 -5 2 -2 -3 1<br />

-23 -17 -6 -3 -3 0 0 1<br />

-11 -9 -2 2 0 -1 -1 0<br />

-7 -2 0 1 1 0 0 0<br />

-1 -1 1 2 0 -1 1 1<br />

2 0 2 0 -1 1 1 -1<br />

-1 0 0 -1 0 2 1 -1<br />

-3 2 -4 -2 2 1 -1 0<br />

452 DIGITAL VIDEO AND HDTV ALGORITHMS AND INTERFACES

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

Saved successfully!

Ooh no, something went wrong!