From patchwork Thu Jun 11 01:17:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26866 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 0C445C3300 for ; Thu, 11 Jun 2026 01:17:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 02C0561F15; Thu, 11 Jun 2026 03:17:27 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wEnQrrUo"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 251C86139A for ; Thu, 11 Jun 2026 03:17:25 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 97510D0 for ; Thu, 11 Jun 2026 03:16:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140615; bh=0GSTE/n+aB7XD/JdRJjnK+CXwekKu4ChK+RFPDN3qrg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wEnQrrUoh5jdmjDlQcP3ewQqyt2PSLmhU5jkQ/ezJMQJLMBSQx3AzuFolPnAJUS2W hKG7SQ5yXhgVjsHlZRndpoLaQGogHWO/C07zOCImfY5BJjuUVq/5tcQ7YvXXSPuL4w KlgHOTIvfc64stditJXmAw31xcgTvmqRBD1Zg5tI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 1/6] ipa: rkisp1: ccm: Drop unused parseYaml() function declaration Date: Thu, 11 Jun 2026 04:17:17 +0300 Message-ID: <20260611011722.1767689-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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 Ccm::parseYaml() function is neither used nor implemented. Drop its declaration. Signed-off-by: Laurent Pinchart --- src/ipa/rkisp1/algorithms/ccm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/ipa/rkisp1/algorithms/ccm.h b/src/ipa/rkisp1/algorithms/ccm.h index 9ac537426d16..3d3a660065ff 100644 --- a/src/ipa/rkisp1/algorithms/ccm.h +++ b/src/ipa/rkisp1/algorithms/ccm.h @@ -41,7 +41,6 @@ public: ControlList &metadata) override; private: - void parseYaml(const ValueNode &tuningData); void setParameters(struct rkisp1_cif_isp_ctk_config &config, const Matrix &matrix, const Matrix &offsets); From patchwork Thu Jun 11 01:17:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26867 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 369FFC328C for ; Thu, 11 Jun 2026 01:17:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D419361F31; Thu, 11 Jun 2026 03:17:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="uQlEIb8t"; 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 766EA6139A for ; Thu, 11 Jun 2026 03:17:26 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EC60BD0 for ; Thu, 11 Jun 2026 03:16:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140617; bh=b/HA4Q0OBzOwZzIXAztr6MofyzZ68ebScap0wcHWEN8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uQlEIb8tn1rp6jQtkLFqAEQnbze2BKHWWXu5z+SKAa14AKtBVl9GoGT1WPKsLJumk uyWrB8RJSM4nHdIuzTJhcmgQmd2sZJXrqgEI7lTd+Wg1KiwvOzgP+4eGVoFDUMXWOy ap1UnV8eHg7ord77xT0btdfEsSgJD3VtfRh4z6og= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 2/6] libcamera: matrix: Rename data validation function Date: Thu, 11 Jun 2026 04:17:18 +0300 Message-ID: <20260611011722.1767689-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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 matrixValidateYaml() function predates the refactoring of YamlObject and its rename to ValueNode. It now operates on a ValudeNode, disconnected from the YAML parser. Rename it to matrixValidateValueNode() accordingly. While at it, fold consecutive __DOXYGEN__ conditional blocks into a single one. Signed-off-by: Laurent Pinchart --- include/libcamera/internal/matrix.h | 6 ++---- src/libcamera/matrix.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/libcamera/internal/matrix.h b/include/libcamera/internal/matrix.h index 0f72263f2536..137eb65e0c52 100644 --- a/include/libcamera/internal/matrix.h +++ b/include/libcamera/internal/matrix.h @@ -188,10 +188,8 @@ constexpr Matrix operator+(const Matrix &m1, const } #ifndef __DOXYGEN__ -bool matrixValidateYaml(const ValueNode &obj, unsigned int size); -#endif /* __DOXYGEN__ */ +bool matrixValidateValueNode(const ValueNode &obj, unsigned int size); -#ifndef __DOXYGEN__ template std::ostream &operator<<(std::ostream &out, const Matrix &m) { @@ -203,7 +201,7 @@ template struct ValueNode::Accessor> { std::optional> get(const ValueNode &obj) const { - if (!matrixValidateYaml(obj, Rows * Cols)) + if (!matrixValidateValueNode(obj, Rows * Cols)) return std::nullopt; Matrix matrix; diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp index 4fe210830421..e4fb8d35314d 100644 --- a/src/libcamera/matrix.cpp +++ b/src/libcamera/matrix.cpp @@ -314,7 +314,7 @@ template bool matrixInvert(Span data, Span dataOut * to the product of the number of rows and columns of the matrix (Rows x * Cols). The values shall be stored in row-major order. */ -bool matrixValidateYaml(const ValueNode &obj, unsigned int size) +bool matrixValidateValueNode(const ValueNode &obj, unsigned int size) { if (!obj.isList()) return false; From patchwork Thu Jun 11 01:17:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26868 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 5749FC3300 for ; Thu, 11 Jun 2026 01:17:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7507061F3F; Thu, 11 Jun 2026 03:17:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="EJaP9xDK"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D51E461F14 for ; Thu, 11 Jun 2026 03:17:27 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 48614D0 for ; Thu, 11 Jun 2026 03:16:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140618; bh=YCTHG3GTJm2Qci50lhIR0VnNuFkZFM+BHtyjUP5RWFQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EJaP9xDKUc+9BdFuZR+45O5YJIfr3XwwEk1D4s4QGhF4R93F6wGNPzAezYq1ANd0n LnEJP0iXPvGWQEItvmWT8Gu7DrSFwz0H0rCY9jRB6T94zrPlQ0A2sqU1cS+Ljk2Nj6 ZlODSZzxcjnB+470Pea8YMrZYIkRkuZkXUI38FLk= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 3/6] libcamera: vector: Rename data validation function Date: Thu, 11 Jun 2026 04:17:19 +0300 Message-ID: <20260611011722.1767689-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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 vectorValidateYaml() function predates the refactoring of YamlObject and its rename to ValueNode. It now operates on a ValudeNode, disconnected from the YAML parser. Rename it to vectorValidateValueNode() accordingly. While at it, fold consecutive __DOXYGEN__ conditional blocks into a single one. Signed-off-by: Laurent Pinchart --- include/libcamera/internal/vector.h | 6 ++---- src/libcamera/vector.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h index e3ea723d300c..093efafa8982 100644 --- a/include/libcamera/internal/vector.h +++ b/include/libcamera/internal/vector.h @@ -343,10 +343,8 @@ bool operator!=(const Vector &lhs, const Vector &rhs) } #ifndef __DOXYGEN__ -bool vectorValidateYaml(const ValueNode &obj, unsigned int size); -#endif /* __DOXYGEN__ */ +bool vectorValidateValueNode(const ValueNode &obj, unsigned int size); -#ifndef __DOXYGEN__ template std::ostream &operator<<(std::ostream &out, const Vector &v) { @@ -364,7 +362,7 @@ template struct ValueNode::Accessor> { std::optional> get(const ValueNode &obj) const { - if (!vectorValidateYaml(obj, Rows)) + if (!vectorValidateValueNode(obj, Rows)) return std::nullopt; Vector vector; diff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp index 94fbf61e23ea..d850a581e32b 100644 --- a/src/libcamera/vector.cpp +++ b/src/libcamera/vector.cpp @@ -351,7 +351,7 @@ LOG_DEFINE_CATEGORY(Vector) */ #ifndef __DOXYGEN__ -bool vectorValidateYaml(const ValueNode &obj, unsigned int size) +bool vectorValidateValueNode(const ValueNode &obj, unsigned int size) { if (!obj.isList()) return false; From patchwork Thu Jun 11 01:17:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26869 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 4F41DC328C for ; Thu, 11 Jun 2026 01:17:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A713C61F24; Thu, 11 Jun 2026 03:17:31 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nxSMBp+H"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3E85E61F24 for ; Thu, 11 Jun 2026 03:17:29 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B66AAE0D for ; Thu, 11 Jun 2026 03:16:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140619; bh=4ocK9YLw/uTYdkEUDDUQUAH4g1hJR4wMtb5grIb5FIs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nxSMBp+HUrFCznxn69C7bakyNe7IfbumVJr5O5MsQ3/ObrL1KElhiuU7P1+WBl8ek Pl/N0yb42f7DUDMKiyXFRh3a+dIzsldb4XjAsmbLQGRWlAG6x9/zOTD4IAI+l5Twz5 iEpRboHJ35izYQx8RoNDqQuijNZJJ/GadM8vn9ps= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 4/6] libcamera: Drop 'yaml' prefix from ValueNode variables Date: Thu, 11 Jun 2026 04:17:20 +0300 Message-ID: <20260611011722.1767689-5-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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" Many ValueNode variables use a 'yaml' prefix in their name. This is a leftover from when the ValueNode class was named YamlObject, and is now confusing. Remove the prefix by either simply dropping it, renaming the variable when its name would clash, or removing temporary variables altogether. Signed-off-by: Laurent Pinchart --- src/android/camera_hal_config.cpp | 6 +-- src/ipa/libipa/agc_mean_luminance.cpp | 12 ++--- src/ipa/libipa/awb.cpp | 6 +-- src/ipa/mali-c55/algorithms/lsc.cpp | 15 +++---- src/ipa/rkisp1/algorithms/agc.cpp | 4 +- src/ipa/rkisp1/algorithms/lsc.cpp | 51 ++++++++++------------ src/ipa/rpi/controller/rpi/agc_channel.cpp | 4 +- 7 files changed, 46 insertions(+), 52 deletions(-) diff --git a/src/android/camera_hal_config.cpp b/src/android/camera_hal_config.cpp index 4a9c0577a0be..3631cb7ad9f2 100644 --- a/src/android/camera_hal_config.cpp +++ b/src/android/camera_hal_config.cpp @@ -76,12 +76,12 @@ int CameraHalConfig::Private::parseConfigFile(File &file, if (!root->contains("cameras")) return -EINVAL; - const ValueNode &yamlObjectCameras = (*root)["cameras"]; + const ValueNode &camerasNode = (*root)["cameras"]; - if (!yamlObjectCameras.isDictionary()) + if (!camerasNode.isDictionary()) return -EINVAL; - for (const auto &[cameraId, configData] : yamlObjectCameras.asDict()) { + for (const auto &[cameraId, configData] : camerasNode.asDict()) { if (parseCameraConfigData(cameraId, configData)) return -EINVAL; } diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index c226dd23552c..2d3bc709f3c1 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -218,9 +218,9 @@ int AgcMeanLuminance::parseConstraintModes(const ValueNode &tuningData) { std::vector availableConstraintModes; - const ValueNode &yamlConstraintModes = tuningData[controls::AeConstraintMode.name()]; - if (yamlConstraintModes.isDictionary()) { - for (const auto &[modeName, modeDict] : yamlConstraintModes.asDict()) { + const ValueNode &constraintModes = tuningData[controls::AeConstraintMode.name()]; + if (constraintModes.isDictionary()) { + for (const auto &[modeName, modeDict] : constraintModes.asDict()) { if (AeConstraintModeNameValueMap.find(modeName) == AeConstraintModeNameValueMap.end()) { LOG(AgcMeanLuminance, Warning) @@ -273,9 +273,9 @@ int AgcMeanLuminance::parseExposureModes(const ValueNode &tuningData) { std::vector availableExposureModes; - const ValueNode &yamlExposureModes = tuningData[controls::AeExposureMode.name()]; - if (yamlExposureModes.isDictionary()) { - for (const auto &[modeName, modeValues] : yamlExposureModes.asDict()) { + const ValueNode &exposureModes = tuningData[controls::AeExposureMode.name()]; + if (exposureModes.isDictionary()) { + for (const auto &[modeName, modeValues] : exposureModes.asDict()) { if (AeExposureModeNameValueMap.find(modeName) == AeExposureModeNameValueMap.end()) { LOG(AgcMeanLuminance, Warning) diff --git a/src/ipa/libipa/awb.cpp b/src/ipa/libipa/awb.cpp index af966f1e007c..29a78069c52c 100644 --- a/src/ipa/libipa/awb.cpp +++ b/src/ipa/libipa/awb.cpp @@ -167,14 +167,14 @@ int AwbAlgorithm::parseModeConfigs(const ValueNode &tuningData, { std::vector availableModes; - const ValueNode &yamlModes = tuningData[controls::AwbMode.name()]; - if (!yamlModes.isDictionary()) { + const ValueNode &modes = tuningData[controls::AwbMode.name()]; + if (!modes.isDictionary()) { LOG(Awb, Error) << "AwbModes must be a dictionary."; return -EINVAL; } - for (const auto &[modeName, modeDict] : yamlModes.asDict()) { + for (const auto &[modeName, modeDict] : modes.asDict()) { if (controls::AwbModeNameValueMap.find(modeName) == controls::AwbModeNameValueMap.end()) { LOG(Awb, Warning) diff --git a/src/ipa/mali-c55/algorithms/lsc.cpp b/src/ipa/mali-c55/algorithms/lsc.cpp index 36e50163aecc..097239dcef3e 100644 --- a/src/ipa/mali-c55/algorithms/lsc.cpp +++ b/src/ipa/mali-c55/algorithms/lsc.cpp @@ -26,16 +26,15 @@ int Lsc::init([[maybe_unused]] IPAContext &context, const ValueNode &tuningData) meshScale_ = tuningData["meshScale"].get(0); - const ValueNode &yamlSets = tuningData["sets"]; - if (!yamlSets.isList()) { + const ValueNode &sets = tuningData["sets"]; + if (!sets.isList()) { LOG(MaliC55Lsc, Error) << "LSC tables missing or invalid"; return -EINVAL; } size_t tableSize = 0; - const auto &sets = yamlSets.asList(); - for (const auto &yamlSet : sets) { - uint32_t ct = yamlSet["ct"].get(0); + for (const auto &set : sets.asList()) { + uint32_t ct = set["ct"].get(0); if (!ct) { LOG(MaliC55Lsc, Error) << "Invalid colour temperature"; @@ -50,11 +49,11 @@ int Lsc::init([[maybe_unused]] IPAContext &context, const ValueNode &tuningData) } std::vector rTable = - yamlSet["r"].get>().value_or(utils::defopt); + set["r"].get>().value_or(utils::defopt); std::vector gTable = - yamlSet["g"].get>().value_or(utils::defopt); + set["g"].get>().value_or(utils::defopt); std::vector bTable = - yamlSet["b"].get>().value_or(utils::defopt); + set["b"].get>().value_or(utils::defopt); /* * Some validation to do; only 16x16 and 32x32 tables of diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp index 9bb9d943163f..aace46a8d094 100644 --- a/src/ipa/rkisp1/algorithms/agc.cpp +++ b/src/ipa/rkisp1/algorithms/agc.cpp @@ -142,8 +142,8 @@ int Agc::init(IPAContext &context, const ValueNode &tuningData) if (ret) return ret; - const ValueNode &yamlMeteringModes = tuningData["AeMeteringMode"]; - ret = parseMeteringModes(context, yamlMeteringModes); + const ValueNode &meteringModes = tuningData["AeMeteringMode"]; + ret = parseMeteringModes(context, meteringModes); if (ret) return ret; diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index 25f7c512b35c..a7e3ef8b2eb9 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -184,20 +184,19 @@ public: { } - int parseLscData(const ValueNode &yamlSets, + int parseLscData(const ValueNode &sets, LensShadingCorrection::ShadingDescriptorMap &lscData); private: Size sensorSize_; }; -int LscPolynomialLoader::parseLscData(const ValueNode &yamlSets, +int LscPolynomialLoader::parseLscData(const ValueNode &sets, LensShadingCorrection::ShadingDescriptorMap &lscData) { - const auto &sets = yamlSets.asList(); - for (const auto &yamlSet : sets) { + for (const auto &set : sets.asList()) { std::optional pr, pgr, pgb, pb; - uint32_t ct = yamlSet["ct"].get(0); + uint32_t ct = set["ct"].get(0); if (lscData.count(ct)) { LOG(RkISP1Lsc, Error) @@ -206,10 +205,10 @@ int LscPolynomialLoader::parseLscData(const ValueNode &yamlSets, return -EINVAL; } - pr = yamlSet["r"].get(); - pgr = yamlSet["gr"].get(); - pgb = yamlSet["gb"].get(); - pb = yamlSet["b"].get(); + pr = set["r"].get(); + pgr = set["gr"].get(); + pgb = set["gb"].get(); + pb = set["b"].get(); if (!(pr || pgr || pgb || pb)) { LOG(RkISP1Lsc, Error) @@ -261,7 +260,7 @@ private: class LscTableLoader { public: - int parseLscData(const ValueNode &yamlSets, + int parseLscData(const ValueNode &sets, LensShadingCorrection::ShadingDescriptorMap &lscData); private: @@ -269,13 +268,11 @@ private: const char *prop); }; -int LscTableLoader::parseLscData(const ValueNode &yamlSets, +int LscTableLoader::parseLscData(const ValueNode &sets, LensShadingCorrection::ShadingDescriptorMap &lscData) { - const auto &sets = yamlSets.asList(); - - for (const auto &yamlSet : sets) { - uint32_t ct = yamlSet["ct"].get(0); + for (const auto &set : sets.asList()) { + uint32_t ct = set["ct"].get(0); if (lscData.count(ct)) { LOG(RkISP1Lsc, Error) @@ -284,14 +281,14 @@ int LscTableLoader::parseLscData(const ValueNode &yamlSets, return -EINVAL; } - LensShadingCorrection::Components set; - set.r = parseTable(yamlSet, "r"); - set.gr = parseTable(yamlSet, "gr"); - set.gb = parseTable(yamlSet, "gb"); - set.b = parseTable(yamlSet, "b"); + LensShadingCorrection::Components components; + components.r = parseTable(set, "r"); + components.gr = parseTable(set, "gr"); + components.gb = parseTable(set, "gb"); + components.b = parseTable(set, "b"); - if (set.r.empty() || set.gr.empty() || - set.gb.empty() || set.b.empty()) { + if (components.r.empty() || components.gr.empty() || + components.gb.empty() || components.b.empty()) { LOG(RkISP1Lsc, Error) << "Set for color temperature " << ct << " is missing tables"; @@ -299,7 +296,7 @@ int LscTableLoader::parseLscData(const ValueNode &yamlSets, } lscData.emplace( - ct, std::make_unique(std::move(set))); + ct, std::make_unique(std::move(components))); } if (lscData.empty()) { @@ -384,8 +381,8 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, return -EINVAL; /* Get all defined sets to apply. */ - const ValueNode &yamlSets = tuningData["sets"]; - if (!yamlSets.isList()) { + const ValueNode &sets = tuningData["sets"]; + if (!sets.isList()) { LOG(RkISP1Lsc, Error) << "'sets' parameter not found in tuning file"; return -EINVAL; @@ -398,7 +395,7 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, if (type == "table") { LOG(RkISP1Lsc, Debug) << "Loading tabular LSC data."; auto loader = LscTableLoader(); - ret = loader.parseLscData(yamlSets, lscData); + ret = loader.parseLscData(sets, lscData); } else if (type == "polynomial") { LOG(RkISP1Lsc, Debug) << "Loading polynomial LSC data."; /* @@ -406,7 +403,7 @@ int LensShadingCorrection::init([[maybe_unused]] IPAContext &context, * Let's wait how the internal discussions progress. */ auto loader = LscPolynomialLoader(context.sensorInfo.activeAreaSize); - ret = loader.parseLscData(yamlSets, lscData); + ret = loader.parseLscData(sets, lscData); } else { LOG(RkISP1Lsc, Error) << "Unsupported LSC data type '" << type << "'"; diff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp index c9462eed850e..1f7cd0842321 100644 --- a/src/ipa/rpi/controller/rpi/agc_channel.cpp +++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp @@ -31,9 +31,7 @@ LOG_DECLARE_CATEGORY(RPiAgc) int AgcMeteringMode::read(const libcamera::ValueNode ¶ms) { - const ValueNode &yamlWeights = params["weights"]; - - for (const auto &p : yamlWeights.asList()) { + for (const auto &p : params["weights"].asList()) { auto value = p.get(); if (!value) return -EINVAL; From patchwork Thu Jun 11 01:17:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26870 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 18412C3300 for ; Thu, 11 Jun 2026 01:17:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7C07261F40; Thu, 11 Jun 2026 03:17:34 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="wLlB1QVT"; 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 87CEB61F40 for ; Thu, 11 Jun 2026 03:17:30 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EFEBF673 for ; Thu, 11 Jun 2026 03:17:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140621; bh=lFNMkO5+jBe/Z3V6S6cMMoYj7AYz1ckX7F+A6GUsVrg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wLlB1QVTgsjwaXpl1rQM5nCxTk3cW9d2MU2cIYu1uHVxRPsS9ffqKc4lVZvCqoDVd f3F3e91LS/n6enNP+7zoJ87Phk270uGDRkwzgjEMpid5W6D/HRTLCQdHm3VAZeIR8W InzdZ/SnpegS04g1l5K8wmC84NcOBwSC0SRfZk88= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 5/6] libcamera: global_configuration: Drop "YAML" from function documentation Date: Thu, 11 Jun 2026 04:17:21 +0300 Message-ID: <20260611011722.1767689-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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 --- src/libcamera/global_configuration.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/global_configuration.cpp b/src/libcamera/global_configuration.cpp index 46a285c3c4ea..6556cc524424 100644 --- a/src/libcamera/global_configuration.cpp +++ b/src/libcamera/global_configuration.cpp @@ -258,7 +258,7 @@ unsigned int GlobalConfiguration::version() const * \brief Retrieve the libcamera global configuration * * This returns the whole configuration stored in the top-level section - * `%configuration` of the YAML configuration file. + * `%configuration` of the configuration file. * * The requested part of the configuration can be accessed using \a ValueNode * methods. @@ -274,7 +274,7 @@ const ValueNode &GlobalConfiguration::configuration() const * \fn std::optional GlobalConfiguration::option(const std::initializer_list &confPath) const * \brief Retrieve the value of configuration option \a confPath * \tparam T The type of the retrieved configuration value - * \param[in] confPath Sequence of the YAML section names (excluding + * \param[in] confPath Sequence of the section names (excluding * `%configuration`) leading to the requested option * \return The value of the configuration item corresponding to \a confPath if * it exists in the configuration file, or no value otherwise @@ -282,7 +282,7 @@ const ValueNode &GlobalConfiguration::configuration() const /** * \brief Retrieve the value of configuration option \a confPath - * \param[in] confPath Sequence of the YAML section names (excluding + * \param[in] confPath Sequence of the section names (excluding * `%configuration`) leading to the requested list option, separated by dots * \return A vector of strings or no value if not found */ From patchwork Thu Jun 11 01:17:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26871 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 C52A3C328C for ; Thu, 11 Jun 2026 01:17:35 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 72D8961F3D; Thu, 11 Jun 2026 03:17:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="e5vbDx8y"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D5EBF61F37 for ; Thu, 11 Jun 2026 03:17:31 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5918A673 for ; Thu, 11 Jun 2026 03:17:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1781140622; bh=ybjxsF5CBDBnkpzyLuEHefbgksKGMwqTap4Norv5tyk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e5vbDx8ypUvS4ozwCfyHaioO+VOKOqyJWkPJLTUvyRE/oajW4IXQCDAp5Dp0/4Qmn amCybnCdrJesGQRmE9VdOkZpWtwYx/MGOpDrzCdR2v78WYkueXwpSkcoxx+al7aQ/c G+Dr/jxLomkuRoPm92t1amefDvuSmZS4rE4GHBWE= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 6/6] libcamera: Replace last mentions of YAML Date: Thu, 11 Jun 2026 04:17:22 +0300 Message-ID: <20260611011722.1767689-7-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260611011722.1767689-1-laurent.pinchart@ideasonboard.com> References: <20260611011722.1767689-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" A few comments and log messages still mention YAML while they now relate to code operating on ValueNode. Replace them with value node or tuning data as appropriate for the context. Signed-off-by: Laurent Pinchart --- src/ipa/libipa/lux.cpp | 2 +- src/ipa/libipa/module.cpp | 10 +++++----- src/ipa/libipa/module.h | 2 +- src/ipa/libipa/pwl.cpp | 2 +- src/ipa/rkisp1/algorithms/dpcc.cpp | 2 +- src/ipa/rkisp1/algorithms/lsc.cpp | 6 +++--- src/libcamera/geometry.cpp | 2 +- src/libcamera/matrix.cpp | 2 +- src/libcamera/vector.cpp | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ipa/libipa/lux.cpp b/src/ipa/libipa/lux.cpp index 46cc63a115b5..12ba073a1165 100644 --- a/src/ipa/libipa/lux.cpp +++ b/src/ipa/libipa/lux.cpp @@ -80,7 +80,7 @@ Lux::Lux() * \brief Parse tuning data * \param[in] tuningData The ValueNode representing the tuning data * - * This function parses yaml tuning data for the common Lux module. It requires + * This function parses tuning data for the common Lux module. It requires * reference exposure time, analogue gain, digital gain, and lux values. * * \code{.unparsed} diff --git a/src/ipa/libipa/module.cpp b/src/ipa/libipa/module.cpp index 76e10e250b73..bd415eef59e1 100644 --- a/src/ipa/libipa/module.cpp +++ b/src/ipa/libipa/module.cpp @@ -85,14 +85,14 @@ namespace ipa { /** * \fn Module::createAlgorithms() - * \brief Create algorithms from YAML configuration data + * \brief Create algorithms from tuning data * \param[in] context The IPA context * \param[in] algorithms Algorithms configuration data as a parsed ValueNode * - * This function iterates over the list of \a algorithms parsed from the YAML - * configuration file, and instantiates and initializes the corresponding - * algorithms. The configuration data is expected to be correct, any error - * causes the function to fail and return immediately. + * This function iterates over the list of \a algorithms parsed from the tuning + * data, and instantiates and initializes the corresponding algorithms. The + * configuration data is expected to be correct, any error causes the function + * to fail and return immediately. * * Algorithms can optionally be disabled via the tuning file of the camera * module as shown here, with AGC being used as an example: diff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h index 3e2408ca30b6..5644458bdf3d 100644 --- a/src/ipa/libipa/module.h +++ b/src/ipa/libipa/module.h @@ -50,7 +50,7 @@ public: for (const auto &[i, algo] : utils::enumerate(list)) { if (!algo.isDictionary()) { LOG(IPAModuleAlgo, Error) - << "Invalid YAML syntax for algorithm " << i; + << "Invalid tuning data syntax for algorithm " << i; algorithms_.clear(); return -EINVAL; } diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp index 9fddd5bf70e2..652569d8577a 100644 --- a/src/ipa/libipa/pwl.cpp +++ b/src/ipa/libipa/pwl.cpp @@ -429,7 +429,7 @@ std::string Pwl::toString() const #ifndef __DOXYGEN__ /* - * The YAML data shall be a list of numerical values with an even number of + * The value node shall be a list of numerical values with an even number of * elements. They are parsed in pairs into x and y points in the piecewise * linear function, and added in order. x must be monotonically increasing. */ diff --git a/src/ipa/rkisp1/algorithms/dpcc.cpp b/src/ipa/rkisp1/algorithms/dpcc.cpp index eb8cbf2049c5..20b35d29cbcd 100644 --- a/src/ipa/rkisp1/algorithms/dpcc.cpp +++ b/src/ipa/rkisp1/algorithms/dpcc.cpp @@ -74,7 +74,7 @@ int DefectPixelClusterCorrection::init([[maybe_unused]] IPAContext &context, const ValueNode &set = setsObject[i]; uint16_t value; - /* Enable set if described in YAML tuning file. */ + /* Enable set if described in tuning data. */ config_.set_use |= 1 << i; /* PG Method */ diff --git a/src/ipa/rkisp1/algorithms/lsc.cpp b/src/ipa/rkisp1/algorithms/lsc.cpp index a7e3ef8b2eb9..faf88effde01 100644 --- a/src/ipa/rkisp1/algorithms/lsc.cpp +++ b/src/ipa/rkisp1/algorithms/lsc.cpp @@ -61,9 +61,9 @@ namespace ipa::rkisp1::algorithms { * Due to the optical characteristics of the lens, the light intensity received * by the sensor is not uniform. * - * The Lens Shading Correction algorithm applies multipliers to all pixels - * to compensate for the lens shading effect. The coefficients are - * specified in a downscaled table in the YAML tuning file. + * The Lens Shading Correction algorithm applies multipliers to all pixels to + * compensate for the lens shading effect. The coefficients are specified in a + * downscaled table in the tuning data. */ LOG_DEFINE_CATEGORY(RkISP1Lsc) diff --git a/src/libcamera/geometry.cpp b/src/libcamera/geometry.cpp index 010c1d8c35d9..11e57a84d785 100644 --- a/src/libcamera/geometry.cpp +++ b/src/libcamera/geometry.cpp @@ -928,7 +928,7 @@ std::ostream &operator<<(std::ostream &out, const Rectangle &r) #ifndef __DOXYGEN__ /* - * The YAML data shall be a list of two numerical values containing the x and y + * The value node shall be a list of two numerical values containing the x and y * coordinates, in that order. */ template<> diff --git a/src/libcamera/matrix.cpp b/src/libcamera/matrix.cpp index e4fb8d35314d..0950408bb838 100644 --- a/src/libcamera/matrix.cpp +++ b/src/libcamera/matrix.cpp @@ -310,7 +310,7 @@ template bool matrixInvert(Span data, Span dataOut Span swapBuffer); /* - * The YAML data shall be a list of numerical values. Its size shall be equal + * The value node shall be a list of numerical values. Its size shall be equal * to the product of the number of rows and columns of the matrix (Rows x * Cols). The values shall be stored in row-major order. */ diff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp index d850a581e32b..47b3d1af36d9 100644 --- a/src/libcamera/vector.cpp +++ b/src/libcamera/vector.cpp @@ -358,7 +358,7 @@ bool vectorValidateValueNode(const ValueNode &obj, unsigned int size) if (obj.size() != size) { LOG(Vector, Error) - << "Wrong number of values in YAML vector: expected " + << "Wrong number of values in vector: expected " << size << ", got " << obj.size(); return false; }