summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-07 14:59:15 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-28 23:53:45 +0200
commit1e1bac5fffb817122f862b6b9c905fac186da204 (patch)
tree39ee81fd2df67abec697851aa9c38bdeb6f351df
parent1c57ff47290d3a835c72951a78f035291ec93cb3 (diff)
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>
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 27191b18..2f70bf22 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -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. */