[libcamera-devel] [PATCH 4/5] ipa: ipu3: Send lens controls to pipeline handler
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Sun Nov 28 23:23:07 CET 2021
Hi Daniel,
Thank you for the patch.
On Fri, Nov 26, 2021 at 12:31:17AM +0000, Daniel Scally wrote:
> Pick up the focus value from the AF algorithm and send lens controls
> along in the frame context.
>
> Signed-off-by: Daniel Scally <djrscally at gmail.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 6c76193a..abdcd69d 100644
> --- a/src/ipa/ipu3/ipu3.cpp
> +++ b/src/ipa/ipu3/ipu3.cpp
> @@ -173,6 +173,7 @@ private:
> uint32_t gain_;
> uint32_t minGain_;
> uint32_t maxGain_;
> + uint32_t focus_;
Do we need this ?
>
> utils::Duration lineDuration_;
>
> @@ -671,6 +672,9 @@ void IPAIPU3::setControls(unsigned int frame)
> ctrls.set(V4L2_CID_ANALOGUE_GAIN, static_cast<int32_t>(gain_));
> op.sensorControls = ctrls;
>
> + focus_ = context_.frameContext.af.focus;
> + op.lensControls.set(V4L2_CID_FOCUS_ABSOLUTE, static_cast<int32_t>(focus_));
I think you need to create a ControlList first, like for the sensor
controls.
> +
> queueFrameAction.emit(frame, op);
> }
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list