@@ -294,7 +294,14 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg,
if (ret < 0)
return ret;
- ret = debayer_->configure(inputCfg, outputCfgs, ccmEnabled_, lscEnabled_);
+ BayerFormat bayerFormat = BayerFormat::fromPixelFormat(inputCfg.pixelFormat);
+ bool runCcm = ccmEnabled_;
+
+ /* A monochrome sensor has no colour channels: skip the CCM. */
+ if (bayerFormat.order == BayerFormat::Order::MONO)
+ runCcm = false;
+
+ ret = debayer_->configure(inputCfg, outputCfgs, runCcm, lscEnabled_);
if (ret < 0)
return ret;
A monochrome sensor has no colour channels, so there is nothing for the colour correction matrix to correct. Skip the CCM in SoftwareIsp::configure() when the input format is monochrome. The CCM and LSC settings are left untouched for Bayer formats: the colour path behaves exactly as before. Signed-off-by: Alain CousiniƩ <alain.cousinie@laposte.net> --- src/libcamera/software_isp/software_isp.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)