libcamera: software_isp: Track whether CCM is enabled
Applying color correction matrix (CCM) in software ISP is optional due to performance reasons. CCM is applied if and only if `Ccm' algorithm is present in the tuning file. Software ISP debayering is a performance critical piece of code and we do not want to use dynamic conditionals there. Therefore we pass information about CCM application to debayering configuration and let it select the right versions of debayering functions using templates. This is a trick similar to the previously used one for adding or not adding an alpha channel to the output. Debayering gets this information but it ignores it in this patch. Actual processing with CCM is added in the followup patch. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
0c53fe5f2f
commit
ac30686556
@@ -132,7 +132,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
|
||||
debayer_->getStatsFD(),
|
||||
sharedParams_.fd(),
|
||||
sensor->controls(),
|
||||
ipaControls);
|
||||
ipaControls,
|
||||
&ccmEnabled_);
|
||||
if (ret) {
|
||||
LOG(SoftwareIsp, Error) << "IPA init failed";
|
||||
debayer_.reset();
|
||||
@@ -244,7 +245,7 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return debayer_->configure(inputCfg, outputCfgs);
|
||||
return debayer_->configure(inputCfg, outputCfgs, ccmEnabled_);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user