Patch Detail
Show a patch.
GET /api/1.1/patches/23558/?format=api
{ "id": 23558, "url": "https://patchwork.libcamera.org/api/1.1/patches/23558/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23558/", "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": "<20250613100947.589875-3-stefan.klug@ideasonboard.com>", "date": "2025-06-13T10:09:37", "name": "[v2,2/4] libipa: pwl: Improve documentation", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "5e1a2d9b293d35b03c6114bb44cc8199ec48334c", "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/23558/mbox/", "series": [ { "id": 5217, "url": "https://patchwork.libcamera.org/api/1.1/series/5217/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5217", "date": "2025-06-13T10:09:35", "name": "ipa: pwl: Fixes for single point PWLs", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5217/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23558/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23558/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 83C4BBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 13 Jun 2025 10:10:13 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C5E0468DC4;\n\tFri, 13 Jun 2025 12:10:11 +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 CC3FE68DBD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 13 Jun 2025 12:10:08 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:37bc:6352:9b26:2f94])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 741DC56D;\n\tFri, 13 Jun 2025 12:09:59 +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=\"SY58bHMD\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1749809399;\n\tbh=5DiqzN8HEsFS9cHqGWYTO0rnQSzdPwpkQLvhfXtqJog=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SY58bHMDsMPV5tyQIMUJ9BA4H2XfWmtVzX03NuiBpL1411kNjTH41XzDBgjRDvH0e\n\tLrNV2QTCgE/v+zLJp8/vQ/YEYlBiqCkfE6r3IUKaAojtKWY/vMOcaL5SyCpJIot+JE\n\t0h2p5PmRSd2g9ijwGdnSlIe7SMrwWxQbsGIk5czY=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v2 2/4] libipa: pwl: Improve documentation", "Date": "Fri, 13 Jun 2025 12:09:37 +0200", "Message-ID": "<20250613100947.589875-3-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "In-Reply-To": "<20250613100947.589875-1-stefan.klug@ideasonboard.com>", "References": "<20250613100947.589875-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": "If a Pwl is evaluated outside of the domain, it gets extrapolated\nlinearly. Fix the documentation as it states otherwise.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/libipa/pwl.cpp | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp\nindex 3fa005ba92df..3d2188170d83 100644\n--- a/src/ipa/libipa/pwl.cpp\n+++ b/src/ipa/libipa/pwl.cpp\n@@ -35,14 +35,13 @@ namespace ipa {\n *\n * https://en.wikipedia.org/wiki/Piecewise_linear_function\n *\n- * A consequence of the Pwl class being defined by knots instead of linear\n- * functions is that the values of the piecewise linear function past the ends\n- * of the function are constants as opposed to linear functions. In a\n- * mathematical piecewise linear function that is defined by multiple linear\n- * functions, the ends of the function are also linear functions and hence grow\n- * to infinity (or negative infinity). However, since this Pwl class is defined\n- * by knots, the y-value of the leftmost and rightmost knots will hold for all\n- * x values to negative infinity and positive infinity, respectively.\n+ * Outside the domain of the piecewise linear function the closest segment is\n+ * extrapolated linearly. If one wants to ensure that the returned values stay\n+ * within the range of the pwl, the input can be clamped:\n+ *\n+ * \\code{.cpp}\n+ * pwl.eval(pwl.domain().clip(x))\n+ * \\endcode\n */\n \n /**\n", "prefixes": [ "v2", "2/4" ] }