From patchwork Sat Oct 11 16:03:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 24589 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 3534EBE080 for ; Sat, 11 Oct 2025 16:03:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8E52060448; Sat, 11 Oct 2025 18:03:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BFLqoar2"; 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 B3412603E0 for ; Sat, 11 Oct 2025 18:03:42 +0200 (CEST) Received: from charm.hippo-penny.ts.net (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A67EC67; Sat, 11 Oct 2025 18:02:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760198526; bh=Qx3/aEVsGwiwIQgMReTV/B86As0EsyAIvYy1JM7/Yrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BFLqoar2u1SETs3Z1udpevZaZCSuo/2MoRLgzaCfia4BcY/uoTp1ZAsdj6gKYX2wF K+E4oRc/M+M6hE9Kxtqz9eitpwG3THeQgIABMasEOq0PYIroxdVITRMh+7ZNymiji3 pWAntYZG+M0lBUFphF+1IYkX4YbxU18+Ucw8UKMQ= From: Kieran Bingham To: libcamera devel Cc: Kieran Bingham Subject: [RFC PATCH 1/7] ipa: mali-c55: blc: mark offset member variables Date: Sat, 11 Oct 2025 17:03:29 +0100 Message-ID: <20251011160335.50578-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251011160335.50578-1-kieran.bingham@ideasonboard.com> References: <20251011160335.50578-1-kieran.bingham@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" Rename the offset variables to use a suffixed '_' to make it clear these variables are stored in the class. Signed-off-by: Kieran Bingham --- src/ipa/mali-c55/algorithms/blc.cpp | 42 ++++++++++++++--------------- src/ipa/mali-c55/algorithms/blc.h | 8 +++--- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/ipa/mali-c55/algorithms/blc.cpp b/src/ipa/mali-c55/algorithms/blc.cpp index 2a54c86a91f8..85642c0435a2 100644 --- a/src/ipa/mali-c55/algorithms/blc.cpp +++ b/src/ipa/mali-c55/algorithms/blc.cpp @@ -38,13 +38,13 @@ BlackLevelCorrection::BlackLevelCorrection() int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData) { - offset00 = tuningData["offset00"].get(0); - offset01 = tuningData["offset01"].get(0); - offset10 = tuningData["offset10"].get(0); - offset11 = tuningData["offset11"].get(0); + offset00_ = tuningData["offset00"].get(0); + offset01_ = tuningData["offset01"].get(0); + offset10_ = tuningData["offset10"].get(0); + offset11_ = tuningData["offset11"].get(0); - if (offset00 > kMaxOffset || offset01 > kMaxOffset || - offset10 > kMaxOffset || offset11 > kMaxOffset) { + if (offset00_ > kMaxOffset || offset01_ > kMaxOffset || + offset10_ > kMaxOffset || offset11_ > kMaxOffset) { LOG(MaliC55Blc, Error) << "Invalid black level offsets"; return -EINVAL; } @@ -52,8 +52,8 @@ int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context, tuningParameters_ = true; LOG(MaliC55Blc, Debug) - << "Black levels: 00 " << offset00 << ", 01 " << offset01 - << ", 10 " << offset10 << ", 11 " << offset11; + << "Black levels: 00 " << offset00_ << ", 01 " << offset01_ + << ", 10 " << offset10_ << ", 11 " << offset11_; return 0; } @@ -69,11 +69,11 @@ int BlackLevelCorrection::configure(IPAContext &context, * use the value from the CameraSensorHelper if one is available. */ if (context.configuration.sensor.blackLevel && - !(offset00 + offset01 + offset10 + offset11)) { - offset00 = context.configuration.sensor.blackLevel; - offset01 = context.configuration.sensor.blackLevel; - offset10 = context.configuration.sensor.blackLevel; - offset11 = context.configuration.sensor.blackLevel; + !(offset00_ + offset01_ + offset10_ + offset11_)) { + offset00_ = context.configuration.sensor.blackLevel; + offset01_ = context.configuration.sensor.blackLevel; + offset10_ = context.configuration.sensor.blackLevel; + offset11_ = context.configuration.sensor.blackLevel; } return 0; @@ -100,10 +100,10 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context, block.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE; block.header->size = sizeof(mali_c55_params_sensor_off_preshading); - block.sensor_offs->chan00 = offset00; - block.sensor_offs->chan01 = offset01; - block.sensor_offs->chan10 = offset10; - block.sensor_offs->chan11 = offset11; + block.sensor_offs->chan00 = offset00_; + block.sensor_offs->chan01 = offset01_; + block.sensor_offs->chan10 = offset10_; + block.sensor_offs->chan11 = offset11_; params->total_size += block.header->size; } @@ -126,10 +126,10 @@ void BlackLevelCorrection::process([[maybe_unused]] IPAContext &context, * \todo Account for bayer order. */ metadata.set(controls::SensorBlackLevels, { - static_cast(offset00 >> 4), - static_cast(offset01 >> 4), - static_cast(offset10 >> 4), - static_cast(offset11 >> 4), + static_cast(offset00_ >> 4), + static_cast(offset01_ >> 4), + static_cast(offset10_ >> 4), + static_cast(offset11_ >> 4), }); } diff --git a/src/ipa/mali-c55/algorithms/blc.h b/src/ipa/mali-c55/algorithms/blc.h index 9696e8e9f2aa..29dcafdfec70 100644 --- a/src/ipa/mali-c55/algorithms/blc.h +++ b/src/ipa/mali-c55/algorithms/blc.h @@ -32,10 +32,10 @@ private: static constexpr uint32_t kMaxOffset = 0xfffff; bool tuningParameters_; - uint32_t offset00; - uint32_t offset01; - uint32_t offset10; - uint32_t offset11; + uint32_t offset00_; + uint32_t offset01_; + uint32_t offset10_; + uint32_t offset11_; }; } /* namespace ipa::mali_c55::algorithms */