Patch Detail
Show a patch.
GET /api/patches/27421/?format=api
{ "id": 27421, "url": "https://patchwork.libcamera.org/api/patches/27421/?format=api", "web_url": "https://patchwork.libcamera.org/patch/27421/", "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": "<20260720-libipa-algorithms-v6-29-ececb73f97cb@ideasonboard.com>", "date": "2026-07-20T14:59:47", "name": "[v6,29/31] ipa: libipa: lsc: Re-sort LscAlgorithmBase documentation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "40827e802a0bde0f8b7da6a97e48a1a6ee688913", "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/27421/mbox/", "series": [ { "id": 6067, "url": "https://patchwork.libcamera.org/api/series/6067/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=6067", "date": "2026-07-20T14:59:18", "name": "ipa: libipa: Introduce libipa algorithms", "version": 6, "mbox": "https://patchwork.libcamera.org/series/6067/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/27421/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/27421/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 D8B0CC333E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 20 Jul 2026 15:00:23 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 71C0D67EC0;\n\tMon, 20 Jul 2026 17:00:23 +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 4B2FC67E52\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 20 Jul 2026 16:59:57 +0200 (CEST)", "from [192.168.1.106] (mob-5-90-63-152.net.vodafone.it\n\t[5.90.63.152])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6FEDD33A5;\n\tMon, 20 Jul 2026 16:58:58 +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=\"vzATD6+Y\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1784559538;\n\tbh=z/2FHW4blFgIZFDkrKhTDQPDwONQEdKNRjBHv0iCkEQ=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=vzATD6+YIhrU3l2A9SyJZ9GgQ0YoJ3tslvR0YfCkmXRxgwgN+S1GHN81mM5yAkEhE\n\tCVleia5UKua9MuCnks+ofqRilgnMgTOR/fZYU0RUsI3dUDujoI903XxHq5TPtUuy9M\n\toKFE9/ou9KWpPJDDLg5TjWFSECuA6i9CMKnI+FXI=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Mon, 20 Jul 2026 16:59:47 +0200", "Subject": "[PATCH v6 29/31] 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": "<20260720-libipa-algorithms-v6-29-ececb73f97cb@ideasonboard.com>", "References": "<20260720-libipa-algorithms-v6-0-ececb73f97cb@ideasonboard.com>", "In-Reply-To": "<20260720-libipa-algorithms-v6-0-ececb73f97cb@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.14.3", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=6638;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=z/2FHW4blFgIZFDkrKhTDQPDwONQEdKNRjBHv0iCkEQ=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqXjfb+IlfP7c8YOh4yFppclv2NuORoaWnmzG+j\n\tVegZ6u8aDGJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCal432wAKCRByNAaPFqFW\n\tPMhmD/9ek6XyI1uP1HE0gkFZPyCiUtH+/SIWk6imtmzpIcEAIgY8uIK0Y0vD/nNhA2s7fmyDdKh\n\t1cdxhJ5YbXFh8CfXZMgVQopUc8hNzU15fvCJzPlKW18X3Wd+2ysoDJ8MzdMEPihDrB3Dx2zcbUJ\n\tK5YHbveguugy/M1rtABU5i8DMo8bX3sGrhEjqg6ao1yrUE/W5edot/FIQbPbdOClovhPg9LU/oW\n\t2cl5A5bBg73vnyEU6qEKA91tDgwb5t+L3xFDKhD20cTHmxMMhS3fqssibX9wC/4mf1+WZNMP89g\n\ti3YziHYzwKUvgcuZEhjRflGidXmSbiMnkbE82K7NN8XAMVA9rtsycxO2i+nmfTptGeCNjoio1hA\n\tXv44+h5q4B6EOVOT4o5Pgy6e3LpwoDwQo0X4TR6u3CITLjok77zphdbBVRRouIcL9zBKdfHQeI+\n\texvRKOI5Vyw4lcvOYYNyvbAObImtHIldQWLnrLz/xt9kR0ZAFl93mUMegGUQb43HUYidbBmD8Dk\n\twKtTV8zTGcaWHnWYoKL98Kb6SJH80KP8OKBTDNET2vYdgCvr9y6YvLrawTtIhGESWI4/0g7ZUh0\n\t5IybK1IYJkT6cQty3eUs018cGmWNEoV+olkDUkVFedVekuWhSFlLRuorTCvBmFeba1LP35/Qov3\n\t6uZiSVTnpshByRg==", "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 8f881edef94c..adaae253b740 100644\n--- a/src/ipa/libipa/lsc.cpp\n+++ b/src/ipa/libipa/lsc.cpp\n@@ -55,6 +55,90 @@ namespace lsc {\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@@ -232,51 +316,6 @@ namespace lsc {\n * \\brief Map a colour temperature to an LSC componenet\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 * \\param[in] state The LSC active state\n@@ -300,45 +339,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::getInterpolator\n * \\brief Retrieve the LSC tables interpolator\n", "prefixes": [ "v6", "29/31" ] }