mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
libs: dec: h265: support decode for main-444 8bit streams.
Add 444 8bit yuv format AYUV, which can be used to decode main-444 8bit streams. Currently, this feature is only supported by media-driver in Icelake. https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/119
This commit is contained in:
parent
b67fc3a518
commit
5d0878b48a
6 changed files with 22 additions and 2 deletions
|
@ -135,6 +135,8 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = {
|
|||
#if VA_CHECK_VERSION(1,2,0)
|
||||
{GST_VAAPI_PROFILE_H265_MAIN_422_10, VAProfileHEVCMain422_10,
|
||||
"video/x-h265", "main-422-10"},
|
||||
{GST_VAAPI_PROFILE_H265_MAIN_444, VAProfileHEVCMain444,
|
||||
"video/x-h265", "main-444"},
|
||||
#endif
|
||||
#if VA_CHECK_VERSION(0,38,0)
|
||||
{GST_VAAPI_PROFILE_VP9_0, VAProfileVP9Profile0,
|
||||
|
@ -336,6 +338,8 @@ gst_vaapi_profile_from_codec_data_h265 (GstBuffer * buffer)
|
|||
return GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE;
|
||||
case 4:
|
||||
return GST_VAAPI_PROFILE_H265_MAIN_422_10;
|
||||
case 5:
|
||||
return GST_VAAPI_PROFILE_H265_MAIN_444;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -178,6 +178,7 @@ typedef enum {
|
|||
GST_VAAPI_PROFILE_H265_MAIN_STILL_PICTURE =
|
||||
GST_VAAPI_MAKE_PROFILE(H265,3),
|
||||
GST_VAAPI_PROFILE_H265_MAIN_422_10 = GST_VAAPI_MAKE_PROFILE(H265,4),
|
||||
GST_VAAPI_PROFILE_H265_MAIN_444 = GST_VAAPI_MAKE_PROFILE(H265,5),
|
||||
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),
|
||||
|
|
|
@ -230,6 +230,7 @@ string_of_VAProfile (VAProfile profile)
|
|||
#endif
|
||||
#if VA_CHECK_VERSION(1,2,0)
|
||||
MAP (HEVCMain422_10);
|
||||
MAP (HEVCMain444);
|
||||
#endif
|
||||
#if VA_CHECK_VERSION(0,37,1)
|
||||
MAP (HEVCMain);
|
||||
|
|
|
@ -161,6 +161,17 @@ gst_vaapi_utils_h265_get_profile (GstH265SPS * sps)
|
|||
&& sps->profile_tier_level.lower_bit_rate_constraint_flag == 1) {
|
||||
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 == 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_MAIN_444;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
GST_DEBUG ("unsupported profile_idc value");
|
||||
|
@ -189,6 +200,9 @@ gst_vaapi_utils_h265_get_profile_idc (GstVaapiProfile profile)
|
|||
case GST_VAAPI_PROFILE_H265_MAIN_422_10:
|
||||
profile_idc = GST_H265_PROFILE_MAIN_422_10;
|
||||
break;
|
||||
case GST_VAAPI_PROFILE_H265_MAIN_444:
|
||||
profile_idc = GST_H265_PROFILE_MAIN_444;
|
||||
break;
|
||||
default:
|
||||
GST_DEBUG ("unsupported GstVaapiProfile value");
|
||||
profile_idc = 0;
|
||||
|
|
|
@ -87,7 +87,7 @@ static const char gst_vaapidecode_src_caps_str[] =
|
|||
#if (USE_GLX || USE_EGL)
|
||||
GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS ";"
|
||||
#endif
|
||||
GST_VIDEO_CAPS_MAKE("{ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE }") ";"
|
||||
GST_VIDEO_CAPS_MAKE("{ NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV }") ";"
|
||||
GST_VAAPI_MAKE_DMABUF_CAPS;
|
||||
|
||||
static GstStaticPadTemplate gst_vaapidecode_src_factory =
|
||||
|
|
|
@ -105,7 +105,7 @@ gst_vaapi_caps_feature_contains (const GstCaps * caps,
|
|||
|
||||
#define GST_VAAPI_MAKE_SURFACE_CAPS \
|
||||
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
|
||||
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE }")
|
||||
GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, "{ ENCODED, NV12, I420, YV12, YUY2, UYVY, Y210, P010_10LE, AYUV }")
|
||||
|
||||
#define GST_VAAPI_MAKE_GLTEXUPLOAD_CAPS \
|
||||
GST_VIDEO_CAPS_MAKE_WITH_FEATURES( \
|
||||
|
|
Loading…
Reference in a new issue