libs: decoder: H265: Add SCC_MAIN_444_10 profile support.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/311>
This commit is contained in:
He Junyan 2020-05-13 18:02:07 +08:00 committed by GStreamer Merge Bot
parent 5f92699a4b
commit 85bc355019
5 changed files with 27 additions and 1 deletions

View file

@ -543,7 +543,11 @@ is_scc_profile (GstVaapiProfile profile)
#if VA_CHECK_VERSION(1,2,0)
if (profile == GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN
|| profile == GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_10
|| profile == GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444)
|| profile == GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444
#if VA_CHECK_VERSION(1,8,0)
|| profile == GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444_10
#endif
)
return TRUE;
#endif
return FALSE;

View file

@ -134,6 +134,11 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
"video/x-h265", "screen-extended-main-10"},
{GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444, VAProfileHEVCSccMain444,
"video/x-h265", "screen-extended-main-444"},
#endif
#if VA_CHECK_VERSION(1,8,0)
{GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444_10,
VAProfileHEVCSccMain444_10,
"video/x-h265", "screen-extended-main-444-10"},
#endif
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
"video/x-vp9", "profile0"},

View file

@ -187,6 +187,8 @@ typedef enum {
GST_VAAPI_MAKE_PROFILE(H265,8),
GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444 =
GST_VAAPI_MAKE_PROFILE(H265,9),
GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444_10 =
GST_VAAPI_MAKE_PROFILE(H265,10),
GST_VAAPI_PROFILE_VP9_0 = GST_VAAPI_MAKE_PROFILE(VP9,1),
GST_VAAPI_PROFILE_VP9_1 = GST_VAAPI_MAKE_PROFILE(VP9,2),
GST_VAAPI_PROFILE_VP9_2 = GST_VAAPI_MAKE_PROFILE(VP9,3),

View file

@ -241,6 +241,9 @@ string_of_VAProfile (VAProfile profile)
MAP (HEVCSccMain);
MAP (HEVCSccMain10);
MAP (HEVCSccMain444);
#endif
#if VA_CHECK_VERSION(1,8,0)
MAP (HEVCSccMain444_10);
#endif
MAP (HEVCMain);
MAP (HEVCMain10);

View file

@ -279,6 +279,18 @@ gst_vaapi_utils_h265_get_profile (GstH265SPS * sps)
&& sps->profile_tier_level.lower_bit_rate_constraint_flag == 1) {
profile = GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444;
break;
} else if (sps->profile_tier_level.max_14bit_constraint_flag == 1
&& sps->profile_tier_level.max_12bit_constraint_flag == 1
&& sps->profile_tier_level.max_10bit_constraint_flag == 1
&& sps->profile_tier_level.max_8bit_constraint_flag == 0
&& sps->profile_tier_level.max_422chroma_constraint_flag == 0
&& sps->profile_tier_level.max_420chroma_constraint_flag == 0
&& sps->profile_tier_level.max_monochrome_constraint_flag == 0
&& sps->profile_tier_level.intra_constraint_flag == 0
&& sps->profile_tier_level.one_picture_only_constraint_flag == 0
&& sps->profile_tier_level.lower_bit_rate_constraint_flag == 1) {
profile = GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444_10;
break;
}
default:
GST_DEBUG ("unsupported profile_idc value");