1 / 37

Case Study ARM Platform-based JPEG Codec HW/SW Co-design

Case Study ARM Platform-based JPEG Codec HW/SW Co-design. Teaching Assistant : Yu-Ju Cho Advisor : Prof. An-Yeu Wu. Outline. Introduction to JPEG Codec Lab ─ Case study Reference. ISO/IEC 10918-1 JPEG. JPEG: J oint P hotographic E xperts G roup

denna
Download Presentation

Case Study ARM Platform-based JPEG Codec HW/SW Co-design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Case StudyARM Platform-based JPEG Codec HW/SW Co-design Teaching Assistant : Yu-Ju Cho Advisor : Prof. An-Yeu Wu

  2. Outline • Introduction to JPEG Codec • Lab ─ Case study • Reference

  3. ISO/IEC 10918-1 JPEG • JPEG: Joint Photographic Experts Group • JPEG voted as international standard in 1994 • JPEG standard has four compression method • Baseline sequential DCT-based coding • Progressive DCT-based coding • Lossless coding method • Sampling and Quantization are not considered at loss-less coding scheme • Hierarchical coding method

  4. T I S O 0 7 3 0 - 9 3 / d 0 0 9 Compression Method Baseline sequential V.S. Progressive DCT-based coding

  5. Block Diagram of JPEG Encoder R G B Y Cb Cr 01001011101… DPCM: Differential Pulse Code Modulation RLC: Run-Length Code

  6. Color Model in Video ─ YCrCb • Y: Luminance • Cb,Cr: Chrominance • YCbCr color model is used in JPEG and MPEG

  7. Color Model in Video ─ YCrCb • CCIR-601 transform formula • Color space transform is loss-less

  8. Chroma Sub-sampling • 4:1:1 and 4:2:0 are mostly used in JPEG and MPEG

  9. Block Diagram of JPEG Encoder R G B Y Cb Cr 01001011101… DPCM: Differential Pulse Code Modulation RLC: Run-Length Code

  10. 2-D DCT (Discrete Cosine Transform) Frequency domain Space domain

  11. Basis Image of 2-D DCT Horizontal Frequency Low High Vertical Frequency High

  12. Frequency Distribution of 2-D DCT By frequency: By direction:

  13. 8 point 1-D DCT Algorithm (1/2) Better for VLSI design implementation!

  14. 8 point 1-D DCT Algorithm (2/2)

  15. Implementation 2-D DCT Example: row-column decomposition • Separable, row-column decomposition X Transport Memory (Y) Z 1D DCT Unit 1D DCT Unit Y=AX Z=YAT

  16. Block Diagram of JPEG Encoder R G B Y Cb Cr 01001011101… DPCM: Differential Pulse Code Modulation RLC: Run-Length Code

  17. Quantization Table for Luminance

  18. Quantization Table for Chrominance

  19. Block Diagram of JPEG Encoder R G B Y Cb Cr 01001011101… DPCM: Differential Pulse Code Modulation RLC: Run-Length Code

  20. Predictive Coding of DC Coefficients • Differential Pulse Code Modulation (DPCM) • To Store the differential value is better than the exact value.

  21. Zig-zag Scan (AC Coefficients)

  22. Run-Length Coding(RLC) DC (R,L) => (0,-3)(0,-2)(0,-1)(0,-2)(0,-1)(2,-1)(EOB)

  23. Huffman Coding for DC and AC Coefficient (R,L) => (0,-3)(0,-2)(0,-1)(0,-2)(0,-1)(2,-1)(EOB) (0,2)(-3),(0,2)(-2),(0,1)(-1),(0,2)(-2),…(0,0) (Run,SSSS/Catagory) Huffman Table

  24. Huffman Coding for DC and AC Coefficient Table for luminance DC coefficient differences Table for luminance AC coefficients (0,2)(3),(0,2)(-2),(0,1)(-1),(0,2)(-2),…(0,0) =>(01) (11) (01) (01) ……(1010)

  25. An Example of Baseline DCT-based Coding For Y, (8*8 pixels *8 bits/pixel = 512 bits) FDCT -128 Q (6)(61),(0,2)(-3), (0,3)(4),(0,1)(-1), (0,3)(-4),(0,2)(2), (1,2)(2),(0,2)(-2), (0,2)(-2),(5,2)(2), (3,1)(1),(6,1)(-1), (2,1)(-1),(4,1)(-1), (7,1)(-1),(0,0) Zig-Zag (1110)(111101)(01)(00)(100) (100)(00)(0)(100)(001)(01) (10)(11011)(10)(01)(01)(01) (01)(11111110111)(10)(111010)(1)(1111011)(0)(11100)(0) (111011)(0)(11111010)(0)(1010) Huffman Run-length total 102 bits Q Table

  26. Block Diagram of JPEG Encoder R G B Y Cb Cr 01001011101… DPCM: Differential Pulse Code Modulation RLC: Run-Length Code

  27. Block Diagram of JPEG Decoder 01001011101…

  28. JPEG Bitstream

  29. Outline • Introduction to JPEG Codec • Lab ─ Case study • Reference

  30. File Structure

  31. Read & Write Address Write_head 0xcc000000 0xcc000004 0xcc000008 0xcc00000c 0xcc000010 0xcc000014 0xcc000018 0xcc00001c Write_head 0xcc000040 0xcc000044 0xcc000048 0xcc00004c 0xcc000050 0xcc000054 0xcc000058 0xcc00005c FDCT IDCT Read_head 0xcc000020 0xcc000024 0xcc000028 0xcc00002c 0xcc000030 0xcc000034 0xcc000038 0xcc00003c Read_head 0xcc000060 0xcc000064 0xcc000068 0xcc00006c 0xcc000070 0xcc000074 0xcc000078 0xcc00007c

  32. Result for SW Simulation Original Encoder Decoder

  33. Result for HW Simulation Original Encoder Decoder

  34. Profiling Result of SW Simulation

  35. Lab ─ Case Study • Goal • Implement the JPEG codec system using ARM platform • Principles • Implement the ARM platform-based JPEG codec HW/SW co-design • Requirement • Analysis the profiling of pure software simulation • Explain how to partition the HW/SW of JPEG codec • Implement the JPEG codec with HW/SW co-design • Discussion • Explain where is the stack and heap ? And who initialize them

  36. Outline • Introduction to JPEG Codec • Lab ─ Case study • Reference

  37. Reference • Wen-Hsiung Chen, C. Harrison Smith, and S. C. Fralick, "A Fast Computational Algorithm for the Discrete Cosine Transform," IEEE Trans. Commun., vol. COM-25, pp. 1004-1009, Sept 1977. • JPEG: Still Image Data Compression Standard by William B. Pennebaker and Joan L. Mitchell, Kluwer Academic Publishers, ISBN: 0442012721

More Related