[{"id":36408,"web_url":"https://patchwork.libcamera.org/comment/36408/","msgid":"<i44ww2aa5htkvz52czrmjhuje5yobcnyvuosdhikuez5wjsja5@mewdilrcahpz>","date":"2025-10-23T16:46:12","subject":"Re: [RFC PATCH 1/7] ipa: mali-c55: blc: mark offset member variables","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Kieran\n\nOn Sat, Oct 11, 2025 at 05:03:29PM +0100, Kieran Bingham wrote:\n> Rename the offset variables to use a suffixed '_' to make\n> it clear these variables are stored in the class.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nThanks\n  j\n\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(-)\n>\n> diff --git a/src/ipa/mali-c55/algorithms/blc.cpp b/src/ipa/mali-c55/algorithms/blc.cpp\n> index 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>\n> diff --git a/src/ipa/mali-c55/algorithms/blc.h b/src/ipa/mali-c55/algorithms/blc.h\n> index 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> --\n> 2.51.0\n>","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 7FECABE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Oct 2025 16:46:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A366560819;\n\tThu, 23 Oct 2025 18:46:17 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1A09A607F4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Oct 2025 18:46:16 +0200 (CEST)","from ideasonboard.com (mob-5-90-63-16.net.vodafone.it [5.90.63.16])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BA447EFE;\n\tThu, 23 Oct 2025 18:44:30 +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=\"SOu4S1MM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761237871;\n\tbh=u15wUZZB0MfXm98PQZTLTXX23f2+CxyHQfC3apQUAxA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SOu4S1MMQJd9HIM4ldyC1hAA9IO0HkZf14msPLhOQ3nL52jeSKkNuu1qWIsPnk+VO\n\tn8J/rVT2kY9K9ULcai6NuWvwUuBsW/hkSzC3Cji1NvXdnkvITdhxkOwEPbj+g8sCe7\n\t/U7U7Bmrr0vABmoRq3tq9jRg3JPHWCAY6ujJ0U3I=","Date":"Thu, 23 Oct 2025 18:46:12 +0200","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Subject":"Re: [RFC PATCH 1/7] ipa: mali-c55: blc: mark offset member variables","Message-ID":"<i44ww2aa5htkvz52czrmjhuje5yobcnyvuosdhikuez5wjsja5@mewdilrcahpz>","References":"<20251011160335.50578-1-kieran.bingham@ideasonboard.com>\n\t<20251011160335.50578-2-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20251011160335.50578-2-kieran.bingham@ideasonboard.com>","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>"}},{"id":36412,"web_url":"https://patchwork.libcamera.org/comment/36412/","msgid":"<62c801e8-0afa-486f-81e4-67f2a12aff7b@ideasonboard.com>","date":"2025-10-23T18:09:35","subject":"Re: [RFC PATCH 1/7] ipa: mali-c55: blc: mark offset member variables","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 10. 11. 18:03 keltezéssel, Kieran Bingham írta:\n> Rename the offset variables to use a suffixed '_' to make\n> it clear these variables are stored in the class.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nI guess the title should be capitalized: \"Mark offset ....\"\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\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(-)\n> \n> diff --git a/src/ipa/mali-c55/algorithms/blc.cpp b/src/ipa/mali-c55/algorithms/blc.cpp\n> index 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>   \n> diff --git a/src/ipa/mali-c55/algorithms/blc.h b/src/ipa/mali-c55/algorithms/blc.h\n> index 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 */","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 1E135BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 23 Oct 2025 18:09:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 294B06082F;\n\tThu, 23 Oct 2025 20:09:42 +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 64A4E606E4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 23 Oct 2025 20:09:40 +0200 (CEST)","from [192.168.33.33] (185.221.141.231.nat.pool.zt.hu\n\t[185.221.141.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id CBE96EFE;\n\tThu, 23 Oct 2025 20:07:54 +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=\"j/3OxQ1s\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761242875;\n\tbh=zhO64ZOKRSZy+Qt2IwChSXGxwHkCJhu+Ogoc6t27m5w=;\n\th=Date:Subject:To:References:From:Cc:In-Reply-To:From;\n\tb=j/3OxQ1snYgaDi4xueM5TFPw+48g4MaMdoHx5MDx9d0HSe6c2JC/v5s9Jr4YvShHc\n\tGAkAITGrbe2TWcwUJRdt2KaVzfT5c1a4G94jyMvasD2JTrPyO/vL+QvoEVR2ANC4fJ\n\tkkkd3AR5vWIWB11zC+PaUkIT8gjqU28qbk7NrQG4=","Message-ID":"<62c801e8-0afa-486f-81e4-67f2a12aff7b@ideasonboard.com>","Date":"Thu, 23 Oct 2025 20:09:35 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH 1/7] ipa: mali-c55: blc: mark offset member variables","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20251011160335.50578-1-kieran.bingham@ideasonboard.com>\n\t<20251011160335.50578-2-kieran.bingham@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","In-Reply-To":"<20251011160335.50578-2-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}}]