Digital Signal Processing Reference
In-Depth Information
These tables give encoding for both individual values,
and values plus a given number of zeros. Following the prop-
erties of Huffman coding, the tables are constructed so that
the most statistically common input values are coded using
the fewest number of bits. The Huffman symbols are
then concatenated into a bit stream that forms the compressed
image file. The use of variable length coding makes recovery
difficult if any data corruption occurs. Therefore, special
symbols or markers are inserted periodically to allow
the decoder to resynchronize if there are bit errors in the
JPEG file.
The JPEG standard specifies the details of the entropy
encoding followed by Huffman coding: it is quite detailed and is
not included in this text. For non-baseline JPEG, alternate coding
schemes may be used.
For those planning to implement a JPEG encoder or decoder,
the following topic is recommended: JPEG Digital Image
Compression Standard, by William Pennebaker and Joan
Mitchell.
We have described the various steps in JPEG encoding. The
Baseline JPEG process can be summarized by the following
encode and decode steps, as shown in Figure 13.2 .
Image
Compressed Image
If RGB, convert to YCrCb
Entropy/Huffman Decode
4:2:2 or 4:2:0
DC predict decode
Subtract 128 from pixel
values
Dequantize AC, DC coefficients
Forward DCT Transform
Inverse DCT Transform
Quantize AC, DC coefficients
Add 128 to pixel values
DC prediction
Convert to desired image format
Entropy/Huffman Coding
Restored Image
Compressed Image
Figure 13.2. JPEG encode and decode steps.
Search WWH ::




Custom Search