Commit 1d9b2cab authored by He Junyan's avatar He Junyan Committed by GStreamer Merge Bot

libs: util: H265: recognize the SCC profiles.

Part-of: <gstreamer/gstreamer-vaapi!311>
parent 9067d902
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment