interlace: add more formats, esp 10-bit, 12-bit and 16-bit ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2054>
This commit is contained in:
Tim-Philipp Müller 2021-03-03 16:19:39 +00:00
parent 5e8daa1c5c
commit 766bd655fc
2 changed files with 29 additions and 6 deletions

View file

@ -26630,12 +26630,12 @@
"long-name": "Interlace filter",
"pad-templates": {
"sink": {
"caps": "video/x-raw:\n format: { AYUV, YUY2, UYVY, I420, YV12, Y42B, Y444, NV12, NV21 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"caps": "video/x-raw:\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
"direction": "sink",
"presence": "always"
},
"src": {
"caps": "video/x-raw:\n format: { AYUV, YUY2, UYVY, I420, YV12, Y42B, Y444, NV12, NV21 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: { (string)interleaved, (string)mixed }\n\nvideo/x-raw(format:Interlaced):\n format: { AYUV, YUY2, UYVY, I420, YV12, Y42B, Y444, NV12, NV21 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: alternate\n",
"caps": "video/x-raw:\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: { (string)interleaved, (string)mixed }\n\nvideo/x-raw(format:Interlaced):\n format: { AYUV64, Y412_BE, Y412_LE, A444_10BE, A444_10LE, AYUV, VUYA, A422_10BE, A422_10LE, A420_10BE, A420_10LE, A420, Y444_16BE, Y444_16LE, Y444_12BE, Y444_12LE, Y410, Y444_10BE, Y444_10LE, v308, IYU2, Y444, NV24, v216, I422_12BE, I422_12LE, Y212_BE, Y212_LE, UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, P016_BE, P016_LE, I420_12BE, I420_12LE, P012_BE, P012_LE, NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, I420, YV12, NV12, NV21, IYU1, Y41B, YUV9, YVU9 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n interlace-mode: alternate\n",
"direction": "src",
"presence": "always"
}

View file

@ -172,7 +172,32 @@ gst_interlace_pattern_get_type (void)
return interlace_pattern_type;
}
#define VIDEO_FORMATS "{AYUV,YUY2,UYVY,I420,YV12,Y42B,Y444,NV12,NV21}"
/* We can support all planar and packed YUV formats, but not tiled formats.
* We don't advertise RGB formats because interlaced video is usually YUV. */
#define VIDEO_FORMATS \
"{" \
"AYUV64, " /* 16-bit 4:4:4:4 */ \
"Y412_BE, Y412_LE, " /* 12-bit 4:4:4:4 */ \
"A444_10BE,A444_10LE, " /* 10-bit 4:4:4:4 */ \
"AYUV, VUYA, " /* 8-bit 4:4:4:4 */ \
"A422_10BE, A422_10LE, " /* 10-bit 4:4:2:2 */ \
"A420_10BE, A420_10LE, " /* 10-bit 4:4:2:0 */ \
"A420, " /* 8-bit 4:4:2:0 */ \
"Y444_16BE, Y444_16LE, " /* 16-bit 4:4:4 */ \
"Y444_12BE, Y444_12LE, " /* 12-bit 4:4:4 */ \
"Y410, Y444_10BE, Y444_10LE, " /* 10-bit 4:4:4 */ \
"v308, IYU2, Y444, NV24, " /* 8-bit 4:4:4 */ \
"v216, I422_12BE, I422_12LE, " /* 16-bit 4:2:2 */ \
"Y212_BE, Y212_LE, " /* 12-bit 4:2:2 */ \
"UYVP, Y210, NV16_10LE32, v210, I422_10BE, I422_10LE, " /* 10-bit 4:2:2 */ \
"YUY2, UYVY, VYUY, YVYU, Y42B, NV16, NV61, " /* 8-bit 4:2:2 */ \
"P016_BE, P016_LE, " /* 16-bit 4:2:0 */ \
"I420_12BE, I420_12LE, P012_BE, P012_LE, " /* 12-bit 4:2:0 */ \
"NV12_10LE40, NV12_10LE32, I420_10BE, I420_10LE, P010_10BE, P010_10LE, " /* 10-bit 4:2:0 */ \
"I420, YV12, NV12, NV21, " /* 8-bit 4:2:0 */ \
"IYU1, Y41B, " /* 8-bit 4:1:1 */ \
"YUV9, YVU9, " /* 8-bit 4:1:0 */ \
"}"
static GstStaticPadTemplate gst_interlace_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
@ -189,9 +214,7 @@ static GstStaticPadTemplate gst_interlace_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE
("{AYUV,YUY2,UYVY,I420,YV12,Y42B,Y444,NV12,NV21}")
)
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (VIDEO_FORMATS))
);
GType gst_interlace_get_type (void);