glcolorconvert: fix YUVA<->RGBA conversions

Alpha should not impact the YUV/RGB conversion and should simply be copied
over.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4339

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8765>
This commit is contained in:
Matthew Waters 2025-04-03 13:20:50 +11:00 committed by GStreamer Marge Bot
parent 7d51dc615d
commit 0b611ce703

View File

@ -118,7 +118,13 @@ struct shader_templ
static const char glsl_func_color_matrix[] = \
"vec4 color_matrix_apply (vec4 texel, mat4 colormatrix) {\n" \
" return colormatrix * texel;\n" \
// ignore alpha applying the RGB/YUV color matrix and copy alpha over to
// the output
" float a = texel.a;\n" \
" texel.a = 1.0;\n" \
" vec4 ret = colormatrix * texel;\n" \
" ret.a = a;\n" \
" return ret;\n"
"}\n";
static const char glsl_func_swizzle[] = "vec4 swizzle(vec4 texel, int components[4]) {\n" \