From patchwork Mon Dec 16 15:40:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 22361 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 493E2C32F6 for ; Mon, 16 Dec 2024 15:42:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E436D67F97; Mon, 16 Dec 2024 16:42:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="CtV52Dw8"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9173967F89 for ; Mon, 16 Dec 2024 16:42:27 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:bfdf:3a3c:e45:66e3]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 03479675; Mon, 16 Dec 2024 16:41:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1734363711; bh=Cb6ONl86m7aa6iQBw4ziExKImYSlAO2tVJrcmpB5Raw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CtV52Dw8pv2JRtBaR3e+klIivuQZYq5h7m3Z2v98KMkpknmt683Y5bQj96NPkP50D 1ZNusbB+8Jj/xOJo800ikS9MjH30ofoor57PsQ6YkXQgoLiBdeTOpOUkQj2GfDX44b V58Rr1dRFQ/2l3x+IKRKyHKP9zpt3AUWfRAoq540= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Jacopo Mondi , Paul Elder Subject: [PATCH v4 15/20] pipeline: rkisp1: Enable the dewarper unconditionally Date: Mon, 16 Dec 2024 16:40:55 +0100 Message-ID: <20241216154124.203650-16-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241216154124.203650-1-stefan.klug@ideasonboard.com> References: <20241216154124.203650-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In configure() and in the future in generateConfiguration() the calculated stream sizes and crop rectangles depend on the dewarper being used or not. It is therefore not possible to postpone that decision until the dewarper gets configured. Enable the dewarper unconditionally if it is found and the stream type is not RAW. Signed-off-by: Stefan Klug Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder Reviewed-by: Jacopo Mondi --- Changes in v4: - Collected tags --- 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 18038226912a..14d4bb9a929b 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