[libcamera-devel] [PATCH v2 07/13] libcamera: pipeline: rkisp1: Set the crop rectangle

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Sep 15 02:44:19 CEST 2020


Hi Niklas,

Thank you for the patch.

On Mon, Sep 14, 2020 at 04:21:43PM +0200, Niklas Söderlund wrote:
> Changing resolutions back and forth can provoke the crop rectangle to go
> out of sync, set it as port of format configuration.

s/port/part/

> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index a6cb16c0638f8d85..45c5e40186df693d 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -634,6 +634,11 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
>  	if (ret < 0)
>  		return ret;
>  
> +	Rectangle rect(0, 0, format.size);
> +	ret = isp_->setSelection(0, V4L2_SEL_TGT_CROP, &rect);
> +	if (ret < 0)
> +		return ret;
> +
>  	LOG(RkISP1, Debug) << "ISP input pad configured with " << format.toString();
>  
>  	/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list