On Fri, 2014-03-21 at 01:15 -0600, Xiang, Haihao wrote:
> On Fri, 2014-03-21 at 14:31 +0800, [email protected] wrote:
> > From: Alex wu <[email protected]>
> >
> > ---
> > src/i965_drv_video.c | 22 ++++++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> > index 2fe18eb..2f00964 100755
> > --- a/src/i965_drv_video.c
> > +++ b/src/i965_drv_video.c
> > @@ -145,6 +145,8 @@ i965_image_formats_map[I965_MAX_IMAGE_FORMATS + 1] = {
> > { VA_FOURCC('Y','U','Y','2'), VA_LSB_FIRST, 16, } },
> > { I965_SURFACETYPE_YUV,
> > { VA_FOURCC('U','Y','V','Y'), VA_LSB_FIRST, 16, } },
> > + { I965_SURFACETYPE_YUV,
> > + { VA_FOURCC('4','2','2','H'), VA_LSB_FIRST, 16, } },
> > { I965_SURFACETYPE_RGBA,
> > { VA_FOURCC('R','G','B','X'), VA_LSB_FIRST, 32, 24, 0x000000ff,
> > 0x0000ff00, 0x00ff0000 } },
> > { I965_SURFACETYPE_RGBA,
> > @@ -2709,6 +2711,16 @@ i965_CreateImage(VADriverContextP ctx,
> > image->offsets[2] = size + size2;
> > image->data_size = size + 2 * size2;
> > break;
> > + case VA_FOURCC('4','2','2','H'):
> > + image->num_planes = 3;
> > + image->pitches[0] = width;
> > + image->offsets[0] = 0;
> > + image->pitches[1] = width2;
>
> Where is the definition of width2 ?
It seems that the patch is not based on the latest staging branch(Maybe
the old code uses the definition of width2).
It will be better that the patch is updated based on the latest staging
branch.
>
> > + image->offsets[1] = size;
> > + image->pitches[2] = width2;
> > + image->offsets[2] = size + width2 * height;
> > + image->data_size = 2 * size;
>
> Should take garbage data into account when calculating
> image->offset[xxx] and image->data_size.
>
>
> > + break;
> > case VA_FOURCC('N','V','1','2'):
> > image->num_planes = 2;
> > image->pitches[0] = width;
> > @@ -3096,6 +3108,16 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
> > image->offsets[2] = w_pitch * obj_surface->y_cb_offset;
> > break;
> >
> > + case VA_FOURCC('4', '2', '2', 'H'):
> > + image->num_planes = 3;
> > + image->pitches[0] = w_pitch; /* Y */
> > + image->offsets[0] = 0;
> > + image->pitches[1] = obj_surface->cb_cr_pitch; /* U */
> > + image->offsets[1] = w_pitch * obj_surface->y_cb_offset;
> > + image->pitches[2] = obj_surface->cb_cr_pitch; /* V */
> > + image->offsets[2] = w_pitch * obj_surface->y_cr_offset;
> > + break;
> > +
> > case VA_FOURCC('N', 'V', '1', '2'):
> > image->num_planes = 2;
> > image->pitches[0] = w_pitch; /* Y */
>
>
> _______________________________________________
> Libva mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/libva
_______________________________________________
Libva mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libva