[FFmpeg-devel] DCT coeffs storing order

Michael Niedermayer michaelni at gmx.at
Sun Nov 6 17:15:28 CET 2011

On Sun, Nov 06, 2011 at 12:29:49PM -0200, Germán Milano wrote:
> Hi everyone,
> I was hoping someone could help me with the following questions:
> 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'?
> Also, it seems h->mb_luma_dc stores values for luma and chroma, since it
> depends of the *p* parameter, which refers to the plane. Is this right? If
> yes, in what order are they stored?
> I printed out the info for an "I" macroblock and this is what I obtained
> (all other coefficients that don't appear have a velue of zero):
>  * CBP = 15
>  * h -> mb_luma_dc[0][0] = 2
>  * h -> mb[82] = -320
> I can't get any conclusions out of these values without knowing the answers
> to my previous questions.. Any help will be truly appreciated.

I suggest you force the whole mb to 0 and then set just 1 element to
non zero and look at what happens to the picture. That way you will
see what each coeff does

Also dont forget that there is intra prediction

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111106/837e3969/attachment.asc>

More information about the ffmpeg-devel mailing list