From patchwork Sun Feb 23 23:03:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22823 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 9FF68BDB13 for ; Sun, 23 Feb 2025 23:04:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E1E5B686B8; Mon, 24 Feb 2025 00:04:25 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tRTPdqnB"; 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 AB4E7686B0 for ; Mon, 24 Feb 2025 00:04:21 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9640082A for ; Mon, 24 Feb 2025 00:02:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351775; bh=ETHThAktD8mvvHaz+Ln0zlq0SC/W9i0qqDuzTxEwX78=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tRTPdqnB+hb/eSxDALSx8/aOXPedWgd0xhjONTc4tfCGZ4EVLNaVaAS1z2t0mjL5o kvEv/ehOh3RHi8RC3IdFQZz7ewL5cN9ugbWg7o6H4r5BBKsvadDb1emNgF4UJkG9SS ffrz9AyR2vhIH8PkM9ke06JtcyhEAho54AYVcBtk= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 01/15] libipa: awb: Sort class member documentation according to header order Date: Mon, 24 Feb 2025 01:03:49 +0200 Message-ID: <20250223230403.1226-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" Sort the documentation of the class members in the same order as the member declaration in the class definition, as is customary in libcamera. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb.cpp | 58 +++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 6157bd436183..2e78a4665509 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -130,35 +130,6 @@ namespace ipa { * \brief Handle the controls supplied in a request */ -/** - * \var AwbAlgorithm::controls_ - * \brief Controls info map for the controls provided by the algorithm - */ - -/** - * \var AwbAlgorithm::modes_ - * \brief Map of all configured modes - * \sa AwbAlgorithm::parseModeConfigs - */ - -/** - * \class AwbAlgorithm::ModeConfig - * \brief Holds the configuration of a single AWB mode - * - * Awb modes limit the regulation of the AWB algorithm to a specific range of - * colour temperatures. - */ - -/** - * \var AwbAlgorithm::ModeConfig::ctLo - * \brief The lowest valid colour temperature of that mode - */ - -/** - * \var AwbAlgorithm::ModeConfig::ctHi - * \brief The highest valid colour temperature of that mode - */ - /** * \brief Parse the mode configurations from the tuning data * \param[in] tuningData the YamlObject representing the tuning data @@ -260,6 +231,35 @@ int AwbAlgorithm::parseModeConfigs(const YamlObject &tuningData, return 0; } +/** + * \class AwbAlgorithm::ModeConfig + * \brief Holds the configuration of a single AWB mode + * + * Awb modes limit the regulation of the AWB algorithm to a specific range of + * colour temperatures. + */ + +/** + * \var AwbAlgorithm::ModeConfig::ctLo + * \brief The lowest valid colour temperature of that mode + */ + +/** + * \var AwbAlgorithm::ModeConfig::ctHi + * \brief The highest valid colour temperature of that mode + */ + +/** + * \var AwbAlgorithm::controls_ + * \brief Controls info map for the controls provided by the algorithm + */ + +/** + * \var AwbAlgorithm::modes_ + * \brief Map of all configured modes + * \sa AwbAlgorithm::parseModeConfigs + */ + } /* namespace ipa */ } /* namespace libcamera */ From patchwork Sun Feb 23 23:03:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22824 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 42401BDB13 for ; Sun, 23 Feb 2025 23:04:33 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4881B686BE; Mon, 24 Feb 2025 00:04:27 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YN4eedfg"; 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 0B6FB686B9 for ; Mon, 24 Feb 2025 00:04:23 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 04E53353 for ; Mon, 24 Feb 2025 00:02:56 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351777; bh=aqU/o2GHgx0rCNkHlr5JhSLOVq5GsF7QQFoFpkbvJKU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YN4eedfgXohLQxV9LzQyEnPE+rdcEKJvAZPEWEZ7bEwwhnz3aSpVIHaNRADPmx94I qMsqcL9Rh2jA9JVHFtuSaH6gz3ef9FRl39w4RGcMrf/heddmHhoGDJVSXjw7kbAjqS APTHP+5b4gAzvQ4rnqbCf2CsxzPsvx+VGksjOBGA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 02/15] libipa: awb: Capitalize AWB Date: Mon, 24 Feb 2025 01:03:50 +0200 Message-ID: <20250223230403.1226-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" AWB is an abbreviation, capitalize it in comments and log messages for consistency. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb.cpp | 14 +++++++------- src/ipa/libipa/awb_grey.cpp | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 2e78a4665509..dc672f129c4a 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -24,7 +24,7 @@ namespace ipa { /** * \class AwbResult - * \brief The result of an awb calculation + * \brief The result of an AWB calculation * * This class holds the result of an auto white balance calculation. */ @@ -57,7 +57,7 @@ namespace ipa { * applied. To keep the actual implementations computationally inexpensive, * the squared colour error shall be returned. * - * If the awb statistics provide multiple zones, the average of the individual + * If the AWB statistics provide multiple zones, the average of the individual * squared errors shall be returned. Averaging/normalizing is necessary so that * the numeric dimensions are the same on all hardware platforms. * @@ -94,7 +94,7 @@ namespace ipa { /** * \fn AwbAlgorithm::calculateAwb - * \brief Calculate awb data from the given statistics + * \brief Calculate AWB data from the given statistics * \param[in] stats The statistics to use for the calculation * \param[in] lux The lux value of the scene * @@ -102,7 +102,7 @@ namespace ipa { * lux value of 0 means it is unknown or invalid and the algorithm shall ignore * it. * - * \return The awb result + * \return The AWB result */ /** @@ -178,14 +178,14 @@ int AwbAlgorithm::parseModeConfigs(const YamlObject &tuningData, if (controls::AwbModeNameValueMap.find(modeName) == controls::AwbModeNameValueMap.end()) { LOG(Awb, Warning) - << "Skipping unknown awb mode '" + << "Skipping unknown AWB mode '" << modeName << "'"; continue; } if (!modeDict.isDictionary()) { LOG(Awb, Error) - << "Invalid awb mode '" << modeName << "'"; + << "Invalid AWB mode '" << modeName << "'"; return -EINVAL; } @@ -235,7 +235,7 @@ int AwbAlgorithm::parseModeConfigs(const YamlObject &tuningData, * \class AwbAlgorithm::ModeConfig * \brief Holds the configuration of a single AWB mode * - * Awb modes limit the regulation of the AWB algorithm to a specific range of + * AWB modes limit the regulation of the AWB algorithm to a specific range of * colour temperatures. */ diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp index 49448976ed26..06ffd45618d8 100644 --- a/src/ipa/libipa/awb_grey.cpp +++ b/src/ipa/libipa/awb_grey.cpp @@ -57,7 +57,7 @@ int AwbGrey::init(const YamlObject &tuningData) } /** - * \brief Calculate awb data from the given statistics + * \brief Calculate AWB data from the given statistics * \param[in] stats The statistics to use for the calculation * \param[in] lux The lux value of the scene * @@ -68,7 +68,7 @@ int AwbGrey::init(const YamlObject &tuningData) * * The \a lux parameter is not used in this algorithm. * - * \return The awb result + * \return The AWB result */ AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] int lux) { From patchwork Sun Feb 23 23:03:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22825 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 4CA78BDB13 for ; Sun, 23 Feb 2025 23:04:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BEA07686B9; Mon, 24 Feb 2025 00:04:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="H1tw1Snx"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C58EA686B9 for ; Mon, 24 Feb 2025 00:04:24 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 58C90353 for ; Mon, 24 Feb 2025 00:02:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351778; bh=ueXtDkxH7HYe4b1so1xCO61Lf/G9waDNNVrKdvXPUvs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H1tw1SnxSrkP3H74H6CdXcyLwXbsujjcEJoAyUwqGWNQZMdKzfcHMCPoHFqYL1nS6 ugvDeW/mUdtkBSYICcwes2X+98m8dW1dqJg0DExmOfWgIO2fYhquloWirgYl9Y2/HA yVrC3R9kpDYJzsQkpmNgpUlp4Qk/NJ+ShlS2jsp8= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 03/15] libipa: awb: Follow function names with '()' in doxygen documentation Date: Mon, 24 Feb 2025 01:03:51 +0200 Message-ID: <20250223230403.1226-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" Function names are followed by parentheses in doxygen documentation blocks as convention in libcamera. Add missing parentheses in the AwbAlgorithm documentation. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index dc672f129c4a..1adefa5bb929 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -49,7 +49,7 @@ namespace ipa { */ /** - * \fn AwbStats::computeColourError + * \fn AwbStats::computeColourError() * \brief Compute an error value for when the given gains would be applied * \param[in] gains The gains to apply * @@ -65,7 +65,7 @@ namespace ipa { */ /** - * \fn AwbStats::getRGBMeans + * \fn AwbStats::getRGBMeans() * \brief Get RGB means of the statistics * * Fetch the RGB means from the statistics. The values of each channel are @@ -85,7 +85,7 @@ namespace ipa { */ /** - * \fn AwbAlgorithm::init + * \fn AwbAlgorithm::init() * \brief Initialize the algorithm with the given tuning data * \param[in] tuningData The tuning data to use for the algorithm * @@ -93,7 +93,7 @@ namespace ipa { */ /** - * \fn AwbAlgorithm::calculateAwb + * \fn AwbAlgorithm::calculateAwb() * \brief Calculate AWB data from the given statistics * \param[in] stats The statistics to use for the calculation * \param[in] lux The lux value of the scene @@ -106,7 +106,7 @@ namespace ipa { */ /** - * \fn AwbAlgorithm::gainsFromColourTemperature + * \fn AwbAlgorithm::gainsFromColourTemperature() * \brief Compute white balance gains from a colour temperature * \param[in] colourTemperature The colour temperature in Kelvin * @@ -118,14 +118,14 @@ namespace ipa { */ /** - * \fn AwbAlgorithm::controls + * \fn AwbAlgorithm::controls() * \brief Get the controls info map for this algorithm * * \return The controls info map */ /** - * \fn AwbAlgorithm::handleControls + * \fn AwbAlgorithm::handleControls() * \param[in] controls The controls to handle * \brief Handle the controls supplied in a request */ From patchwork Sun Feb 23 23:03:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22826 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 5472ABDB13 for ; Sun, 23 Feb 2025 23:04:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 062AF686D2; Mon, 24 Feb 2025 00:04:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OtKCOaCQ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E9409686C0 for ; Mon, 24 Feb 2025 00:04:25 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BC23A353 for ; Mon, 24 Feb 2025 00:02:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351780; bh=fw8MFjffCSl/1FHDokKIQe3ZiUPHbOEwPBuTk+n2isM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OtKCOaCQPzr7gU/615FJ0bD7IgQj3srDvihhyIvhzh/t8QR0y5rKCd6Tznh8PyR22 GRwJsPjtqgmGtZejxa+8AZefe3f2OPcvLIn+kk+mFtVHQdctNl6I8tkFh3SpBCWcUH nPcNXIoFV3jgnQsz9hF+x3O6MiGrSYPLVxFD5zzU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 04/15] libipa: awb: Standardize spelling on 'grey' world Date: Mon, 24 Feb 2025 01:03:52 +0200 Message-ID: <20250223230403.1226-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" All locations but one spell 'grey' instead of 'gray'. Fix the outlier. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 1adefa5bb929..b5aeb472f1f1 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -70,7 +70,7 @@ namespace ipa { * * Fetch the RGB means from the statistics. The values of each channel are * dimensionless and only the ratios are used for further calculations. This is - * used by the simple gray world model to calculate the gains to apply. + * used by the simple grey world model to calculate the gains to apply. * * \return The RGB means */ From patchwork Sun Feb 23 23:03:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22827 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 41CE4BDB13 for ; Sun, 23 Feb 2025 23:04:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A648F686BC; Mon, 24 Feb 2025 00:04:37 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZD/h/icM"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4EDA4686C3 for ; Mon, 24 Feb 2025 00:04:27 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 43A0D82A for ; Mon, 24 Feb 2025 00:03:01 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351781; bh=R6MZa8ChG9gltIIyFBXjsSWspkZFu8b1fIHLuIldtdw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZD/h/icMQM2nfqrg+N2PVu2i2A5l4ygjBCIxuuT7fLaJeae8JIwqp08swtWpGLVNy CzdjCy68XLUDO3BdGYAYxVOeTlRZLzNk2CWAkhzFtGh9zJUzjQYgLFL66Sg/nAih95 4GMVgSwPI8PqEX47ByGsy/YaXyV08Ncsd+6J0BUE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 05/15] libipa: awb: Replace reference to pipeline handle with IPA module Date: Mon, 24 Feb 2025 01:03:53 +0200 Message-ID: <20250223230403.1226-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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 AwbStats documentation incorrectly references pipeline handlers when it means IPA modules. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index b5aeb472f1f1..1c4f2330ec6c 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -43,8 +43,8 @@ namespace ipa { * \class AwbStats * \brief An abstraction class wrapping hardware-specific AWB statistics * - * Pipeline handlers using an AWB algorithm based on the AwbAlgorithm class need - * to implement this class to give the algorithm access to the hardware-specific + * IPA modules using an AWB algorithm based on the AwbAlgorithm class need to + * implement this class to give the algorithm access to the hardware-specific * statistics data. */ From patchwork Sun Feb 23 23:03:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22828 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 EA5F2BDB13 for ; Sun, 23 Feb 2025 23:04:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7A1F3686C5; Mon, 24 Feb 2025 00:04:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ETJ3fsY/"; 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 98791686BF for ; Mon, 24 Feb 2025 00:04:28 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B377929 for ; Mon, 24 Feb 2025 00:03:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351782; bh=5NFBOrd3hb7bgceA18jz0+VIQboQgIkSiykBSKqNLj4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ETJ3fsY/ZD+gdxrl4dHfR+Go1v2EoXgu4VIgw5pspvwGL4C6Fw/4Ul9ayEvUDmvRa USJq+R1muUlmqLOelFZorEC0q1VG2UnGd9cfHNhfVYxQftlBmeb5G54eEnEBFXHqFE yf1vYopMMsLrFhmHHntY/fbLCsnUuQIwj8hmL2X4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 06/15] libipa: awb: Pass lux value to calculateAwb() as unsigned int Date: Mon, 24 Feb 2025 01:03:54 +0200 Message-ID: <20250223230403.1226-7-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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 lux value can never be negative. Pass it as an unsigned int. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- Do we need a Lux type ? And maybe a ColourTemperature type ? --- src/ipa/libipa/awb.h | 2 +- src/ipa/libipa/awb_bayes.cpp | 2 +- src/ipa/libipa/awb_bayes.h | 2 +- src/ipa/libipa/awb_grey.cpp | 2 +- src/ipa/libipa/awb_grey.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h index 4a1b012a4334..5c298d3b6f69 100644 --- a/src/ipa/libipa/awb.h +++ b/src/ipa/libipa/awb.h @@ -35,7 +35,7 @@ public: virtual ~AwbAlgorithm() = default; virtual int init(const YamlObject &tuningData) = 0; - virtual AwbResult calculateAwb(const AwbStats &stats, int lux) = 0; + virtual AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) = 0; virtual RGB gainsFromColourTemperature(double colourTemperature) = 0; const ControlInfoMap::Map &controls() const diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp index e75bfcd693d9..9287b884cb95 100644 --- a/src/ipa/libipa/awb_bayes.cpp +++ b/src/ipa/libipa/awb_bayes.cpp @@ -275,7 +275,7 @@ RGB AwbBayes::gainsFromColourTemperature(double colourTemperature) return { { gains[0], 1.0, gains[1] } }; } -AwbResult AwbBayes::calculateAwb(const AwbStats &stats, int lux) +AwbResult AwbBayes::calculateAwb(const AwbStats &stats, unsigned int lux) { ipa::Pwl prior; if (lux > 0) { diff --git a/src/ipa/libipa/awb_bayes.h b/src/ipa/libipa/awb_bayes.h index 47db7243273f..23bf88061118 100644 --- a/src/ipa/libipa/awb_bayes.h +++ b/src/ipa/libipa/awb_bayes.h @@ -34,7 +34,7 @@ public: AwbBayes() = default; int init(const YamlObject &tuningData) override; - AwbResult calculateAwb(const AwbStats &stats, int lux) override; + AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override; RGB gainsFromColourTemperature(double temperatureK) override; void handleControls(const ControlList &controls) override; diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp index 06ffd45618d8..e979cc4d1a3e 100644 --- a/src/ipa/libipa/awb_grey.cpp +++ b/src/ipa/libipa/awb_grey.cpp @@ -70,7 +70,7 @@ int AwbGrey::init(const YamlObject &tuningData) * * \return The AWB result */ -AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] int lux) +AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] unsigned int lux) { AwbResult result; auto means = stats.getRGBMeans(); diff --git a/src/ipa/libipa/awb_grey.h b/src/ipa/libipa/awb_grey.h index 1a365e616a98..e3c34201dbc9 100644 --- a/src/ipa/libipa/awb_grey.h +++ b/src/ipa/libipa/awb_grey.h @@ -23,7 +23,7 @@ public: AwbGrey() = default; int init(const YamlObject &tuningData) override; - AwbResult calculateAwb(const AwbStats &stats, int lux) override; + AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override; RGB gainsFromColourTemperature(double colourTemperature) override; private: From patchwork Sun Feb 23 23:03:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22829 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 08769BDB13 for ; Sun, 23 Feb 2025 23:04:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 93AE3686DF; Mon, 24 Feb 2025 00:04:43 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="D8KOjUV/"; 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 E7205686C6 for ; Mon, 24 Feb 2025 00:04:29 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E01FE353 for ; Mon, 24 Feb 2025 00:03:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351784; bh=sXj1q/f9B2xmOjRCACTzto1K6XSu5LYMUbDrGhICuO8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=D8KOjUV/ljJRJ3Sq0u/GBlLg5fADogH9eQ35GUtfv9pbf69qWRGoFrCdui3zt1bel YgdBmTkZsVX6NdI4qOwqR8U8aZlapMC7m+WSuVv+I2NHdp8Bh9jF7IfqQKxwtO0NAh C3gtYgq8eYjy/hxTJq9HE1EmmclkcUrk1OVc+3Gs= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 07/15] ipa: rkisp1: awb: Fix wrong indentation in comment Date: Mon, 24 Feb 2025 01:03:55 +0200 Message-ID: <20250223230403.1226-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/rkisp1/algorithms/awb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 51c49ba9ba01..3d6737df801c 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -55,9 +55,9 @@ public: double computeColourError(const RGB &gains) const override { /* - * Compute the sum of the squared colour error (non-greyness) as it - * appears in the log likelihood equation. - */ + * Compute the sum of the squared colour error (non-greyness) as + * it appears in the log likelihood equation. + */ double deltaR = gains.r() * rg_ - 1.0; double deltaB = gains.b() * bg_ - 1.0; double delta2 = deltaR * deltaR + deltaB * deltaB; From patchwork Sun Feb 23 23:03:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22830 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 16D23BDB13 for ; Sun, 23 Feb 2025 23:04:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5B6B7686E0; Mon, 24 Feb 2025 00:04:45 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ofsPN9ln"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 45A9A686C9 for ; Mon, 24 Feb 2025 00:04:31 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 36168353 for ; Mon, 24 Feb 2025 00:03:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351785; bh=L9XFMcrCWCCN/hx61fGcLqpx9JIITIUXcRntuBjp2ZQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ofsPN9lnVoJdrN2eo1bYEF73TImkoTXQeD6wjflYmxyKSpiaLBnXOQH8d3/SkkFep OTJGt12V1Lp0zp9Rxx9BDvCIVfTXIvbFDjp7iXOHp1qKcBccuGVW4AsHw6b5cx1cnC VuiUaylG04mHfrB8SZRMAGO2HV1a7og2m3jsVc74= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 08/15] libipa: awb: Rename AwbStats::getRGBMeans() to rgbMeans() Date: Mon, 24 Feb 2025 01:03:56 +0200 Message-ID: <20250223230403.1226-9-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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 convention in libcamera is not to prefix getters with a 'get' prefix. Rename the AwbStats::getRGBMeans() function accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb.cpp | 2 +- src/ipa/libipa/awb.h | 2 +- src/ipa/libipa/awb_grey.cpp | 2 +- src/ipa/rkisp1/algorithms/awb.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 1c4f2330ec6c..925fac232709 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -65,7 +65,7 @@ namespace ipa { */ /** - * \fn AwbStats::getRGBMeans() + * \fn AwbStats::rgbMeans() * \brief Get RGB means of the statistics * * Fetch the RGB means from the statistics. The values of each channel are diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h index 5c298d3b6f69..a86581adf43e 100644 --- a/src/ipa/libipa/awb.h +++ b/src/ipa/libipa/awb.h @@ -26,7 +26,7 @@ struct AwbResult { struct AwbStats { virtual double computeColourError(const RGB &gains) const = 0; - virtual RGB getRGBMeans() const = 0; + virtual RGB rgbMeans() const = 0; }; class AwbAlgorithm diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp index e979cc4d1a3e..17b8598400e7 100644 --- a/src/ipa/libipa/awb_grey.cpp +++ b/src/ipa/libipa/awb_grey.cpp @@ -73,7 +73,7 @@ int AwbGrey::init(const YamlObject &tuningData) AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] unsigned int lux) { AwbResult result; - auto means = stats.getRGBMeans(); + auto means = stats.rgbMeans(); result.colourTemperature = estimateCCT(means); /* diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 3d6737df801c..af34b81beb96 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -65,7 +65,7 @@ public: return delta2; } - RGB getRGBMeans() const override + RGB rgbMeans() const override { return rgbMeans_; } From patchwork Sun Feb 23 23:03:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22831 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 01AB6BDB13 for ; Sun, 23 Feb 2025 23:04:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 689A5686DF; Mon, 24 Feb 2025 00:04:48 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tGP1fQcJ"; 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 E05CE686CD for ; Mon, 24 Feb 2025 00:04:32 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DD98B353 for ; Mon, 24 Feb 2025 00:03:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351787; bh=iIyFbfWwBtq4D8Iz6sqmFu0J2dc23wVVy1rSX9npdok=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tGP1fQcJBStW75Lzgq5WGNQ8ge1BDh76nrqUcBfI5n6ic09HG6co/6bejyLS7iNFE Xka84gcOoPZe/cVFB2VVr2bqk0fnzwiIZL03R3LoeqAYz/1trJA2p3erKBwF6Rtioc n2PQyTXrWLkUsHn6DrM1BY8Af58p9i+FZqwj0P7o= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 09/15] libipa: awb: Make controls_ member variable private Date: Mon, 24 Feb 2025 01:03:57 +0200 Message-ID: <20250223230403.1226-10-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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 AwbAlgorithm::controls_ member variable doesn't need to be accessed by derived classes. Turn it from public to private. Signed-off-by: Laurent Pinchart --- src/ipa/libipa/awb.cpp | 5 ----- src/ipa/libipa/awb.h | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 925fac232709..04cf2d55ed00 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -249,11 +249,6 @@ int AwbAlgorithm::parseModeConfigs(const YamlObject &tuningData, * \brief The highest valid colour temperature of that mode */ -/** - * \var AwbAlgorithm::controls_ - * \brief Controls info map for the controls provided by the algorithm - */ - /** * \var AwbAlgorithm::modes_ * \brief Map of all configured modes diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h index a86581adf43e..36c05c37f5e9 100644 --- a/src/ipa/libipa/awb.h +++ b/src/ipa/libipa/awb.h @@ -54,8 +54,10 @@ protected: double ctLo; }; - ControlInfoMap::Map controls_; std::map modes_; + +private: + ControlInfoMap::Map controls_; }; } /* namespace ipa */ From patchwork Sun Feb 23 23:03:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22832 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 3BA03BDB13 for ; Sun, 23 Feb 2025 23:04:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 83147686D0; Mon, 24 Feb 2025 00:04:50 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OOeTzBRX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4B95D686D0 for ; Mon, 24 Feb 2025 00:04:34 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 3CBA682A for ; Mon, 24 Feb 2025 00:03:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351788; bh=6tckMhzC0uVNDmkxqvJVwatpEZglEX66035geRe0AIo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OOeTzBRXIgImeP1BOEX1zKU65maV2jWzv7avV+fhKGpqLgWtrpn2VQvoCIE0kSXtA KRzuoG15SOcMos4T7GZ6NQwt7SAB0aok7XgB0nI9r0XcI5eNnafmC7Ubicj1gDyj7p 7WgQ8zS4xwLTJhsZONt+KcPb7TSwnrq5yIq0XcsA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 10/15] libipa: awb: Provide read-only accessor to modes_ Date: Mon, 24 Feb 2025 01:03:58 +0200 Message-ID: <20250223230403.1226-11-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" Derived classes don't need to modify the modes_ member variable. Make it private and provide a read-only accessor. Signed-off-by: Laurent Pinchart --- src/ipa/libipa/awb.cpp | 6 +++--- src/ipa/libipa/awb.h | 6 +++++- src/ipa/libipa/awb_bayes.cpp | 6 +++--- src/ipa/libipa/awb_bayes.h | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index 04cf2d55ed00..0f54655d3234 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -250,9 +250,9 @@ int AwbAlgorithm::parseModeConfigs(const YamlObject &tuningData, */ /** - * \var AwbAlgorithm::modes_ - * \brief Map of all configured modes - * \sa AwbAlgorithm::parseModeConfigs + * \fn AwbAlgorithm::modes() + * \brief Get the available AWB modes + * \return The map of available AWB modes */ } /* namespace ipa */ diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h index 36c05c37f5e9..017b7a0c3dc1 100644 --- a/src/ipa/libipa/awb.h +++ b/src/ipa/libipa/awb.h @@ -54,9 +54,13 @@ protected: double ctLo; }; - std::map modes_; + const std::map &modes() const + { + return modes_; + } private: + std::map modes_; ControlInfoMap::Map controls_; }; diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp index 9287b884cb95..97bd256526a4 100644 --- a/src/ipa/libipa/awb_bayes.cpp +++ b/src/ipa/libipa/awb_bayes.cpp @@ -170,7 +170,7 @@ int AwbBayes::init(const YamlObject &tuningData) << "Failed to parse mode parameter from tuning file"; return ret; } - currentMode_ = &modes_[controls::AwbAuto]; + currentMode_ = &modes().at(controls::AwbAuto); transversePos_ = tuningData["transversePos"].get(0.01); transverseNeg_ = tuningData["transverseNeg"].get(0.01); @@ -256,8 +256,8 @@ void AwbBayes::handleControls(const ControlList &controls) { auto mode = controls.get(controls::AwbMode); if (mode) { - auto it = modes_.find(static_cast(*mode)); - if (it != modes_.end()) + auto it = modes().find(static_cast(*mode)); + if (it != modes().end()) currentMode_ = &it->second; else LOG(Awb, Error) << "Unsupported AWB mode " << *mode; diff --git a/src/ipa/libipa/awb_bayes.h b/src/ipa/libipa/awb_bayes.h index 23bf88061118..b74201b542fb 100644 --- a/src/ipa/libipa/awb_bayes.h +++ b/src/ipa/libipa/awb_bayes.h @@ -59,7 +59,7 @@ private: double transversePos_; double transverseNeg_; - ModeConfig *currentMode_ = nullptr; + const ModeConfig *currentMode_ = nullptr; }; } /* namespace ipa */ From patchwork Sun Feb 23 23:03:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22833 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 5334DBDB13 for ; Sun, 23 Feb 2025 23:04:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 64E1E686E9; Mon, 24 Feb 2025 00:04:52 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DhAV742C"; 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 17306686BF for ; Mon, 24 Feb 2025 00:04:36 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9FD4B82A for ; Mon, 24 Feb 2025 00:03:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351789; bh=PJ7PgLnSwhJ/mcjU9rz2QW8Xk2uPYc3pnCvwvMzA4dM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DhAV742CiGpAADgjZjzl0TXf/9xkt3M4SKEZoZaRXTnXWzooaQslYINRJQs8C8V1Y 8Gd1gjjBiW50shqr6iQ7QtmKr7dahZEbfvpHYgbx8Pz3BTkdYuvvDEqC7vDnv/Vr2s kYmB4FZa1w3t+1uFq4jbC3WR2/7QUx81XWlPZzFU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 11/15] libipa: awb: Tidy up includes Date: Mon, 24 Feb 2025 01:03:59 +0200 Message-ID: <20250223230403.1226-12-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" Drop unneeded headers and add missing ones. The yaml_parser.h header is dropped from awb_grey.h as the classes it provides are only used in virtual functions defined by the base class, so any required definitions are guaranteed to be available already. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb_bayes.cpp | 5 +++++ src/ipa/libipa/awb_bayes.h | 8 -------- src/ipa/libipa/awb_grey.cpp | 2 +- src/ipa/libipa/awb_grey.h | 3 ++- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp index 97bd256526a4..d2869610a25b 100644 --- a/src/ipa/libipa/awb_bayes.cpp +++ b/src/ipa/libipa/awb_bayes.cpp @@ -8,7 +8,12 @@ #include "awb_bayes.h" +#include #include +#include +#include +#include +#include #include #include diff --git a/src/ipa/libipa/awb_bayes.h b/src/ipa/libipa/awb_bayes.h index b74201b542fb..a5790e69eed7 100644 --- a/src/ipa/libipa/awb_bayes.h +++ b/src/ipa/libipa/awb_bayes.h @@ -7,14 +7,6 @@ #pragma once -#include -#include -#include -#include - -#include - -#include #include #include "libcamera/internal/vector.h" diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp index 17b8598400e7..0e6c5220c393 100644 --- a/src/ipa/libipa/awb_grey.cpp +++ b/src/ipa/libipa/awb_grey.cpp @@ -7,7 +7,7 @@ #include "awb_grey.h" -#include +#include #include #include diff --git a/src/ipa/libipa/awb_grey.h b/src/ipa/libipa/awb_grey.h index e3c34201dbc9..7ec7bfa5da9a 100644 --- a/src/ipa/libipa/awb_grey.h +++ b/src/ipa/libipa/awb_grey.h @@ -7,8 +7,9 @@ #pragma once +#include + #include "libcamera/internal/vector.h" -#include "libcamera/internal/yaml_parser.h" #include "awb.h" #include "interpolator.h" From patchwork Sun Feb 23 23:04:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22834 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 1CD82BDB13 for ; Sun, 23 Feb 2025 23:04:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 98614686E6; Mon, 24 Feb 2025 00:04:54 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YVKYSJdP"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AB10B686D8 for ; Mon, 24 Feb 2025 00:04:37 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 98F36353 for ; Mon, 24 Feb 2025 00:03:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351791; bh=0lUwjKUJURJnM9Bp1HfhoCWA9Gq4AYqXqbRVXSNf6es=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YVKYSJdPEYble8stGyXg09fHE92N/9NhFl4WguMStNqlcN4zhGh5qOIf0ker8RtrV RfgpP4DggwC7ni9UI8ycSOFm1E2zbhUzp3DPKhr5vR2JO1SS6AzvoTBG0TzLkaXhKD hL1/RId9g41lFIUWO89BJtG1CHbGrvw8xmK2qMOA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 12/15] libipa: awb_grey: Minor comment fixes Date: Mon, 24 Feb 2025 01:04:00 +0200 Message-ID: <20250223230403.1226-13-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" Fix the top-level file description to mention the file contains an AWB grey world implementation, not a base class, and fix a grammar mistake in a documentation block. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb_grey.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp index 0e6c5220c393..d3d2132b8869 100644 --- a/src/ipa/libipa/awb_grey.cpp +++ b/src/ipa/libipa/awb_grey.cpp @@ -2,7 +2,7 @@ /* * Copyright (C) 2024 Ideas on Board Oy * - * Base class for grey world AWB algorithm + * Implementation of grey world AWB algorithm */ #include "awb_grey.h" @@ -61,10 +61,10 @@ int AwbGrey::init(const YamlObject &tuningData) * \param[in] stats The statistics to use for the calculation * \param[in] lux The lux value of the scene * - * Estimates the colour temperature based on the colours::estimateCCT function. - * The gains are calculated purely based on the RGB means provided by the \a - * stats. The colour temperature is not taken into account when calculating the - * gains. + * The colour temperature is estimated based on the colours::estimateCCT() + * function. The gains are calculated purely based on the RGB means provided by + * the \a stats. The colour temperature is not taken into account when + * calculating the gains. * * The \a lux parameter is not used in this algorithm. * From patchwork Sun Feb 23 23:04:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22835 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 ABC9BBDB13 for ; Sun, 23 Feb 2025 23:04:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 58A52686EF; Mon, 24 Feb 2025 00:04:57 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Fw/Lk/JN"; 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 EF2FA686D9 for ; Mon, 24 Feb 2025 00:04:38 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EE2B482A for ; Mon, 24 Feb 2025 00:03:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351793; bh=G4gewnWK8OyfuhD2zFrCm4NqwzDTbAcZCjL60GYX7OA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Fw/Lk/JNcEWOMI0VTfqtZ2dRxJBOebfJYyGEThfNgK5Oq+iWdKjMz5nSpoNCAUwKR rP9Lo+Jz/7F2DHMq5dNlw8+SCIFjr+X7I72BbEw8ZNz0WdsqtY80JtI0qWfeWmH3cy hM0GcvwLN6EJ1tXju8yJqwjz7a7RS9HqMbjs9QPw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 13/15] ipa: rkisp1: awb: Don't calculate RGB means if stats are missing Date: Mon, 24 Feb 2025 01:04:01 +0200 Message-ID: <20250223230403.1226-14-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" When statistics are missing we can't meaningfully calculate the RGB means. Move their calculation after checking if stats are available. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/rkisp1/algorithms/awb.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index af34b81beb96..7f333ef86518 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -282,7 +282,6 @@ void Awb::process(IPAContext &context, const rkisp1_cif_isp_stat *params = &stats->params; const rkisp1_cif_isp_awb_stat *awb = ¶ms->awb; IPAActiveState &activeState = context.activeState; - RGB rgbMeans = calculateRgbMeans(frameContext, awb); metadata.set(controls::AwbEnable, frameContext.awb.autoEnabled); metadata.set(controls::ColourGains, { @@ -296,6 +295,8 @@ void Awb::process(IPAContext &context, return; } + RGB rgbMeans = calculateRgbMeans(frameContext, awb); + /* * If the means are too small we don't have enough information to * meaningfully calculate gains. Freeze the algorithm in that case. From patchwork Sun Feb 23 23:04:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22836 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 755EEBDB13 for ; Sun, 23 Feb 2025 23:05:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A7980686CD; Mon, 24 Feb 2025 00:04:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Jy66D+cY"; 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 65113686BE for ; Mon, 24 Feb 2025 00:04:40 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 55CAB82A for ; Mon, 24 Feb 2025 00:03:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351794; bh=w96LbgfPxeVCYpFQYzDz83EDvoCPFeBvX6xGYLrHHzo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Jy66D+cYKN6A/6MPu8vExyodRBO0JT/h623DCc6uitqP85NYCKbDdH+PHK6pBq7AY WJdIi8aiGfVHpfSLzSf8Ej8UlLIg1WnwSpMOUBgtt+72zsZxwKiO6gRbrj+5mWvsSe c69XDYHRsrM2Og7R5ciNRobSwjiR3NesjEUVNgMM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 14/15] ipa: rkisp1: awb: Capitalize AWB Date: Mon, 24 Feb 2025 01:04:02 +0200 Message-ID: <20250223230403.1226-15-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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" AWB is an abbreviation, capitalize it in comments and log messages for consistency. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/rkisp1/algorithms/awb.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 7f333ef86518..3c2864fd181c 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -92,7 +92,7 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData) kDefaultColourTemperature); if (!tuningData.contains("algorithm")) - LOG(RkISP1Awb, Info) << "No awb algorithm specified." + LOG(RkISP1Awb, Info) << "No AWB algorithm specified." << " Default to grey world"; auto mode = tuningData["algorithm"].get("grey"); @@ -101,14 +101,14 @@ int Awb::init(IPAContext &context, const YamlObject &tuningData) } else if (mode == "bayes") { awbAlgo_ = std::make_unique(); } else { - LOG(RkISP1Awb, Error) << "Unknown awb algorithm: " << mode; + LOG(RkISP1Awb, Error) << "Unknown AWB algorithm: " << mode; return -EINVAL; } - LOG(RkISP1Awb, Debug) << "Using awb algorithm: " << mode; + LOG(RkISP1Awb, Debug) << "Using AWB algorithm: " << mode; int ret = awbAlgo_->init(tuningData); if (ret) { - LOG(RkISP1Awb, Error) << "Failed to init awb algorithm"; + LOG(RkISP1Awb, Error) << "Failed to init AWB algorithm"; return ret; } From patchwork Sun Feb 23 23:04:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 22837 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 58E95BDB13 for ; Sun, 23 Feb 2025 23:05:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5D1D1686E7; Mon, 24 Feb 2025 00:05:01 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fuzn8KJ9"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0FFF9686DC for ; Mon, 24 Feb 2025 00:04:42 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id A566E353 for ; Mon, 24 Feb 2025 00:03:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1740351795; bh=Xclq0HdpXI5FySBzgwvTOxiIL/YEDzYC29rX0Lw+v2Y=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fuzn8KJ9OWwwiAT61UNZEPfhF5YW0l0OUMgJt9haXaYtZxErWW7jdtExYgDAg/gNi GBZ0Nq0yZDxwCUm547oAq3d0goNNY+NXw0i6U4Q2DUiupb0/Ay/SMZjJNYNLZCU8Lj j0kUWs42Mhbm7CtvGgqcfjrFXqct8eFni4lkECtM= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 15/15] libcamera: Drop spurious colon after doxygen \todo directive Date: Mon, 24 Feb 2025 01:04:03 +0200 Message-ID: <20250223230403.1226-16-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.3 In-Reply-To: <20250223230403.1226-1-laurent.pinchart@ideasonboard.com> References: <20250223230403.1226-1-laurent.pinchart@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 doxygen \todo directive doesn't need to be followed by a colon. Drop it. While at it, turn one 'todo:' into '\todo'. Signed-off-by: Laurent Pinchart Reviewed-by: Stefan Klug --- src/ipa/libipa/awb_bayes.cpp | 5 +++-- src/ipa/rkisp1/algorithms/awb.cpp | 2 +- src/libcamera/converter/converter_v4l2_m2m.cpp | 2 +- src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +- src/libcamera/pipeline/virtual/config_parser.cpp | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp index d2869610a25b..c3d05e7e3413 100644 --- a/src/ipa/libipa/awb_bayes.cpp +++ b/src/ipa/libipa/awb_bayes.cpp @@ -26,7 +26,8 @@ * * This implementation is based on the initial implementation done by * RaspberryPi. - * \todo: Documentation + * + * \todo Documentation * * \todo Not all the features implemented by RaspberryPi were ported over to * this algorithm because they either rely on hardware features not generally @@ -272,7 +273,7 @@ void AwbBayes::handleControls(const ControlList &controls) RGB AwbBayes::gainsFromColourTemperature(double colourTemperature) { /* - * \todo: In the RaspberryPi code, the ct curve was interpolated in + * \todo In the RaspberryPi code, the ct curve was interpolated in * the white point space (1/x) not in gains space. This feels counter * intuitive, as the gains are in linear space. But I can't prove it. */ diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp index 3c2864fd181c..52b57ab4e3b6 100644 --- a/src/ipa/rkisp1/algorithms/awb.cpp +++ b/src/ipa/rkisp1/algorithms/awb.cpp @@ -176,7 +176,7 @@ void Awb::queueRequest(IPAContext &context, awb.gains.manual.r() = (*colourGains)[0]; awb.gains.manual.b() = (*colourGains)[1]; /* - * \todo: Colour temperature reported in metadata is now + * \todo Colour temperature reported in metadata is now * incorrect, as we can't deduce the temperature from the gains. * This will be fixed with the bayes AWB algorithm. */ diff --git a/src/libcamera/converter/converter_v4l2_m2m.cpp b/src/libcamera/converter/converter_v4l2_m2m.cpp index 566f18ced51c..ee05b798fded 100644 --- a/src/libcamera/converter/converter_v4l2_m2m.cpp +++ b/src/libcamera/converter/converter_v4l2_m2m.cpp @@ -738,7 +738,7 @@ int V4L2M2MConverter::queueBuffers(FrameBuffer *input, } /* - * \todo: This should be extended to include Feature::Flag to denote + * \todo This should be extended to include Feature::Flag to denote * what each converter supports feature-wise. */ static std::initializer_list compatibles = { diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp index 5abd6b200e83..a05e11fccf8d 100644 --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp @@ -1615,7 +1615,7 @@ bool PipelineHandlerMaliC55::registerSensorCamera(MediaLink *ispLink) isp_->frameStart.connect(data->delayedCtrls_.get(), &DelayedControls::applyControls); - /* \todo: Init properties. */ + /* \todo Init properties. */ if (!registerMaliCamera(std::move(data), sensor->name())) return false; diff --git a/src/libcamera/pipeline/virtual/config_parser.cpp b/src/libcamera/pipeline/virtual/config_parser.cpp index 0cbfe39bf2f0..1e009946d53b 100644 --- a/src/libcamera/pipeline/virtual/config_parser.cpp +++ b/src/libcamera/pipeline/virtual/config_parser.cpp @@ -54,7 +54,7 @@ ConfigParser::parseConfigFile(File &file, PipelineHandler *pipe) data->config_.id = cameraId; ControlInfoMap::Map controls; - /* todo: Check which resolution's frame rate to be reported */ + /* \todo Check which resolution's frame rate to be reported */ controls[&controls::FrameDurationLimits] = ControlInfo(1000000 / data->config_.resolutions[0].frameRates[1], 1000000 / data->config_.resolutions[0].frameRates[0]);