From patchwork Sun Jun 16 16:39:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20334 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 6F7F1C3237 for ; Sun, 16 Jun 2024 16:39:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E31546549C; Sun, 16 Jun 2024 18:39:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="l1/WFQ48"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A4DE465490 for ; Sun, 16 Jun 2024 18:39:39 +0200 (CEST) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 608B9669 for ; Sun, 16 Jun 2024 18:39:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1718555963; bh=Cux+EXVIIdq/5V99cPg+41qLkr+U9xjwm5zElv5DWsY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=l1/WFQ48Tm93p4v2qCVPw94Fc8cY2YeVRFkBAXXhIS18mj/WwgOpgtPhlHghc8y49 35OHbi/bPRcXyDUaJMeqjY4mYOYJ3smW8UlM7KT5zGeydOZ7lwGu0Tr3Li12XxqVRY BZTmhWoax6U2zShtDcUgFZ2oojugvP9GkX8o2U84= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 06/12] ipa: rkisp1: agc: Make size argument to computeHistogramPredivider const Date: Sun, 16 Jun 2024 19:39:04 +0300 Message-ID: <20240616163910.5506-7-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240616163910.5506-1-laurent.pinchart@ideasonboard.com> References: <20240616163910.5506-1-laurent.pinchart@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" The Agc::computeHistogramPredivider() function doesn't need to modify its size parameter. Make it const. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder --- src/ipa/rkisp1/algorithms/agc.cpp | 3 ++- src/ipa/rkisp1/algorithms/agc.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp index 0f60d08fd41c..9dac60bdb24e 100644 --- a/src/ipa/rkisp1/algorithms/agc.cpp +++ b/src/ipa/rkisp1/algorithms/agc.cpp @@ -84,7 +84,8 @@ int Agc::parseMeteringModes(IPAContext &context, const YamlObject &tuningData) return 0; } -uint8_t Agc::computeHistogramPredivider(Size &size, enum rkisp1_cif_isp_histogram_mode mode) +uint8_t Agc::computeHistogramPredivider(const Size &size, + enum rkisp1_cif_isp_histogram_mode mode) { /* * The maximum number of pixels that could potentially be in one bin is diff --git a/src/ipa/rkisp1/algorithms/agc.h b/src/ipa/rkisp1/algorithms/agc.h index 996fea71755c..9ceaa82b099e 100644 --- a/src/ipa/rkisp1/algorithms/agc.h +++ b/src/ipa/rkisp1/algorithms/agc.h @@ -45,7 +45,7 @@ public: private: int parseMeteringModes(IPAContext &context, const YamlObject &tuningData); - uint8_t computeHistogramPredivider(Size &size, + uint8_t computeHistogramPredivider(const Size &size, enum rkisp1_cif_isp_histogram_mode mode); void fillMetadata(IPAContext &context, IPAFrameContext &frameContext,