[Libva] [PATCH][Libva-intel-driver] i965_DeriveImage() support JPEG color formats

Zhao Yakui yakui.zhao at intel.com
Wed Apr 16 17:55:33 PDT 2014


On Wed, 2014-04-16 at 06:23 -0600, Gwenole Beauchesne wrote:
> 2014-04-15 17:48 GMT-07:00 Xiang, Haihao <haihao.xiang at intel.com>:
> > On Tue, 2014-04-15 at 07:27 -0700, Gwenole Beauchesne wrote:
> >> Hi,
> >>
> >> 2014-04-14 1:17 GMT-07:00 Zhong Li <zhong.li at intel.com>:
> >> > Signed-off-by: Zhong Li <zhong.li at intel.com>
> >> > ---
> >> >  src/i965_drv_video.c |    6 ++++++
> >> >  1 file changed, 6 insertions(+)
> >> >
> >> > diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> >> > index cc61ad3..f94d429 100755
> >> > --- a/src/i965_drv_video.c
> >> > +++ b/src/i965_drv_video.c
> >> > @@ -3286,6 +3286,10 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
> >> >
> >> >      case VA_FOURCC_I420:
> >> >      case VA_FOURCC_422H:
> >> > +    case VA_FOURCC_IMC3:
> >> > +    case VA_FOURCC_444P:
> >> > +    case VA_FOURCC_422V:
> >> > +    case VA_FOURCC_411P:
> >> >          image->num_planes = 3;
> >> >          image->pitches[0] = w_pitch; /* Y */
> >> >          image->offsets[0] = 0;
> >>
> >> IMC3 fourcc is totally useless, change that to be I420.
> >
> > IMC3 is required for JPEG decoding and U/V plane + garbage is in full
> > pitch.
> 
> And? IMC3 = I420 with stride for each plane that is the same, and that
> is specified in the VAImage struct. So, what is the point? This needs
> to be changed. That's all an application needs to know. i.e. move up
> VA_FOURCC_IMC3 to the top, make image->fourcc = VA_FOURCC_I420, and
> fall-through in the rest...

The IMC3 and I420 have the similar plane organization(Y/U/V).

Is there any benefit that the I965_deriveImage exports image->fourcc as
the VA_FOURCC_I420 when the surface is VA_FOURCC_IMC3? 

Currently the fourcc of image format for the derived image is the same
as the surface fourcc. 
If we change it, it seems very strange for the IMC3.

Thanks.
     Yakui

> >> >          image->pitches[2] = obj_surface->cb_cr_pitch; /* V */
> >> >          image->offsets[2] = w_pitch * obj_surface->y_cr_offset;
> >> >          break;
> >> > +
> >> >      case VA_FOURCC_YUY2:
> >> >      case VA_FOURCC_UYVY:
> >> > +    case VA_FOURCC_Y800:
> >> >          image->num_planes = 1;
> >> >          image->pitches[0] = obj_surface->width; /* Y, width is aligned already */
> >> >          image->offsets[0] = 0;
> >> > --
> >> > 1.7.9.5
> >> >
> >> > _______________________________________________
> >> > Libva mailing list
> >> > Libva at lists.freedesktop.org
> >> > http://lists.freedesktop.org/mailman/listinfo/libva
> >> _______________________________________________
> >> Libva mailing list
> >> Libva at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/libva
> >
> >
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libva




More information about the Libva mailing list