[MPlayer-dev-eng] YV12 For Cinepak

Arpi arpi at thot.banki.hu
Sat Mar 2 20:14:40 CET 2002


Hi,

> 	Since this is the first time I've written a YV12 decoder, let me
> see if I have the basics straight: A YV12 output buffer will have
>   (width * height * 1.5) bytes
> allocated to it. And I can count on
>   sh_video->image->type=MP_IMGTYPE_STATIC;
> to allocate that space for me. The output buffer will consist of (width
> * height) bytes for luminance values, followed by (width * height) / 4
> bytes for the v plane, followed by (width * height) / 4 bytes for the u
> plane. Do I have all that straight?

yes, some codecs does this.
but PLEASE don't do this. tis is very bad and limits our abilities.
mp_image_t* allocates teh buffers for you, and it has 3 pointers for Y, U, V
and it has 3 stride values for Y, U and V. use them.
otherwise we won't be able to do direct rendering, clip/extend and other
filtering :(

at least let caller to pass mp_image_t* pointer instead of image pointer and
stride, and use this struct.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list