From patchwork Fri Sep 18 12:09:36 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 28346 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 376E4C335B for ; Fri, 18 Sep 2026 12:10:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A0BB46874D; Fri, 18 Sep 2026 14:10:06 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FnnQvavG"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1746168734 for ; Fri, 18 Sep 2026 14:09:55 +0200 (CEST) Received: from pb-laptop.local (185.221.142.0.nat.pool.zt.hu [185.221.142.0]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3F81B4C2F for ; Fri, 18 Sep 2026 14:08:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1789733292; bh=DcuEBucjEQKLBhgXIpVmizQe+tcuw0+TRHII53ZBdPg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FnnQvavGosHyNwOLBBtiTC/HJ7JPkFdCvnA4MKWOhzHAQAwv3jVoTzb3xM3P08/pW OPzqXWZ96pIHUMfWgMdmNoj8qXaW+kKzoLGxzxC98TRpafF6FkmxdrCHrbgmXIWm/K 0zZ8AssUGmZ9j/8WX9Iyf1jjpbz6AHvU/18WC/yc= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [PATCH v3 08/21] ipa: libipa: gamma: Accept const segment lengths Date: Fri, 18 Sep 2026 14:09:36 +0200 Message-ID: <20260918120949.191668-9-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260918120949.191668-1-barnabas.pocze@ideasonboard.com> References: <20260918120949.191668-1-barnabas.pocze@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 segment lengths are not modified, so accept `const` qualified arrays, etc. Signed-off-by: Barnabás Pőcze --- src/ipa/libipa/gamma.cpp | 2 +- src/ipa/libipa/gamma.h | 2 +- src/ipa/rkisp1/algorithms/goc.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ipa/libipa/gamma.cpp b/src/ipa/libipa/gamma.cpp index ce66f15d6a..20807ac601 100644 --- a/src/ipa/libipa/gamma.cpp +++ b/src/ipa/libipa/gamma.cpp @@ -109,7 +109,7 @@ const float kDefaultGamma = 2.2f; * @return 0 on success, a negative error code otherwise */ int GammaAlgorithmBase::init(ControlInfoMap::Map &controls, const ValueNode &tuningData, - std::span segments) + std::span segments) { /* * If the caller doesn't pass in a segment list we simply construct the diff --git a/src/ipa/libipa/gamma.h b/src/ipa/libipa/gamma.h index e5ac3f96f5..a8872a6c75 100644 --- a/src/ipa/libipa/gamma.h +++ b/src/ipa/libipa/gamma.h @@ -47,7 +47,7 @@ public: } int init(ControlInfoMap::Map &controls, const ValueNode &tuningData, - std::span segments = {}); + std::span segments = {}); void configure(gamma::ActiveState &state); void queueRequest(gamma::ActiveState &state, const uint32_t frame, diff --git a/src/ipa/rkisp1/algorithms/goc.cpp b/src/ipa/rkisp1/algorithms/goc.cpp index 269ae1ea03..f6961ce17f 100644 --- a/src/ipa/rkisp1/algorithms/goc.cpp +++ b/src/ipa/rkisp1/algorithms/goc.cpp @@ -50,7 +50,7 @@ int GammaOutCorrection::init(IPAContext &context, const ValueNode &tuningData) return -EINVAL; } - std::array segments = { + static constexpr std::array segments = { 64, 64, 64, 64, 128, 128, 128, 128, 256, 256, 256, 512, 512, 512, 512, 512 };