libs: util: H265: recognize the SCC profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/311>
This commit is contained in:
He Junyan 2020-05-13 15:00:53 +08:00 committed by GStreamer Merge Bot
parent 9067d902e2
commit 1d9b2cab42

View file

@ -242,6 +242,44 @@ gst_vaapi_utils_h265_get_profile (GstH265SPS * sps)
profile = GST_VAAPI_PROFILE_H265_MAIN_422_10;
break;
}
case GST_H265_PROFILE_IDC_SCREEN_CONTENT_CODING:
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 == 1
&& sps->profile_tier_level.max_422chroma_constraint_flag == 1
&& sps->profile_tier_level.max_420chroma_constraint_flag == 1
&& 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;
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 == 1
&& sps->profile_tier_level.max_420chroma_constraint_flag == 1
&& 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_10;
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 == 1
&& 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;
break;
}
default:
GST_DEBUG ("unsupported profile_idc value");
profile = GST_VAAPI_PROFILE_UNKNOWN;