Patch Detail
Show a patch.
GET /api/1.1/patches/22410/?format=api
{ "id": 22410, "url": "https://patchwork.libcamera.org/api/1.1/patches/22410/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22410/", "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": "<20241219175729.293782-3-stefan.klug@ideasonboard.com>", "date": "2024-12-19T17:57:19", "name": "[v6,2/9] ipa: rkisp1: awb: Load white balance gains from tuning file", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "73c6c105328716632dc14045ed6542264741f313", "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/22410/mbox/", "series": [ { "id": 4919, "url": "https://patchwork.libcamera.org/api/1.1/series/4919/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4919", "date": "2024-12-19T17:57:17", "name": "rkisp1: Add manual colour temperature control", "version": 6, "mbox": "https://patchwork.libcamera.org/series/4919/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22410/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22410/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 6A7C0C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Dec 2024 17:57:43 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ACCC66847E;\n\tThu, 19 Dec 2024 18:57:41 +0100 (CET)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B08E61899\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Dec 2024 18:57:39 +0100 (CET)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:783:85f9:c998:cb11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 523346D6;\n\tThu, 19 Dec 2024 18:57:00 +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=\"BRD8whS+\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1734631020;\n\tbh=3kYmJGs6xN+tkPCw4zkGSo7C8b1y2iHIEh4PeJ1uMD8=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=BRD8whS+j5ycMDqsp1fbIHq4RHO+yD3XePsUb4Lz0Ry43znhfNZ+uM0sIYmHHK0mG\n\tj+qFVbH83+YXK/1vKjjRYvD8yttbCZOZhtU1herOxgKzTQ60wYrrAybWW/yEA6L/72\n\tev5r63lDDbkuglrm77wz/Q6ZXaPUuvfSDceDqxjM=", "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\tPaul Elder <paul.elder@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>", "Subject": "[PATCH v6 2/9] ipa: rkisp1: awb: Load white balance gains from\n\ttuning file", "Date": "Thu, 19 Dec 2024 18:57:19 +0100", "Message-ID": "<20241219175729.293782-3-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20241219175729.293782-1-stefan.klug@ideasonboard.com>", "References": "<20241219175729.293782-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": "For the implementation of a manual colour temperature setting, it is\nnecessary to read predefined colour gains per colour temperature from\nthe tuning file. Implement this in a backwards compatible way. If no\ngains are contained in the tuning file, loading just continues as\nbefore.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v6:\n- Rename gains_ to colourGainCurve_\n- Rename gains to colourGains in tuning file\n\nChanges in v5:\n- Replace Interpolator<Matrix> with Interpolator<Vector>\n---\n src/ipa/rkisp1/algorithms/awb.cpp | 18 ++++++++++++++++++\n src/ipa/rkisp1/algorithms/awb.h | 7 +++++++\n 2 files changed, 25 insertions(+)", "diff": "diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex 4bb4f5b88375..e23f67a96edf 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -41,6 +41,24 @@ Awb::Awb()\n {\n }\n \n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::init\n+ */\n+int Awb::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData)\n+{\n+\tInterpolator<Vector<double, 2>> gainCurve;\n+\tint ret = gainCurve.readYaml(tuningData[\"colourGains\"], \"ct\", \"gains\");\n+\tif (ret < 0)\n+\t\tLOG(RkISP1Awb, Warning)\n+\t\t\t<< \"Failed to parse 'colourGains' \"\n+\t\t\t<< \"parameter from tuning file; \"\n+\t\t\t<< \"manual colour temperature will not work properly\";\n+\telse\n+\t\tcolourGainCurve_ = gainCurve;\n+\n+\treturn 0;\n+}\n+\n /**\n * \\copydoc libcamera::ipa::Algorithm::configure\n */\ndiff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\nindex 6ac3a5c3838b..e424804861a6 100644\n--- a/src/ipa/rkisp1/algorithms/awb.h\n+++ b/src/ipa/rkisp1/algorithms/awb.h\n@@ -7,6 +7,11 @@\n \n #pragma once\n \n+#include <optional>\n+\n+#include \"libipa/interpolator.h\"\n+#include \"libipa/vector.h\"\n+\n #include \"algorithm.h\"\n \n namespace libcamera {\n@@ -19,6 +24,7 @@ public:\n \tAwb();\n \t~Awb() = default;\n \n+\tint init(IPAContext &context, const YamlObject &tuningData) override;\n \tint configure(IPAContext &context, const IPACameraSensorInfo &configInfo) override;\n \tvoid queueRequest(IPAContext &context, const uint32_t frame,\n \t\t\t IPAFrameContext &frameContext,\n@@ -32,6 +38,7 @@ public:\n \t\t ControlList &metadata) override;\n \n private:\n+\tstd::optional<Interpolator<Vector<double, 2>>> colourGainCurve_;\n \tbool rgbMode_;\n };\n \n", "prefixes": [ "v6", "2/9" ] }