[cairo] glitz - YUV - _glitz_pixel_transform_op_t stride

Bill Spitzak spitzak at d2.com
Mon Feb 6 12:55:24 PST 2006


Why not put a pointer to each half-line in the line2 and line3 pointers?
Then it can do offset/2 for these and ignore the stride.

Patrick Pailhes wrote:

> typedef struct _glitz_pixel_transform_op {
>     char                 *line, *line2, *line3;
>     int                  offset;
>     glitz_pixel_format_t *format;
>     glitz_pixel_color_t  *color;
> } glitz_pixel_transform_op_t;
> 
> For YV12, Y is stored in line, V in line2 and U in line3. However, 
> for the IMC2 format, both V and U would be stored in the variable
> line2. Now, I believe that we need an extra a variable in the
> structure glitz_pixel_transform_op_t. This variable would hold the
> stride of the YUV array (i.e. the width of the surface). The stride is
> needed in order to retrieve the U components (see below):



More information about the cairo mailing list