summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/ipa_context.cpp
diff options
context:
space:
mode:
authorStefan Klug <stefan.klug@ideasonboard.com>2025-04-03 17:49:16 +0200
committerStefan Klug <stefan.klug@ideasonboard.com>2025-05-20 11:16:36 +0200
commitf1ac420eb143db75174c91b3767359466fe59508 (patch)
tree9d9af2c8b67380288d4188e2d0520e005378dc0c /src/ipa/rkisp1/ipa_context.cpp
parent3fcc6b06c354c2a1a1db89d45979f94d30c8f112 (diff)
ipa: rkisp1: ccm/lsc: Fix CCM/LSC based on manual color temperature
In RkISP1Awb::process(), the color temperature in the active state is updated every time new statistics are available. The CCM/LSC algorithms use that value in prepare() to update the CCM/LSC. This is not correct if the color temperature was specified manually and leads to visible flicker even when AwbEnable is set to false. To fix that, track the auto and manual color temperature separately in active state. In Awb::prepare() the current frame context is updated with the corresponding value from active state. Change the algorithms to fetch the color temperature from the frame context instead of the active state in prepare(). Fixes: 02308809548d ("ipa: rkisp1: awb: Implement ColourTemperature control") Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/ipa_context.cpp')
-rw-r--r--src/ipa/rkisp1/ipa_context.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index 25b5bf50..1ee6aeb1 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -197,15 +197,15 @@ namespace libcamera::ipa::rkisp1 {
* \var IPAActiveState::awb::AwbState.gains
* \brief White balance gains
*
+ * \var IPAActiveState::awb::AwbState.temperatureK
+ * \brief Color temperature
+ *
* \var IPAActiveState::awb.manual
* \brief Manual regulation state (set through requests)
*
* \var IPAActiveState::awb.automatic
* \brief Automatic regulation state (computed by the algorithm)
*
- * \var IPAActiveState::awb.temperatureK
- * \brief Estimated color temperature
- *
* \var IPAActiveState::awb.autoEnabled
* \brief Whether the Auto White Balance algorithm is enabled
*/
@@ -349,7 +349,10 @@ namespace libcamera::ipa::rkisp1 {
* \brief White balance gains
*
* \var IPAFrameContext::awb.temperatureK
- * \brief Estimated color temperature
+ * \brief Color temperature used for processing this frame
+ *
+ * This does not match the color temperature estimated for this frame as the
+ * measurements were taken on a previous frame.
*
* \var IPAFrameContext::awb.autoEnabled
* \brief Whether the Auto White Balance algorithm is enabled