[cairo] about glitz yv12 support
David Reveman
davidr at novell.com
Tue Jun 20 08:32:18 PDT 2006
On Tue, 2006-06-20 at 11:17 +0800, ma liang wrote:
> Hello,
> I have 3 questions when I use glitz for a yv12 surface.
> 1. When I use function glitz_glx_find_window_format(), I can't use
> GLITZ_FORMAT_FOURCC_MASK to create FOURCC dformat. Does it important?
No, not important. There are no YUV drawables.
>
> 2. I have created a surface use a GLITZ_FOURCC_YV12 format, is it
> means that the surface is a YV12 surface?
Yes.
>
> 3.If it is a YV12 surface, how can I set my "base[0]: y, base[1]: u,
> base[2]: v "data to the surface to display it?
You want to upload data to the yv12 surface and display it by using
glitz_composite with yv12 surface as source and some drawable as
destination.
To upload data into yv12 surface use glitz_set_pixels with a
glitz_pixel_format_t structure set up correctly to match your data.
scanline_order must be GLITZ_PIXEL_SCANLINE_ORDER_BOTTOM_UP for
efficient loading. If your data is not in bottom-up scanline order, flip
it when doing glitz_composite instead.
-David
More information about the cairo
mailing list