From bb1aa92eb9ee7e713d997d5786129e88219e166a Mon Sep 17 00:00:00 2001 From: Stanislaw Gruszka Date: Tue, 29 Oct 2024 12:25:00 +0100 Subject: libcamera: software_isp: Initialize exposure+gain before agc calculations On my setup, since commit fb8ad13d ("libcamera: software_isp: Move exposure+gain to an algorithm module"), at start camera output stays very dark for dozen of seconds, and then later slowly gets to normal. This is because existing sensor exposure+gain settings are not used at start. We save initial values in frameContext but in the agc algorithm we use IPA context. Fix the problem by using in frameContext sensor values, since we already use those in blc algorithm and change exposure type to int32_t to unnecessary castings. Signed-off-by: Stanislaw Gruszka Reviewed-by: Milan Zamazal Tested-by: Robert Mader Tested-by: Kieran Bingham Reviewed-by: Kieran Bingham Signed-off-by: Kieran Bingham --- src/ipa/simple/algorithms/blc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ipa/simple/algorithms/blc.h') diff --git a/src/ipa/simple/algorithms/blc.h b/src/ipa/simple/algorithms/blc.h index 2cf2a877..67c688ae 100644 --- a/src/ipa/simple/algorithms/blc.h +++ b/src/ipa/simple/algorithms/blc.h @@ -27,7 +27,7 @@ public: ControlList &metadata) override; private: - uint32_t exposure_; + int32_t exposure_; double gain_; }; -- cgit v1.2.1