mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 03:31:05 +00:00
alphacombine: add support for I420_10LE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4071>
This commit is contained in:
parent
ec2330a796
commit
2f629b435b
2 changed files with 12 additions and 8 deletions
|
@ -5508,17 +5508,17 @@
|
|||
"long-name": "Alpha Combiner",
|
||||
"pad-templates": {
|
||||
"alpha": {
|
||||
"caps": "video/x-raw:\n format: { GRAY8, I420, NV12 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||
"caps": "video/x-raw:\n format: { GRAY8, I420, I420_10LE, NV12 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||
"direction": "sink",
|
||||
"presence": "always"
|
||||
},
|
||||
"sink": {
|
||||
"caps": "video/x-raw:\n format: { I420, NV12 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||
"caps": "video/x-raw:\n format: { I420, I420_10LE, NV12 }\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: { A420, AV12 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||
"caps": "video/x-raw:\n format: { A420, A420_10LE, AV12 }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n",
|
||||
"direction": "src",
|
||||
"presence": "always"
|
||||
}
|
||||
|
|
|
@ -47,9 +47,9 @@
|
|||
#include "gstalphacombine.h"
|
||||
|
||||
|
||||
#define SUPPORTED_SINK_FORMATS "{ I420, NV12 }"
|
||||
#define SUPPORTED_ALPHA_FORMATS "{ GRAY8, I420, NV12 }"
|
||||
#define SUPPORTED_SRC_FORMATS "{ A420, AV12 }"
|
||||
#define SUPPORTED_SINK_FORMATS "{ I420, I420_10LE, NV12 }"
|
||||
#define SUPPORTED_ALPHA_FORMATS "{ GRAY8, I420, I420_10LE, NV12 }"
|
||||
#define SUPPORTED_SRC_FORMATS "{ A420, A420_10LE, AV12 }"
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
struct {
|
||||
|
@ -81,6 +81,10 @@ struct {
|
|||
.sink = GST_VIDEO_FORMAT_NV12,
|
||||
.alpha = GST_VIDEO_FORMAT_I420,
|
||||
.src = GST_VIDEO_FORMAT_AV12
|
||||
},{
|
||||
.sink = GST_VIDEO_FORMAT_I420_10LE,
|
||||
.alpha = GST_VIDEO_FORMAT_I420_10LE,
|
||||
.src = GST_VIDEO_FORMAT_A420_10LE
|
||||
},
|
||||
};
|
||||
/* *INDENT-ON* */
|
||||
|
@ -215,7 +219,7 @@ gst_alpha_combine_negotiate (GstAlphaCombine * self)
|
|||
|
||||
if (GST_VIDEO_INFO_COLORIMETRY (&self->sink_vinfo).range !=
|
||||
GST_VIDEO_INFO_COLORIMETRY (&self->alpha_vinfo).range) {
|
||||
GST_ELEMENT_ERROR (self, STREAM, FORMAT, ("Color range miss-match"),
|
||||
GST_ELEMENT_ERROR (self, STREAM, FORMAT, ("Color range mismatch"),
|
||||
("We can only combine buffers if they have the same color range."));
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -401,7 +405,7 @@ gst_alpha_combine_set_sink_format (GstAlphaCombine * self, GstCaps * caps)
|
|||
|
||||
sink_format = GST_VIDEO_INFO_FORMAT (&self->sink_vinfo);
|
||||
|
||||
/* The sink format determin the src format, though we cannot fully validate
|
||||
/* The sink format determines the src format, though we cannot fully validate
|
||||
* the negotiation here, since we don't have the alpha format yet. */
|
||||
for (i = 0; i < G_N_ELEMENTS (format_map); i++) {
|
||||
if (format_map[i].sink == sink_format) {
|
||||
|
|
Loading…
Reference in a new issue