From 538747907dd38096ec3cdecc7f4ba1da07e2eaa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Fri, 25 Oct 2024 12:36:43 +0200 Subject: [PATCH] vkh264dec: support h264 extended profile Extended is identical to main but allows FMO/ASO features to be used, and prevent using CABAC. Using similar logic to "baseline", assume that if we support main, we can also do extended. This fixes the following fluster vectors, which otherwise would fail when trying to link the parsebin pad. BA3_SVA_C MR6_BT_B MR7_BT_B MR8_BT_B Part-of: --- .../gst-plugins-bad/docs/plugins/gst_plugins_cache.json | 2 +- subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json index b53d4a0395..d986f5ed6e 100644 --- a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json +++ b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json @@ -252567,7 +252567,7 @@ "klass": "Codec/Decoder/Video/Hardware", "pad-templates": { "sink": { - "caps": "video/x-h264:\n profile: { (string)high, (string)main, (string)constrained-baseline, (string)baseline }\n stream-format: { (string)avc, (string)byte-stream }\n alignment: au\n", + "caps": "video/x-h264:\n profile: { (string)high, (string)main, (string)constrained-baseline, (string)baseline, (string)extended }\n stream-format: { (string)avc, (string)byte-stream }\n alignment: au\n", "direction": "sink", "presence": "always" }, diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c index e2671ddeab..04d33e2a75 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c @@ -97,7 +97,7 @@ struct _GstVulkanH264Decoder static GstStaticPadTemplate gst_vulkan_h264dec_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("video/x-h264, " - "profile = { (string) high, (string) main, (string) constrained-baseline, (string) baseline } ," + "profile = { (string) high, (string) main, (string) constrained-baseline, (string) baseline, (string) extended } ," "stream-format = { (string) avc, (string) byte-stream }, " "alignment = (string) au")); @@ -452,6 +452,9 @@ _get_h264_profile (GstH264Profile profile_idc) case GST_H264_PROFILE_BASELINE: return STD_VIDEO_H264_PROFILE_IDC_BASELINE; case GST_H264_PROFILE_MAIN: + /* Similar to baseline and constrained-baseline, extended is the same as + * main if we ignore ASO/FMO features. */ + case GST_H264_PROFILE_EXTENDED: return STD_VIDEO_H264_PROFILE_IDC_MAIN; case GST_H264_PROFILE_HIGH: return STD_VIDEO_H264_PROFILE_IDC_HIGH;