Should I Huffman Encode a single frame, a colour channel of that frame or an 8x8 macroblock?

StackOverflow https://stackoverflow.com/questions/14457263

  •  17-01-2022
  •  | 
  •  

문제

Further to my question a couple of days ago about the DCT based Video Encoding Process

I have DCT, quantization, zigzag and RLE steps that seem to be outputting sensible values so I now need to know should I run the Huffman Encode over the entire frame, a colour channel of that frame or at the 8x8 macroblock level?

도움이 되었습니까?

해결책

It's tricky to give a definitive answer, because really it depends on your data, and how complex you want your decoder to be.

You probably don't want to use a single huffman encoding for all the different types of data you have in your stream, as the symbols used are different, and appear in different frequencies (i.e. AC components are not the same as DC components, and if you've used a non-RGB colour space, luminance is not the same as chroma). The JPEG method is to use different tables for different items of data, but the data is interleaved in the stream (so it's still parsed sequentially). These tables are not necessarily calculated dynamically for the data, but instead often just use default values.

Beyond that observation, I don't think how you break up or interleave the data will make much difference.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top