libcamera: pipeline: rkisp1: Set the crop rectangle

Changing resolutions back and forth can provoke the crop rectangle to go
out of sync, set it as part of format configuration.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Niklas Söderlund
2020-08-07 14:59:15 +02:00
parent 1c57ff4729
commit 1e1bac5fff
+5
View File
@@ -629,6 +629,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. */