Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hardware/Software Codesign Case Study : JPEG Compression.

Similar presentations


Presentation on theme: "Hardware/Software Codesign Case Study : JPEG Compression."— Presentation transcript:

1 Hardware/Software Codesign Case Study : JPEG Compression

2 Abstract What is JPEG JPEG Compress Flow Component of JPEG Compress JPEG Compress in Codesign Conclusion

3 What is JPEG JPEG (Joint Photographic Experts Group) has been working to establish the first international compression standard for continuous-tone still images, both grayscale and color. JPEG standard is on DCT-based method is specified for “lossy’’ compression.

4 JPEG Compress Flow

5 Component of JPEG Compress RGB to YCbCr To change color space from RGB space to YCbCr space. Because, eyes are more sensitive to illumination and less sensitive to saturation. Therefore, it can save storage by keeping more illumination data and less saturation data. Y = 1/256 * ( 65.738*R + 129.057*G + 25.064*B)+ 16 Cb = 1/256 * (-37.945*R - 74.494*G + 112.439*B)+ 128 Cr = 1/256 * (112.439*R - 94.154*G - 18.285*B)+ 128

6 Component of JPEG Compress con’t DCT Each 8x8 block of source image samples is effectively a 64-point discrete signal which is a function of the two spatial dimensions x and y. The DCT takes such a signal as its input and decomposes of the 64 unique two-dimensional "spatial frequencies" which comprise the input signal's "spectrum." The ouput of the DCT is the set of 64 basis-signal amplitudes ( DCT coefficients ) whose values can be regarded as the relative amount of the 2D spatial frequencies contained in the 64-point input signal.

7 Component of JPEG Compress con’t DCT

8 Component of JPEG Compress con’t Quantize Each of the 64 DCT coefficients is uniformly quantized in conjunction with a 64-element Quantization Table, which is specified by the application. The purpose of quantization is to achieve further compression by representing DCT coefficients with no greater precision than is necessary to achieve the desired image quality.

9 Component of JPEG Compress con’t DPCM After Quantization, the DC coefficient is treated separately from the 63 AC coefficients. The DC coefficients is a measure of the average value of the 64 image samples. Because there is usually strong correlation between the DC coefficients of adjacent 8x8 blocks, the quantized DC coefficient is encoded as the difference from the DC term of the previous block in the encoding order, called Differential Pulse Code Modulation ( DPCM ), and the function is as followed : DPCM can usually achieve further compression due to the smaller range of the coefficient values.

10 Component of JPEG Compress con’t Zigzag All of the quantized coefficients are ordered into the "zig-zag" sequence, which helps to facilitate entropy coding by placing low-frequency coefficients before high-frequency coefficients.

11 Component of JPEG Compress con’t Huffman JPEG’s Huffman coding have two step : modeling and coding, it’s purpose that reduce the picture code size. According to the frequency of occurrence, High frequency for short string , Low frequency for long string. *Example Frequency of A 、 B 、 C 、 D are 0.7 、 0.1 、 0.1 、 0.1 Original: 2*0.7 + 2*0.1 + 2*0.1 + 2*0.1 = 2 Huffman: 1*0.7 + 2*0.1 + 3*0.1 + 3*0.1 = 1.5 ABCD Original encode 00011011 Huffman encode 011100101

12 JPEG Compress in Codesign

13 JPEG Compress in Codesign con’t In JPEG compression, we use two design way to implement it, one is only used Software, other is used Hardware/Software. Size (pixel)BMP SizeSWHW/SWJPEG Size 400*300352KB2.30s1.09s11KB 640*480901KB4.70s2.31s18KB 800*6001407KB6.88s3.62s55KB 800*8001876KB9.53s4.80s63KB 1024*7682305KB11.21s5.76s70KB

14 Reference Wallace, G.K., ”The JPEG Still Picture Compression Standard”, IEEE Trans. On Consumer Electronics, vol. 38, pp. 18—34, 1992. Theerayod Wiangton, “The Implementation of JPEG Compression”, 2003 Prof. M. Balakrishnan, “Hardware/Software Codesign Case Study:JPEG Encoder”, Department of Computer Science and EngineeringIndian Institute of Technology, Delhi Http://www.jpeg.org


Download ppt "Hardware/Software Codesign Case Study : JPEG Compression."

Similar presentations


Ads by Google