Hi All
I just wanted to confirm my understanding of the JPEG encoding method using Huffman code:
1. Matrix converted into a 1D sequency with a zigzag pattern.
2. The DC coefficient is encoded with DPCM (DC element of all blocks is relative to the 1st by difference).
3. A header is created for the DC coefficient by looking up the table for Huffman code for the DC coefficient's size, followed by its amplitude.
4. The AC coefficients are encoded by forming a pair consisting of (Run-length, size), where run-length is number of proceeding zeros and size is the bits it takes to represent the amplitude. The pair is looked up in Huffman tables and added as a header to their amplitude.
So, its safe to conclude that the Huffman table for DC and AC coefficients is constant.
Is this ok?