[Libva] [Libva-intel-driver PATCH 22/27] Advertise the support for HEVC on SKL
Xiang, Haihao
haihao.xiang at intel.com
Wed Nov 19 07:05:37 PST 2014
v2: Only support HEVC Main Profile
v3: Check profile against VAProfileHEVCMain in i965_BeginPicture()
Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
src/i965_device_info.c | 1 +
src/i965_drv_video.c | 27 +++++++++++++++++++++++++++
src/i965_drv_video.h | 1 +
3 files changed, 29 insertions(+)
diff --git a/src/i965_device_info.c b/src/i965_device_info.c
index 9baf56c..0285f5c 100755
--- a/src/i965_device_info.c
+++ b/src/i965_device_info.c
@@ -346,6 +346,7 @@ static struct hw_codec_info skl_hw_codec_info = {
.has_vp8_decoding = 1,
.has_blending = 1,
.has_h264_mvc_encoding = 1,
+ .has_hevc_decoding = 1,
.num_filters = 5,
.filters = {
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 24abae8..034ff20 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -101,6 +101,9 @@
#define HAS_H264_MVC_ENCODING(ctx) ((ctx)->codec_info->has_h264_mvc_encoding && \
(ctx)->intel.has_bsd)
+#define HAS_HEVC_DECODING(ctx) ((ctx)->codec_info->has_hevc_decoding && \
+ (ctx)->intel.has_bsd)
+
static int get_sampling_from_fourcc(unsigned int fourcc);
/* Check whether we are rendering to X11 (VA/X11 or VA/GLX API) */
@@ -462,6 +465,10 @@ i965_QueryConfigProfiles(VADriverContextP ctx,
profile_list[i++] = VAProfileH264StereoHigh;
}
+ if (HAS_HEVC_DECODING(i965)) {
+ profile_list[i++] = VAProfileHEVCMain;
+ }
+
/* If the assert fails then I965_MAX_PROFILES needs to be bigger */
ASSERT_RET(i <= I965_MAX_PROFILES, VA_STATUS_ERROR_OPERATION_FAILED);
*num_profiles = i;
@@ -535,6 +542,14 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx,
if (HAS_VP8_ENCODING(i965))
entrypoint_list[n++] = VAEntrypointEncSlice;
+ break;
+
+ case VAProfileHEVCMain:
+ if (HAS_HEVC_DECODING(i965))
+ entrypoint_list[n++] = VAEntrypointVLD;
+
+ break;
+
default:
break;
}
@@ -623,6 +638,14 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile,
break;
+ case VAProfileHEVCMain:
+ if (HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD))
+ va_status = VA_STATUS_SUCCESS;
+ else
+ va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT;
+
+ break;
+
default:
va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
break;
@@ -2339,6 +2362,10 @@ i965_BeginPicture(VADriverContextP ctx,
vaStatus = VA_STATUS_SUCCESS;
break;
+ case VAProfileHEVCMain:
+ vaStatus = VA_STATUS_SUCCESS;
+ break;
+
default:
ASSERT_RET(0, VA_STATUS_ERROR_UNSUPPORTED_PROFILE);
break;
diff --git a/src/i965_drv_video.h b/src/i965_drv_video.h
index dde9399..cb4e8e8 100644
--- a/src/i965_drv_video.h
+++ b/src/i965_drv_video.h
@@ -369,6 +369,7 @@ struct hw_codec_info
unsigned int has_vp8_decoding:1;
unsigned int has_vp8_encoding:1;
unsigned int has_h264_mvc_encoding:1;
+ unsigned int has_hevc_decoding:1;
unsigned int num_filters;
struct i965_filter filters[VAProcFilterCount];
--
1.9.1
More information about the Libva
mailing list