[RFC PATCH 6/7] ipa: rkisp1: Add a lookahead of one frame when sending sensor controls
Stefan Klug
stefan.klug at ideasonboard.com
Fri Dec 20 17:26:52 CET 2024
When the delayed controls instance of the pipeline is reset, it initializes
the values for frame 0 as being sent out to the sensor (which is
correct). The next sequence number that can be pushed to delayed
controls is therefore number 1. Ensure that the IPA never tries to
queue controls for frame 0.
Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
---
src/ipa/rkisp1/rkisp1.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 799fe0846635..5d439e0d727b 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -386,10 +386,13 @@ void IPARkISP1::processStats(const uint32_t frame, const uint32_t bufferId,
/*
* \todo: Here we should do a lookahead that takes the sensor delays
- * into account.
+ * into account. A lookahead of 1 is the smallest lookahead possible to
+ * ensure we don't try to send the controls for a frame that we already
+ * received.
*/
- ControlList ctrls = getSensorControls(frame);
- setSensorControls.emit(frame, ctrls);
+ int lookahead = 1;
+ ControlList ctrls = getSensorControls(frame + lookahead);
+ setSensorControls.emit(frame + lookahead, ctrls);
context_.debugMetadata.moveEntries(metadata);
metadataReady.emit(frame, metadata);
--
2.43.0
More information about the libcamera-devel
mailing list