Patch Detail
Show a patch.
GET /api/patches/27649/?format=api
{ "id": 27649, "url": "https://patchwork.libcamera.org/api/patches/27649/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27649/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260805-libipa-algorithms-v7-29-7425b5b795d4@ideasonboard.com>", "date": "2026-08-05T16:13:11", "name": "[v7,29/32] ipa: libipa: lsc: Re-sort LscAlgorithmBase documentation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1cc6dbc3fc96c7b543e41f7ac6b979973638b6b7", "submitter": { "id": 143, "url": "https://patchwork.libcamera.org/api/people/143/?format=api", "name": "Jacopo Mondi", "email": "jacopo.mondi@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/27649/mbox/", "series": [ { "id": 6110, "url": "https://patchwork.libcamera.org/api/series/6110/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6110", "date": "2026-08-05T16:12:42", "name": "ipa: libipa: Introduce libipa algorithms", "version": 7, "mbox": "https://patchwork.libcamera.org/series/6110/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27649/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27649/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AFF43C334A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 5 Aug 2026 16:13:59 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4157368178;\n\tWed, 5 Aug 2026 18:13:59 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E34E68143\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 5 Aug 2026 18:13:43 +0200 (CEST)", "from [192.168.125.177] (mob-109-113-25-35.net.vodafone.it\n\t[109.113.25.35])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AABE03AE4;\n\tWed, 5 Aug 2026 18:12:32 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VUO/vHu4\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1785946353;\n\tbh=u9V2JQQr/lPa1Mq/Jr0a/zN5b1A53nax81FRD0HfLtU=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=VUO/vHu4HtC6QH3pGvxac8zIXiySAPCW58IW81yDftvvx4V9w2iJVtI6af1YGmpAa\n\t4GlkUt3/pjv1AcsA2kuVVLtcKLeaw0gxY58BpD3DcqwmidYwgk4hkZYzanIwpRKT2+\n\tACEy6yKiQ5BHzoyRndF2l7ZmX/uitq7x2wrftB/w=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Wed, 05 Aug 2026 18:13:11 +0200", "Subject": "[PATCH v7 29/32] ipa: libipa: lsc: Re-sort LscAlgorithmBase\n\tdocumentation", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260805-libipa-algorithms-v7-29-7425b5b795d4@ideasonboard.com>", "References": "<20260805-libipa-algorithms-v7-0-7425b5b795d4@ideasonboard.com>", "In-Reply-To": "<20260805-libipa-algorithms-v7-0-7425b5b795d4@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org, \n\tStefan Klug <stefan.klug@ideasonboard.com>, \n\tMilan Zamazal <mzamazal@redhat.com>", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "X-Mailer": "b4 0.16-dev", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=6732;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=u9V2JQQr/lPa1Mq/Jr0a/zN5b1A53nax81FRD0HfLtU=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqc2EiBKf3Y5S3cpZARC9ZusmHEl3vjyMHioNb2\n\tafQwmFnZ/qJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCanNhIgAKCRByNAaPFqFW\n\tPJ1dD/sHz/j7GhS+cghsIfoljtP3WbQbfphnUl/qJEC9DXvGI2iJmSxLpOvVcFlyo2D3AidrAQZ\n\tOHBcZDNUvNRE5ZNboaQF7uiH+MJnZrMMB7M7Wz4gxQT41qWmPC5MAjEdga/SL+rLiQdHbOEd4fb\n\tDmvfunbr0MeLdeMFb67Wh/m9UodOmV0UAPT8LpepIccNDyH12hc/MEAhuZni3elHEIllRFHurDs\n\tVk/nK4s4NA9iWPapjDwKgxz5Aa/8yIFsRENSPD3BjwbNM8UfCy34ibZ3r3zl4fEC4apzXuNfse+\n\tLeUY6vZ5DJvvYG895ZKk0ISA++SBqxNsoF+KOqajwGKAXTG/nf2DU1MKJ4ZlVtNuijAB1pC0wwA\n\t8ySSEWMBn+RDxFS4Y4w8OKAPb8WzElQr657I312neZSiygpLRxFbxKRxyaxSStZq13Y823L54nv\n\tCB5K6Z77y62aBcC1xSyQNXS5GXYY+E6ilNUPmDCJhBZtwlQLCrIww61qSpEyq8f0Z1eq07z3Hd0\n\tZzAGqTVQ9mJRVITEZNFL+IqO7s2Ba3LiRscn04su85d3RvUOYgl6vbWHhi6wOF1aR5W2s8YY5p9\n\tbI6061lcb//XgY7dio3Fkt8s+pU6CYDB1CW+IKw93AffKNp9MS/wYYxPjVwopOBC1e0fywUwm4q\n\t+4f9mB8mJyAydEQ==", "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The documentation had not been resorted in the previous patch\nto keep the diff short.\n\nRe-sort the documentation of the LscAlgorithmBase and LscAlgorithm\nclasses to match the declaration order.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/ipa/libipa/lsc.cpp | 168 ++++++++++++++++++++++++-------------------------\n 1 file changed, 84 insertions(+), 84 deletions(-)", "diff": "diff --git a/src/ipa/libipa/lsc.cpp b/src/ipa/libipa/lsc.cpp\nindex bb02290fc9ad..a8b89bcedf57 100644\n--- a/src/ipa/libipa/lsc.cpp\n+++ b/src/ipa/libipa/lsc.cpp\n@@ -111,6 +111,90 @@ void Interpolator<lsc::Components<uint16_t>>::\n * Base class for LscAlgorithm for non-templated functions implementation\n */\n \n+/**\n+ * \\param[in] tuningData The tuning data\n+ * \\param[in] controls The IPA list of supported controls\n+ * \\param[in] descriptor The LSC engine descriptor\n+ *\n+ * Parse \\a tuningData according to the settings specified in \\a descriptor to\n+ * populate the LSC data and registers LSC controls in \\a controls.\n+ *\n+ * \\return 0 on success, a negative error code otherwise\n+ */\n+int LscAlgorithmBase::init(const ValueNode &tuningData, ControlInfoMap::Map &controls,\n+\t\t\t const LscDescriptor &descriptor)\n+{\n+\tpolynomial_ = false;\n+\n+\tstd::string type = tuningData[\"type\"].get<std::string>(\"table\");\n+\tif (type == \"table\") {\n+\t\timpl_ = std::make_unique<LscTable>();\n+\t\tLOG(Lsc, Debug) << \"Using table-based Lsc\";\n+\t} else if (type == \"polynomial\") {\n+\t\timpl_ = std::make_unique<LscPolynomial>();\n+\t\tpolynomial_ = true;\n+\t\tLOG(Lsc, Debug) << \"Using polynomial Lsc\";\n+\t} else {\n+\t\tLOG(Lsc, Error) << \"Unsupported Lsc algorithm '\"\n+\t\t\t\t<< type << \"'\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tconst ValueNode &yamlSets = tuningData[\"sets\"];\n+\tif (!yamlSets.isList()) {\n+\t\tLOG(Lsc, Error) << \"'sets' parameter not found in tuning file\";\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tint ret = impl_->parseLscData(yamlSets, descriptor);\n+\tif (ret)\n+\t\treturn ret;\n+\n+\tcontrols[&controls::LensShadingCorrectionEnable] =\n+\t\tControlInfo(false, true, true);\n+\n+\treturn 0;\n+}\n+\n+/**\n+ * \\brief Queue a request to the lsc algorithm\n+ * \\param[in] state The lsc active state\n+ * \\param[in] context The lsc frame context\n+ * \\param[in] controls The list of controls associated with a Request\n+ *\n+ * Queue a new list of \\a controls to the lsc algorithm.\n+ * The only supported control is controls::LensShadingCorrectionEnable.\n+ */\n+void LscAlgorithmBase::queueRequest(lsc::ActiveState &state,\n+\t\t\t\t lsc::FrameContext &context,\n+\t\t\t\t const ControlList &controls)\n+{\n+\tconst auto &lscEnable = controls.get(controls::LensShadingCorrectionEnable);\n+\tif (lscEnable && *lscEnable != state.enabled) {\n+\t\tstate.enabled = *lscEnable;\n+\n+\t\tLOG(Lsc, Debug)\n+\t\t\t<< (state.enabled ? \"Enabling\" : \"Disabling\") << \" Lsc\";\n+\n+\t\tcontext.update = true;\n+\t}\n+\n+\tcontext.enabled = state.enabled;\n+}\n+\n+/**\n+ * \\brief Populate the list of lsc metadata\n+ * \\param[in] context The lsc frame context\n+ * \\param[in] metadata The list of metadata\n+ *\n+ * Populates the list of \\a metadata with controls handled by the LscAlgorithm\n+ * class. The only supported metadata is controls::LensShadingCorrectionEnable.\n+ */\n+void LscAlgorithmBase::process(lsc::FrameContext &context, ControlList &metadata)\n+{\n+\tmetadata.set(controls::LensShadingCorrectionEnable, context.enabled);\n+}\n+\n /**\n * \\var LscAlgorithmBase::impl_\n * \\brief The LSC algorithm implementation\n@@ -287,51 +371,6 @@ void Interpolator<lsc::Components<uint16_t>>::\n * can retrieve them using LscAlgorithm::getComponents().\n */\n \n-/**\n- * \\param[in] tuningData The tuning data\n- * \\param[in] controls The IPA list of supported controls\n- * \\param[in] descriptor The LSC engine descriptor\n- *\n- * Parse \\a tuningData according to the settings specified in \\a descriptor to\n- * populate the LSC data and registers LSC controls in \\a controls.\n- *\n- * \\return 0 on success, a negative error code otherwise\n- */\n-int LscAlgorithmBase::init(const ValueNode &tuningData, ControlInfoMap::Map &controls,\n-\t\t\t const LscDescriptor &descriptor)\n-{\n-\tpolynomial_ = false;\n-\n-\tstd::string type = tuningData[\"type\"].get<std::string>(\"table\");\n-\tif (type == \"table\") {\n-\t\timpl_ = std::make_unique<LscTable>();\n-\t\tLOG(Lsc, Debug) << \"Using table-based Lsc\";\n-\t} else if (type == \"polynomial\") {\n-\t\timpl_ = std::make_unique<LscPolynomial>();\n-\t\tpolynomial_ = true;\n-\t\tLOG(Lsc, Debug) << \"Using polynomial Lsc\";\n-\t} else {\n-\t\tLOG(Lsc, Error) << \"Unsupported Lsc algorithm '\"\n-\t\t\t\t<< type << \"'\";\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tconst ValueNode &yamlSets = tuningData[\"sets\"];\n-\tif (!yamlSets.isList()) {\n-\t\tLOG(Lsc, Error) << \"'sets' parameter not found in tuning file\";\n-\t\treturn -EINVAL;\n-\t}\n-\n-\tint ret = impl_->parseLscData(yamlSets, descriptor);\n-\tif (ret)\n-\t\treturn ret;\n-\n-\tcontrols[&controls::LensShadingCorrectionEnable] =\n-\t\tControlInfo(false, true, true);\n-\n-\treturn 0;\n-}\n-\n /**\n * \\fn LscAlgorithm::configure()\n * \\brief Re-sample and quantize LSC data\n@@ -361,45 +400,6 @@ int LscAlgorithmBase::init(const ValueNode &tuningData, ControlInfoMap::Map &con\n * \\return 0 on success, a negative error code otherwise\n */\n \n-/**\n- * \\brief Queue a request to the lsc algorithm\n- * \\param[in] state The lsc active state\n- * \\param[in] context The lsc frame context\n- * \\param[in] controls The list of controls associated with a Request\n- *\n- * Queue a new list of \\a controls to the lsc algorithm.\n- * The only supported control is controls::LensShadingCorrectionEnable.\n- */\n-void LscAlgorithmBase::queueRequest(lsc::ActiveState &state,\n-\t\t\t\t lsc::FrameContext &context,\n-\t\t\t\t const ControlList &controls)\n-{\n-\tconst auto &lscEnable = controls.get(controls::LensShadingCorrectionEnable);\n-\tif (lscEnable && *lscEnable != state.enabled) {\n-\t\tstate.enabled = *lscEnable;\n-\n-\t\tLOG(Lsc, Debug)\n-\t\t\t<< (state.enabled ? \"Enabling\" : \"Disabling\") << \" Lsc\";\n-\n-\t\tcontext.update = true;\n-\t}\n-\n-\tcontext.enabled = state.enabled;\n-}\n-\n-/**\n- * \\brief Populate the list of lsc metadata\n- * \\param[in] context The lsc frame context\n- * \\param[in] metadata The list of metadata\n- *\n- * Populates the list of \\a metadata with controls handled by the LscAlgorithm\n- * class. The only supported metadata is controls::LensShadingCorrectionEnable.\n- */\n-void LscAlgorithmBase::process(lsc::FrameContext &context, ControlList &metadata)\n-{\n-\tmetadata.set(controls::LensShadingCorrectionEnable, context.enabled);\n-}\n-\n /**\n * \\fn LscAlgorithm::interpolateComponents\n * \\brief Interpolate the LSC tables for a given colour temperature\n", "prefixes": [ "v7", "29/32" ] }