glcolorconvert: improve the YUY2/UYVY->RGBA conversion shader

Don't offset the y-axis.  We only need to offset on the x-axis.

Removes a sawtooth pattern on horizontal and vertical edges.

https://bugzilla.gnome.org/show_bug.cgi?id=755486
This commit is contained in:
Matthew Waters 2015-12-02 22:42:39 +11:00 committed by Tim-Philipp Müller
parent bb7422e91b
commit 953be21a22

View file

@ -324,8 +324,8 @@ static const struct shader_templ templ_YUY2_UYVY_to_RGB =
" dx2 = -dx1;\n"
" dx1 = 0.0;\n"
"}\n"
"uv_texel.rg = texture2D(Ytex, texcoord * tex_scale0 + dx1).r%c;\n"
"uv_texel.ba = texture2D(Ytex, texcoord * tex_scale0 + dx2).r%c;\n"
"uv_texel.rg = texture2D(Ytex, texcoord * tex_scale0 + vec2(dx1, 0.0)).r%c;\n"
"uv_texel.ba = texture2D(Ytex, texcoord * tex_scale0 + vec2(dx2, 0.0)).r%c;\n"
"yuv.yz = uv_texel.%c%c;\n"
"rgba.rgb = yuv_to_rgb (yuv, offset, coeff1, coeff2, coeff3);\n"
"rgba.a = 1.0;\n"