[FFmpeg-devel] DCT Coefficients Debugging

Benjamin Bohlmann bohlmann
Mon Jun 11 08:35:47 CEST 2007

Hello All,

I'm not sure if this question belongs here or on ffmpeg-users. If I  
posted to the wrong list, please give me a hint and I'll repost it to  
the correct list.

I'm trying to extract the DCT coefficent information from a mpeg2  
video frame that was decoded with libavcodec. I understand that when  
I turn FF_DEBUG_DCT_COEFF on, that this information is stored in  
AVFrame->dct_coeff. I read through this list and the source code, but  
couldn't find any information on how the data inside the dct_coeff  
field is organized. The only thing that I found out by reading the  
source, is that for each macroblock 6x64 dct coefficients are written  
into this field. Can I interpret this as four 8x8 blocks of Luminance  
(Y) coefficients followed by one 8x8 block of Cb and one 8x8 block of  
Cr? Is the order of the Y-Blocks "top-left, top-right, bottom-left,  
bottom-right"? If this is true, where can I find the DCT information  
for the remaining Chrominance blocks for 4:2:2 or 4:4:4 coded  

Can anybody tell me if my assumptions are correct or give me the  
information on how the data inside the dct_coeff field is organized?

regards and thank you in advance

Benjamin Bohlmann

More information about the ffmpeg-devel mailing list