From 2a9b0b34f8cb2295cd41a5340a9d26231dcd3e4b Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Tue, 3 Dec 2024 10:38:13 +0100 Subject: libcamera: software_isp: Actually apply black level from tuning data The black level obtained from the tuning file in software ISP is retrieved in init (because this is the standard algorithm method with access to tuning data) and stored into context. But the context gets reset in configure and the black level is lost and never applied. Let's store the black level from the tuning file into an algorithm instance variable and put it into the context only later in configure. This is similar to what rkisp1 IPA does with the values obtained from the tuning file. Fixes: 41e3d61c745153779ed5a38634d7266bffd60d61 ("libcamera: software_isp: Clear IPA context on configure and stop") Signed-off-by: Milan Zamazal Tested-by: Robert Mader Reviewed-by: Stanislaw Gruszka Signed-off-by: Kieran Bingham --- src/ipa/simple/soft_simple.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ipa/simple/soft_simple.cpp') diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index ba3d5265..e1b6d3af 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -206,8 +206,7 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) (context_.configuration.agc.againMax - context_.configuration.agc.againMin) / 100.0; - if (!context_.configuration.black.level.has_value() && - camHelper_->blackLevel().has_value()) { + if (camHelper_->blackLevel().has_value()) { /* * The black level from camHelper_ is a 16 bit value, software ISP * works with 8 bit pixel values, both regardless of the actual -- cgit v1.2.1