The entropy encoding stage comprises four steps vectoring differential encoding

The entropy encoding stage comprises four steps

This preview shows page 35 - 37 out of 41 pages.

The entropy encoding stage comprises four steps: vectoring , differential encoding , run-length encoding , and Huffman encoding . Vectoring: The various entropy encoding algorithms operate on a one- dimensional string of values, that is, a vector . The output of the quantization stage is a 2-D matrix of values and apply entropy encoding to the set of values in the form of a single-dimension vector. This operation is known as vectoring. In order to exploit the presence of the large number of zeros in the quantized matrix, a zig-zag scan of the matrix is used as shown in figure Multimedia System 030728.ppt 138 Figure: Vectoring using a zig-zag scan: (a) principle; (b) vector for example Entropy Encoding 1 2 3 4 5 6 7 0 0 1 2 3 4 5 6 7 63 4 3 2 1 0 ----------- AC coefficients in increasing order of frequency DC coefficients 63 12 11 10 9 8 7 6 5 4 3 2 1 0 0 ---------------- 0 0 0 2 2 2 2 3 3 3 7 6 12 (a) (b) Quantized coefficients Multimedia System 030728.ppt 139 Entropy Encoding From the figure, with this type of scan, the DC coefficient and lower-frequency AC coefficients - both horizontal and vertical - are scanned first. All the higher-frequency coefficients are in a sequential order so making this form of representation more suitable for compression. Differential encoding, which is applied to the DC coefficient only, and the second is run-length encoding, which is applied to the remaining values in the vector containing the AC coefficients. Multimedia System 030728.ppt 140 Entropy Encoding Differential Encoding: The first element in each transformed block is the DC coefficient which is a measure of the average color/luminance/chrominance associated with the corresponding 8 x 8 block of pixel values. DC coefficient is the largest coefficient and, because of its importance, its resolution is kept as high as possible during the quantization phase. Because of the small physical area covered by each block, the DC coefficient varies only slowly from one block to the next.
Image of page 35

Subscribe to view the full document.

Multimedia System 030728.ppt 141 Entropy Encoding The first difference value always being encoded relative to zero. The difference values are then encoded in the form (SSS, value) where the SSS field indicates the number of bits needed to encode the value and the value field the actual bits that represent the value. The rules used to encode each value are summarized in next page figure. The number of bits required to encode each value is determined by its magnitude. A positive value is then encoded using the unsigned binary form A negative value by the complement of this. Multimedia System 030728.ppt 142 Figure: Variable-length coding – coding categories Entropy Encoding (a) Difference value Number of bits needed (SSS) Encoded value 0 0 -1,1 1 1= 1 , -1 = 0 -3, -2, 2, 3 2 2 = 10 , -2 = 01 -7..-4, 4..7 3 3 = 11 , -3 = 00 4 = 100 , -4 = 011 5 = 101 , -5 = 010 6 = 110 , -6 = 001 7 = 111 , -7 = 000 8 = 1000 , -8 = 0111 4 -15…-8, 8…15 : : : Multimedia System 030728.ppt 143 Entropy Encoding Example: Determine the encoded version of the following difference values which relate to the encoded coefficients from consecutive DCT blocks: 12, 1, -2, 0, -1 Value SSS Value 12 4 1100 1 1 1 -2 2 01 0 0 -1 1 0 Answer: Multimedia System 030728.ppt 144 Entropy Encoding
Image of page 36
Image of page 37
  • Spring '11
  • PANG

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes