From: Olivier CrĂȘte Date: Tue, 22 Sep 2020 19:42:37 +0000 (-0400) Subject: nvdec: Accept progressive-high and contrained-high profiles X-Git-Tag: 1.19.3~507^2~1035 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e53da209380e0b05543668e357ebf12f307ed2f8;p=platform%2Fupstream%2Fgstreamer.git nvdec: Accept progressive-high and contrained-high profiles They're subsets of the high profiles with no interlacing and no B-frames for constrained Part-of: --- diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index 24790d1..3eb0e08 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -209909,7 +209909,7 @@ "long-name": "NVDEC h264 Video Decoder", "pad-templates": { "sink": { - "caps": "video/x-h264:\n stream-format: byte-stream\n alignment: au\n profile: { (string)constrained-baseline, (string)baseline, (string)main, (string)high }\n width: [ 48, 4096 ]\n height: [ 16, 4096 ]\n", + "caps": "video/x-h264:\n stream-format: byte-stream\n alignment: au\n profile: { (string)constrained-baseline, (string)baseline, (string)main, (string)high, (string)constrained-high, (string)progressive-high }\n width: [ 48, 4096 ]\n height: [ 16, 4096 ]\n", "direction": "sink", "presence": "always" }, @@ -210062,7 +210062,7 @@ "long-name": "NVDEC H.264 Stateless Decoder", "pad-templates": { "sink": { - "caps": "video/x-h264:\n stream-format: { (string)avc, (string)avc3, (string)byte-stream }\n alignment: au\n profile: { (string)high, (string)main, (string)constrained-baseline, (string)baseline }\n framerate: [ 0/1, 2147483647/1 ]\n width: [ 48, 4096 ]\n height: [ 16, 4096 ]\n", + "caps": "video/x-h264:\n stream-format: { (string)avc, (string)avc3, (string)byte-stream }\n alignment: au\n profile: { (string)high, (string)main, (string)constrained-high, (string)constrained-baseline, (string)baseline }\n framerate: [ 0/1, 2147483647/1 ]\n width: [ 48, 4096 ]\n height: [ 16, 4096 ]\n", "direction": "sink", "presence": "always" }, diff --git a/sys/nvcodec/gstnvdecoder.c b/sys/nvcodec/gstnvdecoder.c index e8ad2b0..38bf7a7 100644 --- a/sys/nvcodec/gstnvdecoder.c +++ b/sys/nvcodec/gstnvdecoder.c @@ -842,6 +842,12 @@ gst_nv_decoder_get_supported_codec_profiles (GValue * profiles, g_value_set_static_string (&val, "high"); gst_value_list_append_value (profiles, &val); + + g_value_set_static_string (&val, "constrained-high"); + gst_value_list_append_value (profiles, &val); + + g_value_set_static_string (&val, "progressive-high"); + gst_value_list_append_value (profiles, &val); } /* NVDEC supports only 4:2:0 8bits h264 decoding. @@ -850,6 +856,9 @@ gst_nv_decoder_get_supported_codec_profiles (GValue * profiles, GST_NV_DECODER_FORMAT_FLAG_420_10BITS) { g_value_set_static_string (&val, "high-10"); gst_value_list_append_value (profiles, &val); + + g_value_set_static_string (&val, "progressive-high-10"); + gst_value_list_append_value (profiles, &val); } if ((flags & GST_NV_DECODER_FORMAT_FLAG_420_12BITS) == @@ -953,7 +962,7 @@ const GstNvdecoderCodecMap codec_map_list[] = { {cudaVideoCodec_H264, "h264", "video/x-h264, stream-format = (string) byte-stream" ", alignment = (string) au" - ", profile = (string) { constrained-baseline, baseline, main, high }"}, + ", profile = (string) { constrained-baseline, baseline, main, high, constrained-high, progressive-high }"}, {cudaVideoCodec_JPEG, "jpeg", "image/jpeg"}, #if 0 /* FIXME: need verification */ diff --git a/sys/nvcodec/gstnvh264dec.c b/sys/nvcodec/gstnvh264dec.c index 95501f8..8c33cd7 100644 --- a/sys/nvcodec/gstnvh264dec.c +++ b/sys/nvcodec/gstnvh264dec.c @@ -845,7 +845,7 @@ gst_nv_h264_dec_register (GstPlugin * plugin, guint device_id, guint rank, cdata->sink_caps = gst_caps_from_string ("video/x-h264, " "stream-format= (string) { avc, avc3, byte-stream }, " "alignment= (string) au, " - "profile = (string) { high, main, constrained-baseline, baseline }, " + "profile = (string) { high, main, constrained-high, constrained-baseline, baseline }, " "framerate = " GST_VIDEO_FPS_RANGE); s = gst_caps_get_structure (sink_caps, 0);