[v4,08/19] libipa: agc_mean_luminance: Configure the exposure mode helpers
diff mbox series

Message ID 20250918144333.108695-9-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • Implement WDR algorithm
Related show

Commit Message

Stefan Klug Sept. 18, 2025, 2:43 p.m. UTC
Add a function to configure the exposure mode helpers with the line
length and sensor helper to take quantization effects into account.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

---

Changes in v4:
- Fixed wrong variable name in configure() documentation
- Collected tags

Changes in v3:
- Renamed lineLength to lineDuration
- Collected tag
---
 src/ipa/libipa/agc_mean_luminance.cpp | 15 +++++++++++++++
 src/ipa/libipa/agc_mean_luminance.h   |  1 +
 2 files changed, 16 insertions(+)

Patch
diff mbox series

diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp
index fce1a5064870..ea4709bf4e49 100644
--- a/src/ipa/libipa/agc_mean_luminance.cpp
+++ b/src/ipa/libipa/agc_mean_luminance.cpp
@@ -311,6 +311,21 @@  int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData)
 	return 0;
 }
 
+/**
+ * \brief Configure the exposure mode helpers
+ * \param[in] lineDuration The sensor line length
+ * \param[in] sensorHelper The sensor helper
+ *
+ * This function configures the exposure mode helpers so they can correctly
+ * take quantization effects into account.
+ */
+void AgcMeanLuminance::configure(utils::Duration lineDuration,
+				 const CameraSensorHelper *sensorHelper)
+{
+	for (auto &[id, helper] : exposureModeHelpers_)
+		helper->configure(lineDuration, sensorHelper);
+}
+
 /**
  * \brief Parse tuning data for AeConstraintMode and AeExposureMode controls
  * \param[in] tuningData the YamlObject representing the tuning data
diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h
index cad7ef845487..49985481ac51 100644
--- a/src/ipa/libipa/agc_mean_luminance.h
+++ b/src/ipa/libipa/agc_mean_luminance.h
@@ -42,6 +42,7 @@  public:
 		double yTarget;
 	};
 
+	void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper);
 	int parseTuningData(const YamlObject &tuningData);
 
 	void setExposureCompensation(double gain)