[MPlayer-dev-eng] How do the YUV planes work?
Mike Melanson
melanson at pcisys.net
Sun Dec 16 19:18:42 CET 2001
Hi team,
Okay, so I've implemented some video decoders that output packed
RGB data. Now I want to move on to decoders that output planar YUV
data. This is what I know so far:
When I initialize an RGB decoder, I malloc (width * height *
bytes_per_pixel) for sh_video->our_out_buffer. When I decode video, the
pixel data goes in that buffer, left-to-right, top-to-bottom. Also, the
decoder sets blit_frame=3. When I get into planar YUV, I have to deal with
variables that specify planes and strides, right? Do they somehow specify
offsets into sh_video->our_out_buffer? I also have to set blit_frame=2,
right?
I guess what I need to know is, how do I set up the buffers for
YV12 data? How do I allocate sh_video->our_out_buffer, how do I set up
planes and strides, and where do I output the Y, U, and V planes?
Thanks...
--
-Mike Melanson
More information about the MPlayer-dev-eng
mailing list