[libcamera-devel] [PATCH v2 03/14] ipa: ipu3: Use sensor controls to update frameContext
Jean-Michel Hautbois
jeanmichel.hautbois at ideasonboard.com
Wed Nov 10 20:58:50 CET 2021
The pipeline handler populates the new sensorControls ControlList, to
have the effective exposure and gain values for the current frame. This
is done when a statistics buffer is received.
Make those values the frameContext::agc values for the frame when the
EventStatReady event is received.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at ideasonboard.com>
---
src/ipa/ipu3/ipu3.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index bcc3863b..1111f200 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -549,6 +549,10 @@ void IPAIPU3::processEvent(const IPU3Event &event)
const ipu3_uapi_stats_3a *stats =
reinterpret_cast<ipu3_uapi_stats_3a *>(mem.data());
+ /* \todo move those into processControls ? */
+ context_.frameContext.agc.exposure = event.sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();
+ context_.frameContext.agc.gain = camHelper_->gain(event.sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());
+
parseStatistics(event.frame, event.frameTimestamp, stats);
break;
}
--
2.32.0
More information about the libcamera-devel
mailing list