@@ -33,7 +33,8 @@ interface IPARkISP1Interface {
[async] queueRequest(uint32 frame, libcamera.ControlList reqControls);
[async] fillParamsBuffer(uint32 frame, uint32 bufferId);
[async] processStatsBuffer(uint32 frame, uint32 bufferId,
- libcamera.ControlList sensorControls);
+ libcamera.ControlList sensorControls,
+ libcamera.ControlList lensControls);
};
interface IPARkISP1EventInterface {
@@ -1275,9 +1275,10 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)
metadata.timestamp);
if (isRaw_) {
+ const ControlList lensCtrls;
const ControlList &ctrls =
data->delayedCtrls_->get(metadata.sequence);
- data->ipa_->processStatsBuffer(info->frame, 0, ctrls);
+ data->ipa_->processStatsBuffer(info->frame, 0, ctrls, lensCtrls);
}
} else {
if (isRaw_)
@@ -1319,8 +1320,15 @@ void PipelineHandlerRkISP1::statReady(FrameBuffer *buffer)
if (data->frame_ <= buffer->metadata().sequence)
data->frame_ = buffer->metadata().sequence + 1;
+ ControlInfoMap emptyInfoMap;
+ ControlList lensControls = ControlList(emptyInfoMap);
+ CameraLens *lens = data->sensor_->focusLens();
+ if (lens)
+ lensControls.merge(lens->getVolatileControls());
+
data->ipa_->processStatsBuffer(info->frame, info->statBuffer->cookie(),
- data->delayedCtrls_->get(buffer->metadata().sequence));
+ data->delayedCtrls_->get(buffer->metadata().sequence),
+ lensControls);
}
REGISTER_PIPELINE_HANDLER(PipelineHandlerRkISP1)
All v4l2 controls that may change by themselves (volatile) are passed to the IPA. An example for this can be the current actual position of the focus lens, which is needed for an autofocus algorithm. Signed-off-by: Matthias Fend <matthias.fend@emfend.at> --- include/libcamera/ipa/rkisp1.mojom | 3 ++- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)