From ac3068655643a8b2e9a5d002ad6fab104832e1c0 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Wed, 26 Mar 2025 10:08:46 +0100 Subject: 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 Reviewed-by: Laurent Pinchart Signed-off-by: Milan Zamazal Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/simple/algorithms/ccm.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ipa/simple/algorithms') diff --git a/src/ipa/simple/algorithms/ccm.cpp b/src/ipa/simple/algorithms/ccm.cpp index 86e0395c..d5ba928d 100644 --- a/src/ipa/simple/algorithms/ccm.cpp +++ b/src/ipa/simple/algorithms/ccm.cpp @@ -34,6 +34,8 @@ int Ccm::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData return ret; } + context.ccmEnabled = true; + return 0; } -- cgit v1.2.1