From c4259493dc8db1a78bdbf47b912d24b899c0f45c Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Tue, 22 Jun 2021 16:46:45 +0300 Subject: qcam: viewfinder_gl: Add shader to render packed RAW10 formats The shader supports all 4 packed RAW10 variants. Simple bi-linear Bayer interpolation of nearest pixels is implemented. The 2 LS bits of the 10-bit colour values are dropped as the RGBA format we convert into has only 8 bits per colour. The texture coordinates passed to the fragment shader are adjusted to point to the nearest pixel in the image. This prevents artifacts when the image is scaled from the frame resolution to the window size. Signed-off-by: Andrey Konovalov Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart --- src/qcam/assets/shader/shaders.qrc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qcam/assets/shader/shaders.qrc') diff --git a/src/qcam/assets/shader/shaders.qrc b/src/qcam/assets/shader/shaders.qrc index 8a8f9de1..d76d65c5 100644 --- a/src/qcam/assets/shader/shaders.qrc +++ b/src/qcam/assets/shader/shaders.qrc @@ -5,6 +5,7 @@ YUV_2_planes.frag YUV_3_planes.frag YUV_packed.frag + bayer_1x_packed.frag identity.vert -- cgit v1.2.1