Patch Detail
Show a patch.
GET /api/1.1/patches/25081/?format=api
{ "id": 25081, "url": "https://patchwork.libcamera.org/api/1.1/patches/25081/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25081/", "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": "<20251119132221.2088013-2-stefan.klug@ideasonboard.com>", "date": "2025-11-19T13:22:10", "name": "[v3,1/4] ipa: libipa: pwl: Allow to parse a plain yaml value as single point PWL", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "d66a365cc0228891965c4574cf5b4497fde75f2b", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25081/mbox/", "series": [ { "id": 5595, "url": "https://patchwork.libcamera.org/api/1.1/series/5595/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5595", "date": "2025-11-19T13:22:09", "name": "libipa: agc: Fix constraints yTarget handling and add PWL support", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5595/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25081/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25081/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 DBBF7BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 19 Nov 2025 13:22:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 997BE60A85;\n\tWed, 19 Nov 2025 14:22:30 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E5C4609E0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 19 Nov 2025 14:22:28 +0100 (CET)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:5419:7bb:83a3:3d7a])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 19CB0E7C;\n\tWed, 19 Nov 2025 14:20:24 +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=\"ShQSPrJ4\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763558424;\n\tbh=CdWXJ5t7eaOtaT/R2RO/4FKGUFV2VxnNYGIYdhgd6gk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=ShQSPrJ4/F5T2qfzerkyRUWfqMWJytfYULLYzBIJKcmxRfDGYsvCk1GYBPY102Iti\n\tdcoUMucrOxahJbuk/iZ5SKpPsjC8XjN1bUxaNuCiX3oOtfF4BbhrCbSUEztDvAjLD8\n\tnWkKEzFqd7VR/h8t6hqKWuBV215m2Vt09gwBxkV0=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tDaniel Scally <dan.scally@ideasonboard.com>", "Subject": "[PATCH v3 1/4] ipa: libipa: pwl: Allow to parse a plain yaml value\n\tas single point PWL", "Date": "Wed, 19 Nov 2025 14:22:10 +0100", "Message-ID": "<20251119132221.2088013-2-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251119132221.2088013-1-stefan.klug@ideasonboard.com>", "References": "<20251119132221.2088013-1-stefan.klug@ideasonboard.com>", "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": "In the tuning files, it is useful to specify some values as PWL that\nproduces a different output value depending on an input value. For\nexample it is useful to specify the relativeLuminanceTarget depending on\nthe lux level, so that the regulation regulates a bit darker in low\nlight scenes. For simple setups this is not necessary and a single value\nis sufficient.\n\nThis patch extends the yaml loading code, so that either case is\nsupported transparently without the need for additional external code.\nThis way the following yaml expressions are all valid:\n\nyTarget: [ 1000, 0.15, 2000, 0.17 ] # Regular PWL\nyTarget: [ 0, 0.17 ] # Single point PWL\nyTarget: 0.17 # Same as above\n\nFor cases (I'm not aware of any) where a single point Pwl is not allowed\nthere is no change as that must be checked externally anyways.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n\n---\n\nChanges in v3:\n- Collected tags\n\nChanges in v2:\n- Added this patch\n---\n src/ipa/libipa/pwl.cpp | 9 +++++++++\n 1 file changed, 9 insertions(+)", "diff": "diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\nindex 69a9334112e8..78ba43e39b77 100644\n--- a/src/ipa/libipa/pwl.cpp\n+++ b/src/ipa/libipa/pwl.cpp\n@@ -437,6 +437,15 @@ template<>\n std::optional<ipa::Pwl>\n YamlObject::Getter<ipa::Pwl>::get(const YamlObject &obj) const\n {\n+\t/* Treat a single value as single point PWL */\n+\tif (obj.isValue()) {\n+\t\tauto v = obj.get<double>();\n+\t\tif (!v)\n+\t\t\treturn std::nullopt;\n+\n+\t\treturn ipa::Pwl({ { { 0.0, *v } } });\n+\t}\n+\n \tif (!obj.size() || obj.size() % 2)\n \t\treturn std::nullopt;\n \n", "prefixes": [ "v3", "1/4" ] }