[Libva] [PATCH] V3: Add 422H support.

Xiang, Haihao haihao.xiang at intel.com
Sun Mar 23 20:28:35 PDT 2014


No. Please rebase it against the latest branch.

s/VA_FOURCC(x, x, x, x)/VA_FOURCC_xxxx

Thanks
Haihao


> On Sun, 2014-03-23 at 20:45 -0600, Wu, Zhiwen wrote:
> > From: Alex wu <zhiwen.wu at intel.com>
> > 
> > Changes between V3 to V2:
> > 1. Add 422H support into gen8_post_processing.c, according to
> >    yakui's comments.
> > 
> > changes between V2 and V1:
> > 1. Rebase on staging branch.
> > 2. Add 422H support for pp.
> > 3. Reword the commit title.
> 
> LGTM.
> 
> This will be pushed.
> 
> Thanks
>     Yakui
> 
> > ---
> >  src/gen8_post_processing.c |    2 +-
> >  src/i965_drv_video.c       |   13 +++++++++++++
> >  src/i965_post_processing.c |    2 +-
> >  3 files changed, 15 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/gen8_post_processing.c b/src/gen8_post_processing.c
> > index 6f3afe7..2e5b880 100644
> > --- a/src/gen8_post_processing.c
> > +++ b/src/gen8_post_processing.c
> > @@ -566,7 +566,7 @@ gen8_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
> >              height[2] = obj_image->image.height / 2;
> >              pitch[2] = obj_image->image.pitches[V];
> >              offset[2] = obj_image->image.offsets[V];
> > -            if (fourcc == VA_FOURCC('Y', 'V', '1', '6')) {
> > +            if (fourcc == VA_FOURCC('Y', 'V', '1', '6') || fourcc == VA_FOURCC('4', '2', '2', 'H')) {
> >                  width[1] = obj_image->image.width / 2;
> >                  height[1] = obj_image->image.height;
> >                  width[2] = obj_image->image.width / 2;
> > diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> > index 67f93ef..8792660 100755
> > --- a/src/i965_drv_video.c
> > +++ b/src/i965_drv_video.c
> > @@ -159,6 +159,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,
> > @@ -2864,6 +2866,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] = awidth;
> > +        image->offsets[0] = 0;
> > +        image->pitches[1] = awidth / 2;
> > +        image->offsets[1] = size;
> > +        image->pitches[2] = awidth / 2;
> > +        image->offsets[2] = size + (awidth / 2) * aheight;
> > +        image->data_size  = size + 2 * ((awidth / 2) * aheight);
> > +        break;
> >      case VA_FOURCC('N','V','1','2'):
> >          image->num_planes = 2;
> >          image->pitches[0] = awidth;
> > @@ -3271,6 +3283,7 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
> >          break;
> >  
> >      case VA_FOURCC('I', '4', '2', '0'):
> > +    case VA_FOURCC('4', '2', '2', 'H'):
> >          image->num_planes = 3;
> >          image->pitches[0] = w_pitch; /* Y */
> >          image->offsets[0] = 0;
> > diff --git a/src/i965_post_processing.c b/src/i965_post_processing.c
> > index 35bc515..5d8dd90 100755
> > --- a/src/i965_post_processing.c
> > +++ b/src/i965_post_processing.c
> > @@ -1954,7 +1954,7 @@ gen7_pp_set_media_rw_message_surface(VADriverContextP ctx, struct i965_post_proc
> >              height[2] = obj_image->image.height / 2;
> >              pitch[2] = obj_image->image.pitches[V];
> >              offset[2] = obj_image->image.offsets[V];
> > -            if (fourcc == VA_FOURCC('Y', 'V', '1', '6')) {
> > +            if (fourcc == VA_FOURCC('Y', 'V', '1', '6') || fourcc == VA_FOURCC('4', '2', '2', 'H')) {
> >                  width[1] = obj_image->image.width / 2;
> >                  height[1] = obj_image->image.height;
> >                  width[2] = obj_image->image.width / 2;
> 
> 
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva




More information about the Libva mailing list