From a3b1539869ae53a6446a1c31bdade6560f91a46b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 6 Sep 2021 23:22:54 +0300 Subject: qcam: viewfinder_gl: Support configurable stride in shaders The RGB and YUV conversion doesn't take the stride into account, neither when creating the textures, nor when sampling them. Fix it by using the stride as the texture width, and multiplying the x coordinate in the vertex shaders by a factor to only sample the active portion of the image. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/qcam/viewfinder_gl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qcam/viewfinder_gl.h') diff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h index 2b2b1e86..37b1ddd0 100644 --- a/src/qcam/viewfinder_gl.h +++ b/src/qcam/viewfinder_gl.h @@ -97,6 +97,7 @@ private: /* Raw Bayer texture parameters */ GLuint textureUniformSize_; + GLuint textureUniformStrideFactor_; GLuint textureUniformBayerFirstRed_; QPointF firstRed_; -- cgit v1.2.1