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>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user