From 714c78ac51e6ea4769f40de40d12555a86ed72cc Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 10 Oct 2023 22:45:30 +1100 Subject: [PATCH] glcolorconvert: add A422/A444 to output switch statement Fixes glcolorconvert writing to A422 or A444 formats. Part-of: --- .../gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c index 07c6386954..4371e403d1 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/gstglcolorconvert.c @@ -2225,12 +2225,14 @@ _RGB_to_YUV (GstGLColorConvert * convert) case GST_VIDEO_FORMAT_A420_12BE: case GST_VIDEO_FORMAT_A420_16LE: case GST_VIDEO_FORMAT_A420_16BE: + case GST_VIDEO_FORMAT_A422: case GST_VIDEO_FORMAT_A422_10LE: case GST_VIDEO_FORMAT_A422_10BE: case GST_VIDEO_FORMAT_A422_12LE: case GST_VIDEO_FORMAT_A422_12BE: case GST_VIDEO_FORMAT_A422_16LE: case GST_VIDEO_FORMAT_A422_16BE: + case GST_VIDEO_FORMAT_A444: case GST_VIDEO_FORMAT_A444_10LE: case GST_VIDEO_FORMAT_A444_10BE: case GST_VIDEO_FORMAT_A444_12LE: @@ -2238,7 +2240,7 @@ _RGB_to_YUV (GstGLColorConvert * convert) case GST_VIDEO_FORMAT_A444_16LE: case GST_VIDEO_FORMAT_A444_16BE: info->templ = &templ_RGB_to_PLANAR_YUV; - if (out_format == GST_VIDEO_FORMAT_A420) { + if (GST_VIDEO_FORMAT_INFO_HAS_ALPHA (out_finfo)) { alpha = "gl_FragData[3] = vec4(yuva.a, 0.0, 0.0, 1.0);\n"; } else { alpha = "";