libcamera: software_isp: lut: Make CCM available in debayer params

Provide the CCM calculated in LUT to the debayer params structure for
consumption in the debayer shaders.

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Bryan O'Donoghue
2025-12-11 23:22:42 +00:00
committed by Kieran Bingham
parent 0640f5ac11
commit 3d7ef342b7
3 changed files with 13 additions and 0 deletions
@@ -13,6 +13,8 @@
#include <array> #include <array>
#include <stdint.h> #include <stdint.h>
#include "libcamera/internal/matrix.h"
namespace libcamera { namespace libcamera {
struct DebayerParams { struct DebayerParams {
@@ -49,6 +51,11 @@ struct DebayerParams {
CcmLookupTable greenCcm; CcmLookupTable greenCcm;
CcmLookupTable blueCcm; CcmLookupTable blueCcm;
LookupTable gammaLut; LookupTable gammaLut;
/*
* Per frame corrections as calculated by the IPA
*/
Matrix<float, 3, 3> ccm;
}; };
} /* namespace libcamera */ } /* namespace libcamera */
+1
View File
@@ -133,6 +133,7 @@ void Lut::prepare(IPAContext &context,
auto &red = params->redCcm; auto &red = params->redCcm;
auto &green = params->greenCcm; auto &green = params->greenCcm;
auto &blue = params->blueCcm; auto &blue = params->blueCcm;
params->ccm = ccm;
for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) { for (unsigned int i = 0; i < DebayerParams::kRGBLookupSize; i++) {
red[i].r = ccmValue(i, ccm[0][0]); red[i].r = ccmValue(i, ccm[0][0]);
red[i].g = ccmValue(i, ccm[1][0]); red[i].g = ccmValue(i, ccm[1][0]);
+5
View File
@@ -100,6 +100,11 @@ namespace libcamera {
* \brief Gamma lookup table used with color correction matrix * \brief Gamma lookup table used with color correction matrix
*/ */
/**
* \var DebayerParams::ccm
* \brief Per frame colour correction matrix for GPUISP
*/
/** /**
* \class Debayer * \class Debayer
* \brief Base debayering class * \brief Base debayering class