summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp16
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1_path.cpp7
2 files changed, 19 insertions, 4 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 1b1922a9..6e74a49a 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -698,17 +698,27 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
if (ret < 0)
return ret;
- LOG(RkISP1, Debug) << "ISP input pad configured with " << format.toString();
+ LOG(RkISP1, Debug)
+ << "ISP input pad configured with " << format.toString()
+ << " crop " << rect.toString();
/* YUYV8_2X8 is required on the ISP source path pad for YUV output. */
format.mbus_code = MEDIA_BUS_FMT_YUYV8_2X8;
- LOG(RkISP1, Debug) << "Configuring ISP output pad with " << format.toString();
+ LOG(RkISP1, Debug)
+ << "Configuring ISP output pad with " << format.toString()
+ << " crop " << rect.toString();
+
+ ret = isp_->setSelection(2, V4L2_SEL_TGT_CROP, &rect);
+ if (ret < 0)
+ return ret;
ret = isp_->setFormat(2, &format);
if (ret < 0)
return ret;
- LOG(RkISP1, Debug) << "ISP output pad configured with " << format.toString();
+ LOG(RkISP1, Debug)
+ << "ISP output pad configured with " << format.toString()
+ << " crop " << rect.toString();
for (const StreamConfiguration &cfg : *config) {
if (cfg.stream() == &data->mainPathStream_)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
index 80e1818d..3f77b1c1 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp
@@ -117,9 +117,14 @@ int RkISP1Path::configure(const StreamConfiguration &config,
if (ret < 0)
return ret;
+ Rectangle rect(0, 0, ispFormat.size);
+ ret = resizer_->setSelection(0, V4L2_SEL_TGT_CROP, &rect);
+ if (ret < 0)
+ return ret;
+
LOG(RkISP1, Debug)
<< "Configured " << name_ << " resizer input pad with "
- << ispFormat.toString();
+ << ispFormat.toString() << " crop " << rect.toString();
ispFormat.size = config.size;