[libcamera-devel] [PATCH v2 08/11] libcamera: ipu3: Report ScalerCrop in metadata

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Jan 25 12:35:28 CET 2021


Hi Jacopo,

Thank you for the patch.

On Tue, Jan 19, 2021 at 03:37:08PM +0100, Jacopo Mondi wrote:
> Report in the Request metadata the scaler crop region as requested by
> application through the request controls. No actual scaling is applied
> in the pipeline at the moment.
> 
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index fc5592f33032..329b9d51cf1b 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -968,6 +968,11 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)
>  	request->metadata().set(controls::draft::PipelineDepth, 3);
>  	/* \todo Move the ExposureTime control to the IPA. */
>  	request->metadata().set(controls::ExposureTime, exposureTime_);
> +	/* \todo Handle the scaler crop region for each request. */

Maybe "Actually apply the scaler crop region to the ImgU" ?

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> +	if (request->controls().contains(controls::ScalerCrop)) {
> +		Rectangle cropRegion = request->controls().get(controls::ScalerCrop);
> +		request->metadata().set(controls::ScalerCrop, cropRegion);
> +	}
>  	pipe_->completeRequest(request);
>  }
>  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list