diff options
author | He Junyan <junyan.he@hotmail.com> | 2020-05-13 18:02:07 +0800 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-06-05 09:51:19 +0000 |
commit | 85bc355019e716d74f6a0d973a0d446b382990f8 (patch) | |
tree | 7599acabec2b53b71dfb977c82d472aba70b6889 /gst-libs | |
parent | 5f92699a4b6057deeaf1d824e6c8363de3832a88 (diff) |
libs: decoder: H265: Add SCC_MAIN_444_10 profile support.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/311>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_h265.c | 6 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiprofile.c | 5 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiprofile.h | 2 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils.c | 3 | ||||
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapiutils_h265.c | 12 |
5 files changed, 27 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c index 015c870e..024d7142 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_h265.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_h265.c @@ -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; diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.c b/gst-libs/gst/vaapi/gstvaapiprofile.c index 9a06a5e0..e7bdea00 100644 --- a/gst-libs/gst/vaapi/gstvaapiprofile.c +++ b/gst-libs/gst/vaapi/gstvaapiprofile.c @@ -135,6 +135,11 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = { {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"}, {GST_VAAPI_PROFILE_VP9_1, VAProfileVP9Profile1, diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.h b/gst-libs/gst/vaapi/gstvaapiprofile.h index affba42b..3d2e42ea 100644 --- a/gst-libs/gst/vaapi/gstvaapiprofile.h +++ b/gst-libs/gst/vaapi/gstvaapiprofile.h @@ -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), diff --git a/gst-libs/gst/vaapi/gstvaapiutils.c b/gst-libs/gst/vaapi/gstvaapiutils.c index 9c5c12d8..1f228e37 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils.c +++ b/gst-libs/gst/vaapi/gstvaapiutils.c @@ -242,6 +242,9 @@ string_of_VAProfile (VAProfile profile) MAP (HEVCSccMain10); MAP (HEVCSccMain444); #endif +#if VA_CHECK_VERSION(1,8,0) + MAP (HEVCSccMain444_10); +#endif MAP (HEVCMain); MAP (HEVCMain10); MAP (VC1Simple); diff --git a/gst-libs/gst/vaapi/gstvaapiutils_h265.c b/gst-libs/gst/vaapi/gstvaapiutils_h265.c index c0dd8384..7f6c7437 100644 --- a/gst-libs/gst/vaapi/gstvaapiutils_h265.c +++ b/gst-libs/gst/vaapi/gstvaapiutils_h265.c @@ -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"); |