qcam: Fix YUV planar fragment shaders

Commit 251f0534b7 ("qcam: viewfinder_gl: Take color space into account
for YUV rendering") introduced compilation failures in the YUV
semi-planar and planar fragment shaders due to a bad copy & paste. Fix
it.

Fixes: 251f0534b7 ("qcam: viewfinder_gl: Take color space into account for YUV rendering")
Reported-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2022-09-30 19:55:05 +03:00
parent 351abecdb9
commit dbd937e375
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ void main(void)
#error Invalid pattern
#endif
vec3 rgb = yuv2rgb_matrix * (vec3(y, uv) - yuv2rgb_offset);
vec3 rgb = yuv2rgb_matrix * (yuv - yuv2rgb_offset);
gl_FragColor = vec4(rgb, 1.0);
}

View file

@ -30,7 +30,7 @@ void main(void)
yuv.y = texture2D(tex_u, textureOut).r;
yuv.z = texture2D(tex_v, textureOut).r;
vec3 rgb = yuv2rgb_matrix * (vec3(y, uv) - yuv2rgb_offset);
vec3 rgb = yuv2rgb_matrix * (yuv - yuv2rgb_offset);
gl_FragColor = vec4(rgb, 1.0);
}