mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
libs: decoder: H265: Add MAIN_12 profile supporting.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/359>
This commit is contained in:
parent
7d3a19bace
commit
f82850c6d3
6 changed files with 33 additions and 2 deletions
|
@ -532,7 +532,8 @@ is_range_extension_profile (GstVaapiProfile profile)
|
|||
{
|
||||
if (profile == GST_VAAPI_PROFILE_H265_MAIN_422_10
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_444
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_444_10)
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_444_10
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN12)
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -128,6 +128,8 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
|||
"video/x-h265", "main-444"},
|
||||
{GST_VAAPI_PROFILE_H265_MAIN_444_10, VAProfileHEVCMain444_10,
|
||||
"video/x-h265", "main-444-10"},
|
||||
{GST_VAAPI_PROFILE_H265_MAIN12, VAProfileHEVCMain12,
|
||||
"video/x-h265", "main-12"},
|
||||
{GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN, VAProfileHEVCSccMain,
|
||||
"video/x-h265", "screen-extended-main"},
|
||||
{GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_10, VAProfileHEVCSccMain10,
|
||||
|
|
|
@ -189,6 +189,7 @@ typedef enum {
|
|||
GST_VAAPI_MAKE_PROFILE(H265,9),
|
||||
GST_VAAPI_PROFILE_H265_SCREEN_EXTENDED_MAIN_444_10 =
|
||||
GST_VAAPI_MAKE_PROFILE(H265,10),
|
||||
GST_VAAPI_PROFILE_H265_MAIN12 = GST_VAAPI_MAKE_PROFILE(H265,11),
|
||||
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),
|
||||
|
|
|
@ -241,6 +241,27 @@ gst_vaapi_utils_h265_get_profile (GstH265SPS * sps)
|
|||
/* Main 422_10 Intra, recognize it as MAIN_422_10 */
|
||||
profile = GST_VAAPI_PROFILE_H265_MAIN_422_10;
|
||||
break;
|
||||
} else if (sps->profile_tier_level.max_12bit_constraint_flag == 1
|
||||
&& sps->profile_tier_level.max_10bit_constraint_flag == 0
|
||||
&& 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) {
|
||||
profile = GST_VAAPI_PROFILE_H265_MAIN12;
|
||||
break;
|
||||
} else if (sps->profile_tier_level.max_12bit_constraint_flag == 1
|
||||
&& sps->profile_tier_level.max_10bit_constraint_flag == 0
|
||||
&& 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 == 1
|
||||
&& sps->profile_tier_level.one_picture_only_constraint_flag == 0) {
|
||||
/* Main 12 Intra, recognize it as MAIN12 */
|
||||
profile = GST_VAAPI_PROFILE_H265_MAIN12;
|
||||
break;
|
||||
}
|
||||
case GST_H265_PROFILE_IDC_SCREEN_CONTENT_CODING:
|
||||
if (sps->profile_tier_level.max_14bit_constraint_flag == 1
|
||||
|
@ -458,6 +479,8 @@ gst_vaapi_utils_h265_get_chroma_type (guint chroma_format_idc,
|
|||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
|
||||
else if (depth > 8 && depth <= 10)
|
||||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_10BPP;
|
||||
else if (depth > 10 && depth <= 12)
|
||||
chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420_12BPP;
|
||||
break;
|
||||
case 2:
|
||||
if (depth == 8)
|
||||
|
@ -493,6 +516,7 @@ gst_vaapi_utils_h265_get_chroma_format_idc (GstVaapiChromaType chroma_type)
|
|||
break;
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV420:
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV420_12BPP:
|
||||
chroma_format_idc = 1;
|
||||
break;
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV422:
|
||||
|
|
|
@ -445,6 +445,8 @@ gst_vaapi_video_format_from_chroma (guint chroma_type)
|
|||
return GST_VIDEO_FORMAT_NV12;
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV420_10BPP:
|
||||
return GST_VIDEO_FORMAT_P010_10LE;
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV420_12BPP:
|
||||
return GST_VIDEO_FORMAT_P012_LE;
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV444:
|
||||
return GST_VIDEO_FORMAT_VUYA;
|
||||
case GST_VAAPI_CHROMA_TYPE_YUV422_10BPP:
|
||||
|
|
|
@ -1230,7 +1230,8 @@ gst_vaapidecode_ensure_allowed_sinkpad_caps (GstVaapiDecode * decode)
|
|||
|| profile == GST_VAAPI_PROFILE_H265_MAIN10
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_422_10
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_444
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_444_10) {
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN_444_10
|
||||
|| profile == GST_VAAPI_PROFILE_H265_MAIN12) {
|
||||
GValue list_value = G_VALUE_INIT;
|
||||
GValue value = G_VALUE_INIT;
|
||||
gchar *intra_name;
|
||||
|
|
Loading…
Reference in a new issue