From c6a6b75358379110a5d1b2e1e24253ab1629bc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 4 Nov 2024 10:37:14 +0200 Subject: [PATCH] avcodecmap: Add support for M101 Matrox uncompressed SD video codec Part-of: --- .../gst-libav/docs/gst_plugins_cache.json | 89 +++++++++++++++++++ .../gst-libav/ext/libav/gstavcodecmap.c | 6 ++ 2 files changed, 95 insertions(+) diff --git a/subprojects/gst-libav/docs/gst_plugins_cache.json b/subprojects/gst-libav/docs/gst_plugins_cache.json index b214fdcdd8..86d3ec6aee 100644 --- a/subprojects/gst-libav/docs/gst_plugins_cache.json +++ b/subprojects/gst-libav/docs/gst_plugins_cache.json @@ -5623,6 +5623,95 @@ }, "rank": "marginal" }, + "avdec_m101": { + "author": "Wim Taymans , Ronald Bultje , Edward Hervey ", + "description": "libav m101 decoder", + "hierarchy": [ + "avdec_m101", + "GstFFMpegVidDec", + "GstVideoDecoder", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "klass": "Codec/Decoder/Video", + "pad-templates": { + "sink": { + "caps": "video/x-m101:\n", + "direction": "sink", + "presence": "always" + }, + "src": { + "caps": "video/x-raw:\n format: { I420, YUY2, RGB, BGR, Y42B, Y444, YUV9, Y41B, GRAY8, RGB8P, I420, Y42B, Y444, UYVY, NV12, NV21, ARGB, RGBA, ABGR, BGRA, GRAY16_BE, GRAY16_LE, A420, RGB16, RGB15, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, GBRA, xRGB, RGBx, xBGR, BGRx, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GBR_12BE, GBR_12LE, P010_10LE, GBRA_12BE, GBRA_12LE, GBRA_10BE, GBRA_10LE, VUYA, P012_LE, Y212_LE, Y410, Y412_LE }\n\nvideo/x-raw(format:Interlaced):\n format: { I420, YUY2, RGB, BGR, Y42B, Y444, YUV9, Y41B, GRAY8, RGB8P, I420, Y42B, Y444, UYVY, NV12, NV21, ARGB, RGBA, ABGR, BGRA, GRAY16_BE, GRAY16_LE, A420, RGB16, RGB15, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, GBRA, xRGB, RGBx, xBGR, BGRx, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GBR_12BE, GBR_12LE, P010_10LE, GBRA_12BE, GBRA_12LE, GBRA_10BE, GBRA_10LE, VUYA, P012_LE, Y212_LE, Y410, Y412_LE }\n interlace-mode: alternate\n", + "direction": "src", + "presence": "always" + } + }, + "properties": { + "debug-mv": { + "blurb": "Whether to print motion vectors on top of the image (deprecated, non-functional)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "direct-rendering": { + "blurb": "Enable direct rendering", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "lowres": { + "blurb": "At which resolution to decode images", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "full (0)", + "mutable": "null", + "readable": true, + "type": "GstLibAVVidDecLowres", + "writable": true + }, + "output-corrupt": { + "blurb": "Whether libav should output frames even if corrupted", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "skip-frame": { + "blurb": "Which types of frames to skip during decoding", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "default (0)", + "mutable": "null", + "readable": true, + "type": "GstLibAVVidDecSkipFrame", + "writable": true + } + }, + "rank": "marginal" + }, "avdec_mace3": { "author": "Wim Taymans , Ronald Bultje , Edward Hervey ", "description": "libav mace3 decoder", diff --git a/subprojects/gst-libav/ext/libav/gstavcodecmap.c b/subprojects/gst-libav/ext/libav/gstavcodecmap.c index 867c87a5f1..35bf8ab044 100644 --- a/subprojects/gst-libav/ext/libav/gstavcodecmap.c +++ b/subprojects/gst-libav/ext/libav/gstavcodecmap.c @@ -1184,6 +1184,7 @@ gst_ffmpeg_codecid_is_known (enum AVCodecID codec_id) case AV_CODEC_ID_APTX: case AV_CODEC_ID_APTX_HD: case AV_CODEC_ID_AV1: + case AV_CODEC_ID_M101: return TRUE; default: return FALSE; @@ -2820,6 +2821,11 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id, g_value_unset (&arr); } break; + case AV_CODEC_ID_M101: + caps = + gst_ff_vid_caps_new (context, NULL, codec_id, encode, "video/x-m101", + NULL); + break; default: GST_DEBUG ("Unknown codec ID %d, please add mapping here", codec_id); break;