{"id":24589,"url":"https://patchwork.libcamera.org/api/patches/24589/?format=json","web_url":"https://patchwork.libcamera.org/patch/24589/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251011160335.50578-2-kieran.bingham@ideasonboard.com>","date":"2025-10-11T16:03:29","name":"[RFC,1/7] ipa: mali-c55: blc: mark offset member variables","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"b3f04a7cd3609ae10f3500dad44a1621e1ef916a","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/24589/mbox/","series":[{"id":5486,"url":"https://patchwork.libcamera.org/api/series/5486/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5486","date":"2025-10-11T16:03:28","name":"Preparatory cleanup for libipa rework.","version":1,"mbox":"https://patchwork.libcamera.org/series/5486/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/24589/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/24589/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 3534EBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 11 Oct 2025 16:03:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8E52060448;\n\tSat, 11 Oct 2025 18:03:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B3412603E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 11 Oct 2025 18:03:42 +0200 (CEST)","from charm.hippo-penny.ts.net\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0A67EC67;\n\tSat, 11 Oct 2025 18:02:06 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"BFLqoar2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760198526;\n\tbh=Qx3/aEVsGwiwIQgMReTV/B86As0EsyAIvYy1JM7/Yrg=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=BFLqoar2u1SETs3Z1udpevZaZCSuo/2MoRLgzaCfia4BcY/uoTp1ZAsdj6gKYX2wF\n\tK+E4oRc/M+M6hE9Kxtqz9eitpwG3THeQgIABMasEOq0PYIroxdVITRMh+7ZNymiji3\n\tpWAntYZG+M0lBUFphF+1IYkX4YbxU18+Ucw8UKMQ=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>","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","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Rename the offset variables to use a suffixed '_' to make\nit clear these variables are stored in the class.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/ipa/mali-c55/algorithms/blc.cpp | 42 ++++++++++++++---------------\n src/ipa/mali-c55/algorithms/blc.h   |  8 +++---\n 2 files changed, 25 insertions(+), 25 deletions(-)","diff":"diff --git a/src/ipa/mali-c55/algorithms/blc.cpp b/src/ipa/mali-c55/algorithms/blc.cpp\nindex 2a54c86a91f8..85642c0435a2 100644\n--- a/src/ipa/mali-c55/algorithms/blc.cpp\n+++ b/src/ipa/mali-c55/algorithms/blc.cpp\n@@ -38,13 +38,13 @@ BlackLevelCorrection::BlackLevelCorrection()\n int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,\n \t\t\t       const YamlObject &tuningData)\n {\n-\toffset00 = tuningData[\"offset00\"].get<uint32_t>(0);\n-\toffset01 = tuningData[\"offset01\"].get<uint32_t>(0);\n-\toffset10 = tuningData[\"offset10\"].get<uint32_t>(0);\n-\toffset11 = tuningData[\"offset11\"].get<uint32_t>(0);\n+\toffset00_ = tuningData[\"offset00\"].get<uint32_t>(0);\n+\toffset01_ = tuningData[\"offset01\"].get<uint32_t>(0);\n+\toffset10_ = tuningData[\"offset10\"].get<uint32_t>(0);\n+\toffset11_ = tuningData[\"offset11\"].get<uint32_t>(0);\n \n-\tif (offset00 > kMaxOffset || offset01 > kMaxOffset ||\n-\t    offset10 > kMaxOffset || offset11 > kMaxOffset) {\n+\tif (offset00_ > kMaxOffset || offset01_ > kMaxOffset ||\n+\t    offset10_ > kMaxOffset || offset11_ > kMaxOffset) {\n \t\tLOG(MaliC55Blc, Error) << \"Invalid black level offsets\";\n \t\treturn -EINVAL;\n \t}\n@@ -52,8 +52,8 @@ int BlackLevelCorrection::init([[maybe_unused]] IPAContext &context,\n \ttuningParameters_ = true;\n \n \tLOG(MaliC55Blc, Debug)\n-\t\t<< \"Black levels: 00 \" << offset00 << \", 01 \" << offset01\n-\t\t<< \", 10 \" << offset10 << \", 11 \" << offset11;\n+\t\t<< \"Black levels: 00 \" << offset00_ << \", 01 \" << offset01_\n+\t\t<< \", 10 \" << offset10_ << \", 11 \" << offset11_;\n \n \treturn 0;\n }\n@@ -69,11 +69,11 @@ int BlackLevelCorrection::configure(IPAContext &context,\n \t * use the value from the CameraSensorHelper if one is available.\n \t */\n \tif (context.configuration.sensor.blackLevel &&\n-\t    !(offset00 + offset01 + offset10 + offset11)) {\n-\t\toffset00 = context.configuration.sensor.blackLevel;\n-\t\toffset01 = context.configuration.sensor.blackLevel;\n-\t\toffset10 = context.configuration.sensor.blackLevel;\n-\t\toffset11 = context.configuration.sensor.blackLevel;\n+\t    !(offset00_ + offset01_ + offset10_ + offset11_)) {\n+\t\toffset00_ = context.configuration.sensor.blackLevel;\n+\t\toffset01_ = context.configuration.sensor.blackLevel;\n+\t\toffset10_ = context.configuration.sensor.blackLevel;\n+\t\toffset11_ = context.configuration.sensor.blackLevel;\n \t}\n \n \treturn 0;\n@@ -100,10 +100,10 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,\n \tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n \tblock.header->size = sizeof(mali_c55_params_sensor_off_preshading);\n \n-\tblock.sensor_offs->chan00 = offset00;\n-\tblock.sensor_offs->chan01 = offset01;\n-\tblock.sensor_offs->chan10 = offset10;\n-\tblock.sensor_offs->chan11 = offset11;\n+\tblock.sensor_offs->chan00 = offset00_;\n+\tblock.sensor_offs->chan01 = offset01_;\n+\tblock.sensor_offs->chan10 = offset10_;\n+\tblock.sensor_offs->chan11 = offset11_;\n \n \tparams->total_size += block.header->size;\n }\n@@ -126,10 +126,10 @@ void BlackLevelCorrection::process([[maybe_unused]] IPAContext &context,\n \t * \\todo Account for bayer order.\n \t */\n \tmetadata.set(controls::SensorBlackLevels, {\n-\t\tstatic_cast<int32_t>(offset00 >> 4),\n-\t\tstatic_cast<int32_t>(offset01 >> 4),\n-\t\tstatic_cast<int32_t>(offset10 >> 4),\n-\t\tstatic_cast<int32_t>(offset11 >> 4),\n+\t\tstatic_cast<int32_t>(offset00_ >> 4),\n+\t\tstatic_cast<int32_t>(offset01_ >> 4),\n+\t\tstatic_cast<int32_t>(offset10_ >> 4),\n+\t\tstatic_cast<int32_t>(offset11_ >> 4),\n \t});\n }\n \ndiff --git a/src/ipa/mali-c55/algorithms/blc.h b/src/ipa/mali-c55/algorithms/blc.h\nindex 9696e8e9f2aa..29dcafdfec70 100644\n--- a/src/ipa/mali-c55/algorithms/blc.h\n+++ b/src/ipa/mali-c55/algorithms/blc.h\n@@ -32,10 +32,10 @@ private:\n \tstatic constexpr uint32_t kMaxOffset = 0xfffff;\n \n \tbool tuningParameters_;\n-\tuint32_t offset00;\n-\tuint32_t offset01;\n-\tuint32_t offset10;\n-\tuint32_t offset11;\n+\tuint32_t offset00_;\n+\tuint32_t offset01_;\n+\tuint32_t offset10_;\n+\tuint32_t offset11_;\n };\n \n } /* namespace ipa::mali_c55::algorithms */\n","prefixes":["RFC","1/7"]}