| Message ID | 20260114113016.25162-15-mzamazal@redhat.com |
|---|---|
| State | Superseded |
| Headers | show |
| Series |
|
| Related | show |
2026. 01. 14. 12:30 keltezéssel, Milan Zamazal írta: > The default CCM in uncalibrated.yaml is just an identity transformation > and has been enabled by default only to always provide a correction > matrix to GPU ISP. It slows down CPU ISP when CCM is not used. > > Now, when a default correction matrix is always provided to GPU ISP, we > can disable the Ccm algorithm in uncalibrated.yaml again. The check for > ccmEnabled in GPU ISP is no longer needed and it must be removed in > order not to fail when Ccm algorithm is not enabled. ccmEnabled flag is > still needed in CPU ISP where the processing differs based on whether > CCM is present or not. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> > --- Seems fine to me. Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > src/ipa/simple/data/uncalibrated.yaml | 12 ++++++------ > src/libcamera/software_isp/debayer_egl.cpp | 5 +---- > 2 files changed, 7 insertions(+), 10 deletions(-) > > diff --git a/src/ipa/simple/data/uncalibrated.yaml b/src/ipa/simple/data/uncalibrated.yaml > index c6feda36d..fc90ca526 100644 > --- a/src/ipa/simple/data/uncalibrated.yaml > +++ b/src/ipa/simple/data/uncalibrated.yaml > @@ -8,12 +8,12 @@ algorithms: > # Color correction matrices can be defined here. The CCM algorithm > # has a significant performance impact, and should only be enabled > # if tuned. > - - Ccm: > - ccms: > - - ct: 6500 > - ccm: [ 1, 0, 0, > - 0, 1, 0, > - 0, 0, 1] > + # - Ccm: > + # ccms: > + # - ct: 6500 > + # ccm: [ 1, 0, 0, > + # 0, 1, 0, > + # 0, 0, 1] > - Adjust: > - Agc: > ... > diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp > index ddf03ad4b..b3994c29e 100644 > --- a/src/libcamera/software_isp/debayer_egl.cpp > +++ b/src/libcamera/software_isp/debayer_egl.cpp > @@ -288,7 +288,7 @@ unsigned int DebayerEGL::frameSize() > > int DebayerEGL::configure(const StreamConfiguration &inputCfg, > const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs, > - bool ccmEnabled) > + [[maybe_unused]] bool ccmEnabled) > { > if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) > return -EINVAL; > @@ -296,9 +296,6 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, > if (stats_->configure(inputCfg) != 0) > return -EINVAL; > > - if (!ccmEnabled) > - return -EINVAL; > - > const Size &stats_pattern_size = stats_->patternSize(); > if (inputConfig_.patternSize.width != stats_pattern_size.width || > inputConfig_.patternSize.height != stats_pattern_size.height) {
diff --git a/src/ipa/simple/data/uncalibrated.yaml b/src/ipa/simple/data/uncalibrated.yaml index c6feda36d..fc90ca526 100644 --- a/src/ipa/simple/data/uncalibrated.yaml +++ b/src/ipa/simple/data/uncalibrated.yaml @@ -8,12 +8,12 @@ algorithms: # Color correction matrices can be defined here. The CCM algorithm # has a significant performance impact, and should only be enabled # if tuned. - - Ccm: - ccms: - - ct: 6500 - ccm: [ 1, 0, 0, - 0, 1, 0, - 0, 0, 1] + # - Ccm: + # ccms: + # - ct: 6500 + # ccm: [ 1, 0, 0, + # 0, 1, 0, + # 0, 0, 1] - Adjust: - Agc: ... diff --git a/src/libcamera/software_isp/debayer_egl.cpp b/src/libcamera/software_isp/debayer_egl.cpp index ddf03ad4b..b3994c29e 100644 --- a/src/libcamera/software_isp/debayer_egl.cpp +++ b/src/libcamera/software_isp/debayer_egl.cpp @@ -288,7 +288,7 @@ unsigned int DebayerEGL::frameSize() int DebayerEGL::configure(const StreamConfiguration &inputCfg, const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs, - bool ccmEnabled) + [[maybe_unused]] bool ccmEnabled) { if (getInputConfig(inputCfg.pixelFormat, inputConfig_) != 0) return -EINVAL; @@ -296,9 +296,6 @@ int DebayerEGL::configure(const StreamConfiguration &inputCfg, if (stats_->configure(inputCfg) != 0) return -EINVAL; - if (!ccmEnabled) - return -EINVAL; - const Size &stats_pattern_size = stats_->patternSize(); if (inputConfig_.patternSize.width != stats_pattern_size.width || inputConfig_.patternSize.height != stats_pattern_size.height) {
The default CCM in uncalibrated.yaml is just an identity transformation and has been enabled by default only to always provide a correction matrix to GPU ISP. It slows down CPU ISP when CCM is not used. Now, when a default correction matrix is always provided to GPU ISP, we can disable the Ccm algorithm in uncalibrated.yaml again. The check for ccmEnabled in GPU ISP is no longer needed and it must be removed in order not to fail when Ccm algorithm is not enabled. ccmEnabled flag is still needed in CPU ISP where the processing differs based on whether CCM is present or not. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> --- src/ipa/simple/data/uncalibrated.yaml | 12 ++++++------ src/libcamera/software_isp/debayer_egl.cpp | 5 +---- 2 files changed, 7 insertions(+), 10 deletions(-)