[FFmpeg-devel] DCT coeffs storing order

Germán Milano g.milano87 at gmail.com
Mon Nov 7 18:09:03 CET 2011


Michael:

Thanks again for your help!. The 'I' macroblock DCT coeffs were just
an example, as i'm planning to requantize the B and P macroblocks.

Your reply was really helpful. Thank you very much!
Regards,

Jeremy

On 11/7/11, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Mon, Nov 07, 2011 at 11:36:36AM -0200, Germán Milano wrote:
>> Hi,
>>
>> Thanks again.
>>
>> I think my questions are oriented to FFmpeg implementation mostly. In the
>> question
>>
>> > When DCT coefficients are stored in the h->mb, in which order are they
>> > stored? I mean, do the first 256 correspond to luma, then the following
>> > correspond to one of the chromas, and the final 256 correspond to the
>> > second chroma component?. In case they're stored like i mentioned, which
>> is
>> > the order they appear in the array within each component?, e.g., the 256
>> > luma coeffs are stored in 'raster scan order'?
>>
>> i was just asking how FFmpeg deals with the storing of the coeffs. It's
>> really important that i get this right, because i want to do a
>> requantification (for transRATING purpouses).
>
> i dont think requantizing the coefficients will work well with intra
> prediction. But the layout is quite simple, you can just read it off
> the code. luma is at 0, chroma plane 1 is at 256 and chroma plane 2
> at 512
> each is stored in double zig zag order for 16 blocks and zigzag
> order for 4. The block coeffs are in raster scan order.
>
> [...]
>
>
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> it is not once nor twice but times without number that the same ideas make
> their appearance in the world. -- Aristotle
>


More information about the ffmpeg-devel mailing list