summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSirisha Muppavarapu <sirisha.muppavarapu@intel.com>2015-05-28 08:08:52 -0700
committerXiang, Haihao <haihao.xiang@intel.com>2015-12-07 13:31:28 +0800
commite2411ab80186369b88bf908195f15e32707505e6 (patch)
treebbd9afec50bb977d648ca0c7788cb2527a4c6bbb
parent8fadc325d12b86e06aa3deb5a1e5c6298ad4b89a (diff)
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 <sirisha.muppavarapu@intel.com> Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com> Signed-off-by: peng.chen <peng.c.chen@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit bcab944bc6e898e209b1e09befb81134c31a0b22)
-rw-r--r--src/i965_drv_video.c14
-rw-r--r--src/i965_drv_video.h1
2 files changed, 14 insertions, 1 deletions
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];