From 2b7bca4a149bcb03a487dcb4ebb46c4c17f241ca Mon Sep 17 00:00:00 2001 From: Bryan O'Donoghue Date: Sat, 10 May 2025 06:25:46 +0100 Subject: [PATCH] libcamera: software_isp: debayer_egl: Convert from identity CCM to CCM calculated by SoftIPA Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/debayer_egl.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index 824cd6d3f..b30d21077 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -293,7 +293,7 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, inputConfig_.stride = inputCfg.stride; width_ = inputCfg.size.width; height_ = inputCfg.size.height; - ccmEnabled_ = ccmEnabled = true; + ccmEnabled_ = ccmEnabled; if (outputCfgs.size() != 1) { LOG(Debayer, Error) @@ -511,10 +511,10 @@ void DebayerEGL::debayerGPU(MappedFrameBuffer &in, MappedFrameBuffer &out, Debay // Populate bayer parameters if (ccmEnabled_) { - GLfloat ccm[] = { - 1, 0, 0, - 0, 1, 0, - 0, 0, 1, + GLfloat ccm[9] = { + params.ccm[0][0], params.ccm[0][1], params.ccm[0][2], + params.ccm[1][0], params.ccm[1][1], params.ccm[1][2], + params.ccm[2][0], params.ccm[2][1], params.ccm[2][2], }; glUniformMatrix3fv(ccmUniformDataIn_, 1, GL_FALSE, ccm); } else {