diff options
author | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-12-16 16:40:50 +0100 |
---|---|---|
committer | Stefan Klug <stefan.klug@ideasonboard.com> | 2024-12-17 10:33:14 +0100 |
commit | c4a523582ae59ff5e056c431feeb62dd7960a634 (patch) | |
tree | 4ad29c2fc65d652c0159fac7a4791f8bccf4d676 | |
parent | 06346821bec52d5dd0f337cef13c73f9ee24e79c (diff) |
pipeline: rkisp1: Query dewarper crop bounds if no stream configured
Query the crop bounds on the dewarper instead of the stream in case the
camera was not yet configured when updateControls() gets called. This
provides sane defaults for the controls.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
-rw-r--r-- | src/libcamera/pipeline/rkisp1/rkisp1.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 89946b78..56192451 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -1220,8 +1220,11 @@ int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data) ControlInfoMap::Map controls; if (dewarper_) { - std::pair<Rectangle, Rectangle> cropLimits = - dewarper_->inputCropBounds(&data->mainPathStream_); + std::pair<Rectangle, Rectangle> cropLimits; + if (dewarper_->isConfigured(&data->mainPathStream_)) + cropLimits = dewarper_->inputCropBounds(&data->mainPathStream_); + else + cropLimits = dewarper_->inputCropBounds(); controls[&controls::ScalerCrop] = ControlInfo(cropLimits.first, cropLimits.second, |