1 / 20

Lab9 Case Study

Lab9 Case Study. Speaker: Yu-Lin Hsiao Advisor: Prof. Chun-Yao Wang December 1, 2005. Department of Computer Science National Tsing Hua University. Outline. JPEG Baseline Compression Lab requirement & report. JPEG Baseline Compression. Baseline Sequential DCT-based coding

drew-hoover
Download Presentation

Lab9 Case Study

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. Lab9 Case Study Speaker: Yu-Lin Hsiao Advisor: Prof. Chun-Yao Wang December 1, 2005 Department of Computer Science National Tsing Hua University

  2. Outline • JPEG Baseline Compression • Lab requirement & report

  3. JPEG Baseline Compression • Baseline Sequential DCT-based coding - Lossy Compression • Content ﹣RGB → YUV ﹣Sub-sampling ﹣Shift the block ﹣FDCT ﹣Quantize ﹣Zig-Zag Scan ﹣Entropy Coding

  4. JPEG Encoder Overview • Split into 8×8 pixels per block • Use FDCT, Quantizer and Entropy encoder to compress data

  5. RGB → YUV (1) • RGB format ﹣Three data segments per pixel, each segment consists 8 bits. ﹣255, 0, 0 → pure red • YUV format • Y:Luminance • U:Cb, Blue Chrominance • V:Cr, Red Chrominance

  6. RGB → YUV (2) • Y = 0.299 R + 0.578 G + 0.114 B • U = – 0.1687 R – 0.3313 G + 0.5 B + 128 • V = 0.5 R – 0.4187 G – 0.0813 B + 128

  7. Sub-sampling • Discarding of chrominance data • YUV can be sub-sampled as 4:2:2 or 4:1:1 ratio

  8. Shift the block • The block is shifted from 0 ~ 255 to -128 ~ 127 by subtracting 128

  9. DC coefficient FDCT (Forward Discrete Cosine Transform) • Spatial domain → frequency-space

  10. Quantize the block • Formula: (Round to nearest integer) Quantized value (a, b) = DCT (a, b) / Quantization Table value (a, b)

  11. Zig-Zag Scan

  12. Entropy Coding • Entropy Coding : develop "code" words for the input value or " symbols“. • Entropy coding transfer the quantized data to compressed data • Entropy coding is composed of Run Length Coding (RLC) and Variable Length Coding (VLC, Huffman Coding)

  13. AC Run Length Coding • Zero is the value occurs at highest frequency in quantized data

  14. Variable Length Coding (DC Huffman Coding) • DC code word = Category code word + DIFF code word

  15. Variable Length Coding (AC Huffman Coding) • AC code word = Run-Size code word + AC coefficient code word

  16. Outline • JPEG Baseline Compression • Lab requirement & report

  17. Requirement • Try to explain the given DCT content • Implement the JPEG encoder (We will give you fully C or C++ code, you can modify the reference code) • Compare the timing constraint of your own design with the reference code (profiling)

  18. HW/SW Implementation • Partition your design into HW & SW parts and implement it

  19. Report • Source code of your JPEG encoder • Profiling file of your source encoder • Report that describes your idea and result (or differences) • Determine the HW/SW part

  20. Reference • JPEG Baseline Compression • Code Example supplied by NCTU • JPEG Still Image Specification • Lab08:How to design an IP with AMBA standard

More Related