hardware/intel/intel-driver
Revisión | 5848273335f1b226deffb6e78c5368a7d403d526 (tree) |
---|---|
Tiempo | 2014-12-14 01:42:17 |
Autor | Xiang, Haihao <haihao.xiang@inte...> |
Commiter | Xiang, Haihao |
Advertise the support for HEVC on SKL
v2: Only support HEVC Main Profile
v3: Check profile against VAProfileHEVCMain in i965_BeginPicture()
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit f623373aab09ff1477532dd25bd0ffe5bdd5e7e2)
@@ -342,6 +342,7 @@ static struct hw_codec_info skl_hw_codec_info = { | ||
342 | 342 | .has_di_motion_compensated = 1, |
343 | 343 | .has_vp8_decoding = 1, |
344 | 344 | .has_h264_mvc_encoding = 1, |
345 | + .has_hevc_decoding = 1, | |
345 | 346 | |
346 | 347 | .num_filters = 5, |
347 | 348 | .filters = { |
@@ -99,6 +99,9 @@ | ||
99 | 99 | #define HAS_H264_MVC_ENCODING(ctx) ((ctx)->codec_info->has_h264_mvc_encoding && \ |
100 | 100 | (ctx)->intel.has_bsd) |
101 | 101 | |
102 | +#define HAS_HEVC_DECODING(ctx) ((ctx)->codec_info->has_hevc_decoding && \ | |
103 | + (ctx)->intel.has_bsd) | |
104 | + | |
102 | 105 | static int get_sampling_from_fourcc(unsigned int fourcc); |
103 | 106 | |
104 | 107 | /* Check whether we are rendering to X11 (VA/X11 or VA/GLX API) */ |
@@ -460,6 +463,10 @@ i965_QueryConfigProfiles(VADriverContextP ctx, | ||
460 | 463 | profile_list[i++] = VAProfileH264StereoHigh; |
461 | 464 | } |
462 | 465 | |
466 | + if (HAS_HEVC_DECODING(i965)) { | |
467 | + profile_list[i++] = VAProfileHEVCMain; | |
468 | + } | |
469 | + | |
463 | 470 | /* If the assert fails then I965_MAX_PROFILES needs to be bigger */ |
464 | 471 | ASSERT_RET(i <= I965_MAX_PROFILES, VA_STATUS_ERROR_OPERATION_FAILED); |
465 | 472 | *num_profiles = i; |
@@ -533,6 +540,14 @@ i965_QueryConfigEntrypoints(VADriverContextP ctx, | ||
533 | 540 | if (HAS_VP8_ENCODING(i965)) |
534 | 541 | entrypoint_list[n++] = VAEntrypointEncSlice; |
535 | 542 | |
543 | + break; | |
544 | + | |
545 | + case VAProfileHEVCMain: | |
546 | + if (HAS_HEVC_DECODING(i965)) | |
547 | + entrypoint_list[n++] = VAEntrypointVLD; | |
548 | + | |
549 | + break; | |
550 | + | |
536 | 551 | default: |
537 | 552 | break; |
538 | 553 | } |
@@ -621,6 +636,14 @@ i965_validate_config(VADriverContextP ctx, VAProfile profile, | ||
621 | 636 | |
622 | 637 | break; |
623 | 638 | |
639 | + case VAProfileHEVCMain: | |
640 | + if (HAS_HEVC_DECODING(i965) && (entrypoint == VAEntrypointVLD)) | |
641 | + va_status = VA_STATUS_SUCCESS; | |
642 | + else | |
643 | + va_status = VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT; | |
644 | + | |
645 | + break; | |
646 | + | |
624 | 647 | default: |
625 | 648 | va_status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE; |
626 | 649 | break; |
@@ -2294,6 +2317,10 @@ i965_BeginPicture(VADriverContextP ctx, | ||
2294 | 2317 | vaStatus = VA_STATUS_SUCCESS; |
2295 | 2318 | break; |
2296 | 2319 | |
2320 | + case VAProfileHEVCMain: | |
2321 | + vaStatus = VA_STATUS_SUCCESS; | |
2322 | + break; | |
2323 | + | |
2297 | 2324 | default: |
2298 | 2325 | ASSERT_RET(0, VA_STATUS_ERROR_UNSUPPORTED_PROFILE); |
2299 | 2326 | break; |
@@ -368,6 +368,7 @@ struct hw_codec_info | ||
368 | 368 | unsigned int has_vp8_decoding:1; |
369 | 369 | unsigned int has_vp8_encoding:1; |
370 | 370 | unsigned int has_h264_mvc_encoding:1; |
371 | + unsigned int has_hevc_decoding:1; | |
371 | 372 | |
372 | 373 | unsigned int num_filters; |
373 | 374 | struct i965_filter filters[VAProcFilterCount]; |