diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-08-28 03:40:25 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-09-01 22:41:01 +0300 |
commit | 251f0534b74bcb46c777aa0df34b1b4142b664f5 (patch) | |
tree | 09da0bd567c7aa01ceb95f24d0a54446faf07a9a /src/qcam/viewfinder_gl.h | |
parent | ee4681b7e8899c50b6d960d3b0b52ffd09c19a22 (diff) |
qcam: viewfinder_gl: Take color space into account for YUV rendering
Update the YUV shaders and the viewfinder_gl to correctly take the
Y'CbCr encoding and the quantization range into account when rendering
YUV formats to RGB. Support for the primaries and transfer function will
be added in a subsequent step.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kunal Agarwal <kunalagarwal1072002@gmail.com>
Diffstat (limited to 'src/qcam/viewfinder_gl.h')
-rw-r--r-- | src/qcam/viewfinder_gl.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qcam/viewfinder_gl.h b/src/qcam/viewfinder_gl.h index 798830a3..68c2912d 100644 --- a/src/qcam/viewfinder_gl.h +++ b/src/qcam/viewfinder_gl.h @@ -57,6 +57,7 @@ protected: private: bool selectFormat(const libcamera::PixelFormat &format); + void selectColorSpace(const libcamera::ColorSpace &colorSpace); void configureTexture(QOpenGLTexture &texture); bool createFragmentShader(); @@ -67,6 +68,7 @@ private: /* Captured image size, format and buffer */ libcamera::FrameBuffer *buffer_; libcamera::PixelFormat format_; + libcamera::ColorSpace colorSpace_; QSize size_; unsigned int stride_; Image *image_; |