From patchwork Tue Jan 20 08:45:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 25863 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 2AE42BDCBF for ; Tue, 20 Jan 2026 08:46:19 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D6AB761FD8; Tue, 20 Jan 2026 09:46:18 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="U9haRQ4+"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5685161FCF for ; Tue, 20 Jan 2026 09:46:16 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:7f76:a386:d798:7544]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 6438E177D; Tue, 20 Jan 2026 09:45:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768898745; bh=0l6JnCw672jvY9tLeKTKm0Y+MPFLCOZ2jHu4Q8BNJ4o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U9haRQ4+5ERH3IZmW14I2XiaS//MF2YKdSL7VRqgVpkaf5Cka3Ndpo7QpXz0L8cM+ YLmdN3IZ/ZC0a7ReA9EgM8qP4jQV1Vx++tJA3R7vEPs+GJ2r6J4/8ae9mO1qneqPyG /rJnZdZ1+eMGCbBA0CRW3xEGw16kAB5dKmL7XxRA= From: Stefan Klug Date: Tue, 20 Jan 2026 09:45:50 +0100 Subject: [PATCH v4 08/14] ipa: rkisp1: lsc: Move local types into anonymous namespace MIME-Version: 1.0 Message-Id: <20260120-sklug-lsc-resampling-v2-dev-v4-8-2411c4be6d6d@ideasonboard.com> References: <20260120-sklug-lsc-resampling-v2-dev-v4-0-2411c4be6d6d@ideasonboard.com> In-Reply-To: <20260120-sklug-lsc-resampling-v2-dev-v4-0-2411c4be6d6d@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Kieran Bingham , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Mailer: b4 0.14.2 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" Move all local helpers into an anonymous namespace and drop a static modifier that is no longer needed. Signed-off-by: Stefan Klug Reviewed-by: Kieran Bingham Reviewed-by: Barnabás Pőcze --- Changes in v3: - Collected tags Changes in v2: - Added this patch --- src/ipa/rkisp1/algorithms/lsc.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index 1962d18d148b4abac6e601ec36e0c68944a6191c..c42f74557c7364935254d75ee1fb923d176e0dbd 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -27,8 +27,6 @@ namespace libcamera { namespace ipa { -constexpr int kColourTemperatureChangeThreshhold = 10; - template void interpolateVector(const std::vector &a, const std::vector &b, std::vector &dest, double lambda) @@ -70,6 +68,10 @@ namespace ipa::rkisp1::algorithms { LOG_DEFINE_CATEGORY(RkISP1Lsc) +namespace { + +constexpr int kColourTemperatureChangeThreshhold = 10; + class LscPolynomialLoader { public: @@ -276,8 +278,8 @@ std::vector LscTableLoader::parseTable(const YamlObject &tuningData, return table; } -static std::vector parseSizes(const YamlObject &tuningData, - const char *prop) +std::vector parseSizes(const YamlObject &tuningData, + const char *prop) { std::vector sizes = tuningData[prop].getList().value_or(std::vector{}); @@ -306,6 +308,8 @@ static std::vector parseSizes(const YamlObject &tuningData, return sizes; } +} /* namespace */ + LensShadingCorrection::LensShadingCorrection() : lastAppliedCt_(0), lastAppliedQuantizedCt_(0) {