Patch Detail
Show a patch.
GET /api/1.1/patches/25148/?format=api
{ "id": 25148, "url": "https://patchwork.libcamera.org/api/1.1/patches/25148/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25148/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20251121113411.111096-1-isaac.scott@ideasonboard.com>", "date": "2025-11-21T11:34:11", "name": "[v3] libipa: module: Allow algorithms to be disabled via the tuning file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "d26acc07a0fe8dd1c77bba72b81e52319b88dfa2", "submitter": { "id": 215, "url": "https://patchwork.libcamera.org/api/1.1/people/215/?format=api", "name": "Isaac Scott", "email": "isaac.scott@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25148/mbox/", "series": [ { "id": 5601, "url": "https://patchwork.libcamera.org/api/1.1/series/5601/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5601", "date": "2025-11-21T11:34:11", "name": "[v3] libipa: module: Allow algorithms to be disabled via the tuning file", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5601/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25148/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25148/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 A40F4BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 Nov 2025 11:34:17 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FA6760A80;\n\tFri, 21 Nov 2025 12:34:17 +0100 (CET)", "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 71A2E60805\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 Nov 2025 12:34:16 +0100 (CET)", "from isaac-ThinkPad-T16-Gen-2.infra.iob\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 870E79CA;\n\tFri, 21 Nov 2025 12:32:10 +0100 (CET)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Oslrzfoz\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763724730;\n\tbh=rGnmKyrbTOBk8N4Mfyo5+0Xvn4O7Jd88yqmcIamMrIs=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=Oslrzfozxw5HdcE5JThycOvT6tDEcy9sQzrz8AiPCbRLF2GCdA3ykS5ylfssyvNDF\n\t4ujCMzdk2mQZdeZx360tPwawveIA6Cyt/ucro6p9lG3FLjNvjLtnpNKZsrsjVosONh\n\teuuQTEZCenythHfuV4a0NiuO+JBzYQo8jGBd1Qfs=", "From": "Isaac Scott <isaac.scott@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Isaac Scott <isaac.scott@ideasonboard.com>", "Subject": "[PATCH v3] libipa: module: Allow algorithms to be disabled via the\n\ttuning file", "Date": "Fri, 21 Nov 2025 11:34:11 +0000", "Message-ID": "<20251121113411.111096-1-isaac.scott@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "It is beneficial to have the option during development to disable and\nenable algorithms via the tuning file without having to delete their\nentries.\n\nAdd support for an optional \"enabled\" parameter to accomplish this.\n\nUsage example:\nversion: 1\nalgorithms:\n - Agc:\n enabled: true\n - Awb:\n enabled: false\n\nThis will enable AGC, and disable AWB. If the enabled flag is not\npresent, the algorithm will be enabled.\n\nSigned-off-by: Isaac Scott <isaac.scott@ideasonboard.com>\n\n---\n\nv1 of this patch can be found here:\n\nhttps://patchwork.libcamera.org/patch/23299/\n\nChangelog:\n\nv2 -> v3:\n- Moved parsing back to createAlgorithm().\n- Added documentation to module.cpp.\n- Ensured the 'enabled' flag is part of the algoData for an\n algorithm to help avoid ambiguity.\n\nv1 -> v2:\n- Moved parsing to createAlgorithms() instead of createAlgorithm()\n- Changed \"disabled\" flag to \"enabled: [boolean]\"\n---\n src/ipa/libipa/module.cpp | 8 ++++++++\n src/ipa/libipa/module.h | 11 +++++++++++\n 2 files changed, 19 insertions(+)", "diff": "diff --git a/src/ipa/libipa/module.cpp b/src/ipa/libipa/module.cpp\nindex 64ca91419..f142c5257 100644\n--- a/src/ipa/libipa/module.cpp\n+++ b/src/ipa/libipa/module.cpp\n@@ -94,6 +94,14 @@ namespace ipa {\n * algorithms. The configuration data is expected to be correct, any error\n * causes the function to fail and return immediately.\n *\n+ * Algorithms can optionally be disabled via the tuning file of the camera module\n+ * as shown here, with AGC being used as an example:\n+ *\n+ * - Agc:\n+ * enabled: false\n+ *\n+ * If this is the case, the algorithm will not be instantiated.\n+ *\n * \\return 0 on success, or a negative error code on failure\n */\n \ndiff --git a/src/ipa/libipa/module.h b/src/ipa/libipa/module.h\nindex 116cb8968..0b3b84219 100644\n--- a/src/ipa/libipa/module.h\n+++ b/src/ipa/libipa/module.h\n@@ -82,6 +82,17 @@ private:\n \t\t\treturn -EINVAL;\n \t\t}\n \n+\t\t/*\n+\t\t * Optionally, algorithms can be disabled via the tuning file by including\n+\t\t * enabled: false as a parameter within the algorithm tuning data.\n+\t\t * This is not an error, so we return 0.\n+\t\t */\n+\t\tif (!algoData[\"enabled\"].get<bool>(true)) {\n+\t\t\tLOG(IPAModuleAlgo, Debug)\n+\t\t\t\t<< \"Algorithm '\" << name << \"' disabled via tuning file\";\n+\t\t\treturn 0;\n+\t\t}\n+\n \t\tint ret = algo->init(context, algoData);\n \t\tif (ret) {\n \t\t\tLOG(IPAModuleAlgo, Error)\n", "prefixes": [ "v3" ] }