From bcab944bc6e898e209b1e09befb81134c31a0b22 Mon Sep 17 00:00:00 2001 From: Sirisha Muppavarapu Date: Thu, 28 May 2015 08:08:52 -0700 Subject: VP9 HWDec: Added profile and entrypoint for VAProfileVP9Profile0 in the driver v2: don't export VP9 decoding on BXT because VP9 decoding isn't enabled (Peng) Signed-off-by: Sirisha Muppavarapu Signed-off-by: Pengfei Qu Signed-off-by: peng.chen Reviewed-by: Zhao Yakui --- 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 e52e982..7b7bdf6 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 44983da..bdb7512 100644 --- a/src/i965_drv_video.h +++ b/src/i965_drv_video.h @@ -387,6 +387,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]; -- cgit v1.2.3