1 / 12

The Baseline JPEG Algorithm

The Baseline JPEG Algorithm. Mei-Chen Yeh 12/04/2009. Background. Joint Photographic Experts Group (JPEG) Joint standards committee of ITU-T and ISO Optimized for still images. Baseline algorithm. Slide credit: Bernd Girod. Transform (1). Level shift—subtract the mean

cathy
Download Presentation

The Baseline JPEG Algorithm

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. The Baseline JPEG Algorithm Mei-Chen Yeh 12/04/2009

  2. Background • Joint Photographic Experts Group (JPEG) • Joint standards committee of ITU-T and ISO • Optimized for still images

  3. Baseline algorithm Slide credit: Bernd Girod

  4. Transform (1) • Level shift—subtract the mean • Subtract 128 from each pixel for a 8-bit image [0, 255] -> [-128, 127] • 8x8 forward DCT • Replicate the last column/row until the size is a multiple of eight An 8x8 block from the Sena image Large values DCT coefficients Small values

  5. Transform (2) • Forward DCT • Inverse DCT

  6. Quantization (1) • Uniform midtread quantization • The quantization step sizes are organized in a table (the quantization table) Reconstruction = ? DCT coefficients

  7. Quantization (2) More quantization errors! DCT coefficients Quantization errors in the DC and lower AC coefficients are more easily detectable than that in the higher AC coefficients.

  8. Coding (1) Coding of the differences of the DC labels • Differential coding of DC coefficient (0,0) • Partition the differences into categories • Ex: DIFF = 6 • First, send Huffman code (100) for the category 3 [-7…-4, 4…7] • Second, send 3 bits to specify the value “6”

  9. Coding (2) • Two special codes • EOF: the end of block • ZRL: used when # of consecutive zero values exceeds 15 • Zig-zag-scan and run-level-coding of AC coefficients • Ex: 0 0 0 0 -14 0 0 +1 0 0 0 … 0 • (4, -14) (2, +1) EOF

  10. Coding (3) 0 0 0 0 -14 0 0 +1 0 0 0 … 0 (4, -14) (2, +1) EOF -14: Category 4 Encode (4, -14) Check codeword for 4/4 Use 4 bits to encode -14 +1: Category 1 Encode (2, +1) Check codeword for 2/1 Use 1 bit to encode +1 EOF (1010)

  11. Put things together… FDCT Quantization DC = 2 Suppose the previous DC is -1, DIFF_DC = 2 – (-1) = 3 3 is in Category 2 (send 011), use 2 bits to specify “3” 5 bits AC = 1, -9, 3, EOF 1 is in Category 1, Z/C = 0/1 (send 00), use 1 bit to specify “1” 3 bits -9 is in Category 4, Z/C = 0/4 (send 1011), use 4 bits to specify “-9” 8 bits 3 is in Category 2, Z/C = 0/2 (send 01), use 2 bit to specify “3” 4 bits EOF (send 1010) 4 bits 24 / 64 = 0.375 bits per pixel

  12. Sinan image coded using JPEG 0.5 bits per pixel 0.25 bits per pixel

More Related