Image Compression Standards
Image Compression Standards
Standards
Y’ Cb Cr
• After chroma subsampling
Y’ Cb Cr
CS4185/5185; Semester A, 2009/2010; Leung Image Compression Standards 4
Chroma Subsampling (2)
• Since humans see color with much less spatial resolution
than they see black and white, it makes sense to
“decimate” the chrominance signal.
1594 67 127 2 59 15 55 6
136 6 95 6 10 8 1 1
97 32 103 27 48 4 76 8
43 8 7 8 16 3 14 3
= 42
7 11 2 12 7 94 10
82 3 73 4 23 10 32 3
11 5 47 18 26 16 67 11
88 79 1 37 6 100 2 153 0
1
=
= -48
T
2 2
4
3
1594 67 127 2 59 15 55 6
136 6 95 6 10 8 1 1
97 32 103 27 48 4 76 8
43 8
42 7
82 3
7 8
11
73 4
2
16 3 14 3
12 7 94 10
23 10 32 3
=
11 5 47 18 26 16 67 11
4
79 1 37 6
100 2 153 0
T
0
1
T
| | | | | | | |
5
T
2
| | | | | | | |
T
3
T
0 1 2 3 4 5 6 7
4
| | | | | | | |
| | | | | | | |
T
5
T
6
6
T
7
Smooth block
DCT Quantization
Note that each element in the block is first subtracted by 128 The value 128 is added back to
before taking the 2D DCT. The idea is to make it zero-mean. each element after the 2D IDCT
IDCT
Dequantization
CS4185/5185; Semester A, 2009/2010; Leung Image Compression Standards 18
Example 2: DCT, Quantization, Dequantization, IDCT
Error
Textured block
DCT Quantization
IDCT
Dequantization
DCT DCT
Error Error
Quantization Quantization
Dequantization Dequantization
IDCT IDCT
- + + -
CS4185/5185; Semester A, 2009/2010; Leung Image Compression Standards 20
Coding of DC Coefficients
Huffman coded
CS4185/5185; Semester A, 2009/2010; Leung Image Compression Standards 24
Entropy Coding of DPCM-coded
DC Coefficients (3)
(SIZE,AMPLITUDE): (8,10010110) (3,101) (3,001) (2,11) (4,0111)
SIZE
32 6 -1 -1 0 -1 0 0 0 -1 0 0 1 0 0 0
No need to consider RLC
the DC coefficient
Huffman coded
(0,-1)
(0,1,0)
(00,0)
(0,-1)
(0,1,0)
(00,0)
(1,-1)
(1,1,0)
(1100,0)
(3,-1)
(3,1,0)
(111010,0)
(2,1)
(2,1,1)
(11100,1)
(0,0)
1010
CS4185/5185; Semester A, 2009/2010; Leung Image Compression Standards 32
Entropy Coding of RLC-Coded
AC Coefficients (5)
JPEG Encoder
~ ~ ~
JPEG
bitstream
JPEG Decoder