summaryrefslogtreecommitdiff
path: root/src/qcam/viewfinder_gl.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-06 23:22:54 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-09-22 11:21:49 +0300
commita3b1539869ae53a6446a1c31bdade6560f91a46b (patch)
tree72e66a1f4f06583279ce0f9a012f0512946579d2 /src/qcam/viewfinder_gl.h
parent5e1b7a0f6845add01a6d7842ca34f9fbb0712810 (diff)
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 <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/qcam/viewfinder_gl.h')
-rw-r--r--src/qcam/viewfinder_gl.h1
1 files changed, 1 insertions, 0 deletions
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_;