From patchwork Thu Oct 3 13:57:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 21498 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 2F5ACBD80A for ; Thu, 3 Oct 2024 13:57:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 88C536351F; Thu, 3 Oct 2024 15:57:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ORf4o4OF"; 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 5B0D16351F for ; Thu, 3 Oct 2024 15:57:49 +0200 (CEST) Received: from umang.jain (unknown [IPv6:2405:201:2015:f873:55d7:c02e:b2eb:ee3f]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3BF8E66F; Thu, 3 Oct 2024 15:56:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1727963776; bh=6NwE6SlxNtgZyMy452TU7UIfycDDfIBGuNb9RWzVL+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ORf4o4OFEv1bEP+gZR753I6PZlS8B50LeAQtBwhLIvPAqJld0m/FMKix8ZQH/OwUL WWeZMLoWjharFdwG+cshBotzgpFOa+st48HdS9zk0JFp6GpWreZBR9eLFHqXu8rGaL atBgCCC2neec8+czc248ntraWDDabWag/yvvLpiQ= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Kieran Bingham , Laurent Pinchart , Paul Elder , Umang Jain Subject: [PATCH v2 1/2] libcamera rkisp1: Reduce scope of sensor max resolution variable Date: Thu, 3 Oct 2024 19:27:39 +0530 Message-ID: <20241003135741.60869-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241003135741.60869-1-umang.jain@ideasonboard.com> References: <20241003135741.60869-1-umang.jain@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" Reduce the scope of sensor's max resolution variable in RkISP1Path::validate(), as it is only required to constraint the maximum and minimum resolution bounds on the non-RAW code path. No functional changes intended in this patch. Signed-off-by: Umang Jain Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp index cb6117b9..e7f1f12a 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp @@ -254,7 +254,6 @@ CameraConfiguration::Status RkISP1Path::validate(const CameraSensor *sensor, StreamConfiguration *cfg) { const std::vector &mbusCodes = sensor->mbusCodes(); - Size resolution = filterSensorResolution(sensor); const StreamConfiguration reqCfg = *cfg; CameraConfiguration::Status status = CameraConfiguration::Valid; @@ -322,6 +321,8 @@ CameraConfiguration::Status RkISP1Path::validate(const CameraSensor *sensor, minResolution = sensorFormat.size; maxResolution = sensorFormat.size; } else { + Size resolution = filterSensorResolution(sensor); + /* * Adjust the size based on the sensor resolution and absolute * limits of the ISP.