From fd71913d70c236fda50879d35c92a0dc62f01cea Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Mon, 16 Dec 2024 16:40:55 +0100 Subject: pipeline: rkisp1: Enable the dewarper unconditionally In configure() and in the future in generateConfiguration() the calculated stream sizes and crop rectangles depend on the dewarper being available or not. It is therefore not possible to disable the dewarper later if configuration fails. Error out in that case. Signed-off-by: Stefan Klug Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 18038226..14d4bb9a 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -865,7 +865,10 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) if (dewarper_ && !isRaw_) { outputCfgs.push_back(const_cast(cfg)); ret = dewarper_->configure(cfg, outputCfgs); - useDewarper_ = ret ? false : true; + if (ret) + return ret; + + useDewarper_ = true; /* * Calculate the crop rectangle of the data -- cgit v1.2.1