[Libva] [PATCH][libva-intel-driver] i965_driver_info: add vp9_enc_profiles

Xiang, Haihao haihao.xiang at intel.com
Thu Nov 17 04:51:39 UTC 2016


Applied, thanks

> On 11/17/2016 09:20 AM, Daniel Charles wrote:
> > Not all profiles for vp9 are supported by the encoder and user
> > needs
> > to know about it
> > 
> 
> When user tries to call the 
> vaQueryConfigProfiles/vaQueryConfigEntryPoints, it will export the 
> supported profile by vp9 encoding.
> 
> Of course this patch looks good to me as it adds more restrict check
> for 
> VP9 encoding. This will help to check the wrong parameter passed by
> the 
> user.
> 
> Add: Reviewed-by: Zhao Yakui <yakui.zhao at intel.com>
> 
> Thanks
> 
> > Signed-off-by: Daniel Charles<daniel.charles at intel.com>
> > ---
> >   src/i965_device_info.c | 1 +
> >   src/i965_drv_video.c   | 2 +-
> >   src/i965_drv_video.h   | 5 +++++
> >   3 files changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/i965_device_info.c b/src/i965_device_info.c
> > index 4db6c51..13ac49c 100644help to avoid
> > --- a/src/i965_device_info.c
> > +++ b/src/i965_device_info.c
> > @@ -447,6 +447,7 @@ static struct hw_codec_info kbl_hw_codec_info =
> > {
> >                                 VA_PROFILE_MASK(H264MultiviewHigh))
> > ,
> >       .vp9_dec_profiles = VP9_PROFILE_MASK(0) |
> >                           VP9_PROFILE_MASK(2),
> > +    .vp9_enc_profiles = VP9_PROFILE_MASK(0),
> > 
> >       .h264_dec_chroma_formats = EXTRA_H264_DEC_CHROMA_FORMATS,
> >       .jpeg_dec_chroma_formats = EXTRA_JPEG_DEC_CHROMA_FORMATS,
> > diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> > index e17c295..df4a0c6 100644
> > --- a/src/i965_drv_video.c
> > +++ b/src/i965_drv_video.c
> > @@ -823,7 +823,7 @@ i965_validate_config(VADriverContextP ctx,
> > VAProfile profile,
> >           if ((HAS_VP9_DECODING_PROFILE(i965, profile))&&
> >               (entrypoint == VAEntrypointVLD)) {
> >               va_status = VA_STATUS_SUCCESS;
> > -        } else if ((HAS_VP9_ENCODING(i965))&&
> > +        } else if ((HAS_VP9_ENCODING_PROFILE(i965, profile))&&
> >                      (entrypoint == VAEntrypointEncSlice)) {
> >               va_status = VA_STATUS_SUCCESS;
> >           } else if (profile == VAProfileVP9Profile0&&  i965-
> > >wrapper_pdrvctx) {
> > diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
> > index 5ef6d27..d928d30 100644
> > --- a/src/i965_drv_video.h
> > +++ b/src/i965_drv_video.h
> > @@ -149,6 +149,10 @@
> >   #define HAS_VP9_ENCODING(ctx)          ((ctx)->codec_info-
> > >has_vp9_encoding&&  \
> >                                            (ctx)->intel.has_bsd)
> > 
> > +#define HAS_VP9_ENCODING_PROFILE(ctx,
> > profile)                     \
> > +    (HAS_VP9_ENCODING(ctx)&&                                      
> >  \
> > +     ((ctx)->codec_info->vp9_enc_profiles&  (1U<<  (profile -
> > VAProfileVP9Profile0))))
> > +
> >   struct i965_surface
> >   {
> >       struct object_base *base;
> > @@ -452,6 +456,7 @@ struct hw_codec_info
> > 
> >       unsigned int h264_mvc_dec_profiles;
> >       unsigned int vp9_dec_profiles;
> > +    unsigned int vp9_enc_profiles;
> > 
> >       unsigned int h264_dec_chroma_formats;
> >       unsigned int jpeg_dec_chroma_formats;
> 
> _______________________________________________
> Libva mailing list
> Libva at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libva


More information about the Libva mailing list