[Libva] [libva-intel-driver PATCH 04/10] VP9 HWDec: Added profile and entrypoint for VAProfileVP9Profile0 in the driver

Zhao Yakui yakui.zhao at intel.com
Thu Dec 3 16:27:38 PST 2015


On 12/04/2015 02:13 AM, Xiang, Haihao wrote:
> From: Sirisha Muppavarapu<sirisha.muppavarapu at intel.com>
>
> v2: don't export VP9 decoding on BXT because VP9 decoding isn't enabled (Peng)

This looks good to me.

>
> Signed-off-by: Sirisha Muppavarapu<sirisha.muppavarapu at intel.com>
> Signed-off-by: Pengfei Qu<Pengfei.Qu at intel.com>
> Signed-off-by: peng.chen<peng.c.chen at intel.com>
> ---
>   src/i965_drv_video.c | 14 +++++++++++++-
>   src/i965_drv_video.h |  1 +
>   2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
> index 53829e1..476a6f0 100644
> --- a/src/i965_drv_video.c
> +++ b/src/i965_drv_video.c
> @@ -106,6 +106,9 @@
>   #define HAS_HEVC_ENCODING(ctx)          ((ctx)->codec_info->has_hevc_encoding&&  \
>                                            (ctx)->intel.has_bsd)
>
> +#define HAS_VP9_DECODING(ctx)          ((ctx)->codec_info->has_vp9_decoding&&  \
> +                                         (ctx)->intel.has_bsd)
> +
>   #define HAS_HEVC10_DECODING(ctx)        ((ctx)->codec_info->has_hevc10_decoding&&  \
>                                            (ctx)->intel.has_bsd)
>
> @@ -591,6 +594,10 @@ i965_QueryConfigProfiles(VADriverContextP ctx,
>           profile_list[i++] = VAProfileHEVCMain10;
>       }
>
> +    if(HAS_VP9_DECODING(i965)) {
> +        profile_list[i++] = VAProfileVP9Profile0;
> +    }
> +
>       if (i965->wrapper_pdrvctx) {
>           VAProfile wrapper_list[4];
>           int wrapper_num;
> @@ -701,6 +708,9 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
>           break;
>
>       case VAProfileVP9Profile0:
> +        if(HAS_VP9_DECODING(i965))
> +            entrypoint_list[n++] = VAEntrypointVLD;
> +
>           if (i965->wrapper_pdrvctx) {
>               VAStatus va_status = VA_STATUS_SUCCESS;
>               VADriverContextP pdrvctx = i965->wrapper_pdrvctx;
> @@ -820,7 +830,9 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
>           break;
>
>       case VAProfileVP9Profile0:
> -        if (i965->wrapper_pdrvctx)
> +        if ((HAS_VP9_DECODING(i965))&&  (entrypoint == VAEntrypointVLD))
> +            va_status = VA_STATUS_SUCCESS;
> +        else if (i965->wrapper_pdrvctx)
>               va_status = VA_STATUS_SUCCESS;
>           else
>               va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
> diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
> index eb82983..4d6cecf 100644
> --- a/src/i965_drv_video.h
> +++ b/src/i965_drv_video.h
> @@ -388,6 +388,7 @@ struct hw_codec_info
>       unsigned int has_hevc_decoding:1;
>       unsigned int has_hevc_encoding:1;
>       unsigned int has_hevc10_decoding:1;
> +    unsigned int has_vp9_decoding:1;
>
>       unsigned int num_filters;
>       struct i965_filter filters[VAProcFilterCount];



More information about the Libva mailing list