CSE679: JPEG: JPEG Goals JPEG Compression Steps Lab
CSE679: JPEG: JPEG Goals JPEG Compression Steps Lab
CSE679: JPEG: JPEG Goals JPEG Compression Steps Lab
JPEG goals
JPEG compression steps
Lab
JPEG Goals
Picture processing
FDCT
Quantization
Entropy encoding
Differential encoding (belongs to Source encoding)
Run-length encoding
Huffman encoding
Picture Preparation
7 j
Some Observations of Forward DCT
16 24 12 19 12 20 39 51
24 27 8 39 35 34 24 44
40 17 28 32 24 27 8 32
34 20 28 20 12 8 19 34
19 39 12 27 27 12 8 34
8 28 -5 39 34 16 12 19
20 27 8 27 24 19 19 8
Example -After FDCT
20 -34 27 -9 -11 11 14 7
-3 10 8 1 -11 18 18 15
4 -2 -18 8 8 -3 1 -7
9 1 -3 4 -1 -7 -1 -2
0 -8 -2 2 1 4 -6 0
Example - Quantization Table
3 5 7 9 11 13 15 17
5 7 9 11 13 15 17 19
7 9 11 13 15 17 19 21
9 11 13 15 17 19 21 23
11 13 15 17 19 21 23 25
13 15 17 19 21 23 25 27
15 17 19 21 23 25 27 29
17 19 21 23 25 27 29 31
Example - After Quantization
62 -4 2 -1 2 -1 -1 -1
4 -5 3 -1 -1 1 1 0
-2 -3 0 0 -1 0 -1 0
-1 0 1 -1 0 0 0 0
0 1 1 0 -1 1 1 1
0 0 -1 0 0 0 0 0
1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
Example – Other Steps
Zig-zag sequence
62,-4,4,-2,-5,2,-1,3,-3,-1,0,0,0,-1,2,-1,-1,0,1,1,0,1,0,1,-
1,-1,1,-1,-1,1,0,0,0,-1,0,0,0,0,0,-1,0,-
1,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0
Intermediate symbol sequence
(6)(62), (0,3)(-4), (0,3)(4), (0,2)(-2), (0,3)(-5), (0,2)(2),
(0,1)(-1), (0,2)(3), (0,2)(-3), (0,1)(-1), (3,1)(-1),
(0,2)(2),(0,1)(-1), (0,1)(-1), (1,1)(1), (0,1)(1), (1,1)(1),
(1,1)(1), (0,1)(-1), (0,1)(-1), (0,1)(1), (0,1)(-1), (0,1)(-1),
(0,1)(1),(3,1)(-1), (5,1)(-1), (1,1)(-1), (3,1)(1), (6,1)(1),
(1,1)(1), (0,0)
Encoded bit sequence (total 154 bits)
(1110)(111110) (100)(001) (100)(100) (01)(01)
(100)(010) (01)(10) (00)(0) (01)(11) (01)(00) (00)(0)
(111010)(0) (01)(10) (00)(0) (00)(0) (1100)(1) (00)(1)
(1100)(1) (1100)(1) (00)(0) (00)(0) (00)(1) (00)(0) (00)(0)
(00)(1) (111010)(0) (1111010)(0) (1100)(0) (111010)(1)
(1111011)(1) (1100)(1) (1010)
Conclusion
JPEG goals
JPEG compression steps
Picture Preparation
• Component, block, and pixel
Picture Processing
• Forward DCT
Quantization
• Different coefficients are treated separately.
Entropy coding
Lab