@@ -322,6 +322,12 @@ void IPARkISP1::queueRequest(const uint32_t frame, const ControlList &controls)
continue;
algo->queueRequest(context_, frame, frameContext, controls);
}
+
+ /* Fast path, if we are not regulating */
+ if (!frameContext.agc.autoEnabled) {
+ ControlList ctrls = getControls(frame);
+ setSensorControls.emit(frame, ctrls);
+ }
}
void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)
@@ -370,8 +376,14 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId
algo->process(context_, frame, frameContext, stats, metadata);
}
- ControlList ctrls = getControls(frame);
- setSensorControls.emit(frame, ctrls);
+ /*
+ * Set controls only when we are actually regulation. Otherwise, the controls
+ * where already set in queueRequest
+ */
+ if (frameContext.agc.autoEnabled) {
+ ControlList ctrls = getControls(frame);
+ setSensorControls.emit(frame, ctrls);
+ }
metadataReady.emit(frame, metadata);
}
@@ -401,7 +401,7 @@ void RkISP1CameraData::paramFilled(unsigned int frame)
void RkISP1CameraData::setSensorControls([[maybe_unused]] unsigned int frame,
const ControlList &sensorControls)
{
- delayedCtrls_->push(sensorControls);
+ delayedCtrls_->push(sensorControls, frame);
}
void RkISP1CameraData::metadataReady(unsigned int frame, const ControlList &metadata)
If the isp is not regulating, it can forward the request directly to the pipeline handler which will then be able to feed the delayed controls early enough. This solutions is quite simplistic and will need more thoughts as soon as other algorithms get implemented. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/rkisp1/rkisp1.cpp | 16 ++++++++++++++-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-)