Patch Detail
Show a patch.
GET /api/1.1/patches/20772/?format=api
{ "id": 20772, "url": "https://patchwork.libcamera.org/api/1.1/patches/20772/?format=api", "web_url": "https://patchwork.libcamera.org/patch/20772/", "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": "<20240805120522.1613342-3-stefan.klug@ideasonboard.com>", "date": "2024-08-05T12:05:03", "name": "[v1,2/6] ipa: rkisp1: awb: Load white balance gains from tuning file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2fa096bb8ec692c002a7f0d63a80e3da3ed56a3f", "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/20772/mbox/", "series": [ { "id": 4486, "url": "https://patchwork.libcamera.org/api/1.1/series/4486/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4486", "date": "2024-08-05T12:05:01", "name": "rkisp1: Add manual colour temperature control", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4486/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/20772/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/20772/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 22B68C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 5 Aug 2024 12:05:58 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7BFC26337E;\n\tMon, 5 Aug 2024 14:05:56 +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 E461D63369\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 5 Aug 2024 14:05:54 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:30ff:e7b4:349c:44ce])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D1E4AB5;\n\tMon, 5 Aug 2024 14:05:03 +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=\"kmz14V2x\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722859503;\n\tbh=CSJ1LfBzo/4SQKazTF2Sb4F+6RnatDuscp4MOkWhoGc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kmz14V2x6633sOls2ePeUhCxPLULXlStMM4YPgLAwrvFj45OrjmCLVxBNq1hBWLFb\n\tqGNm+Mi2Qb+OczOlCPq0BAbdPUn1IdvX1jVnNgUFICx8n1u1Rmm5Ojb6KZXUj7JZly\n\tOShx7U30KSn0ga1zvrwz+8kW+pQiWM1TaSU4Ei4k=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "David Plowman <david.plowman@raspberrypi.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 2/6] ipa: rkisp1: awb: Load white balance gains from\n\ttuning file", "Date": "Mon, 5 Aug 2024 14:05:03 +0200", "Message-ID": "<20240805120522.1613342-3-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20240805120522.1613342-1-stefan.klug@ideasonboard.com>", "References": "<20240805120522.1613342-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>\n---\n src/ipa/rkisp1/algorithms/awb.cpp | 18 ++++++++++++++++++\n src/ipa/rkisp1/algorithms/awb.h | 6 ++++++\n 2 files changed, 24 insertions(+)", "diff": "diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex 4ccafd48dedd..957d24fe3425 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -39,6 +39,24 @@ Awb::Awb()\n {\n }\n \n+/**\n+ * \\copydoc libcamera::ipa::Algorithm::init\n+ */\n+int Awb::init(IPAContext &context, const YamlObject &tuningData)\n+{\n+\tMatrixInterpolator<double, 2, 1> gains;\n+\tint ret = gains.readYaml(tuningData[\"gains\"], \"ct\", \"gains\");\n+\tif (ret < 0)\n+\t\tLOG(RkISP1Awb, Warning)\n+\t\t\t<< \"Failed to parse 'gains' \"\n+\t\t\t<< \"parameter from tuning file; \"\n+\t\t\t<< \"rgb gains will not be set based on colour temperature\";\n+\telse\n+\t\tgains_ = gains;\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 06c92896e2dc..a010e6d1cb3c 100644\n--- a/src/ipa/rkisp1/algorithms/awb.h\n+++ b/src/ipa/rkisp1/algorithms/awb.h\n@@ -7,6 +7,10 @@\n \n #pragma once\n \n+#include <optional>\n+\n+#include \"libipa/matrix_interpolator.h\"\n+\n #include \"algorithm.h\"\n \n namespace libcamera {\n@@ -19,6 +23,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@@ -34,6 +39,7 @@ public:\n private:\n \tuint32_t estimateCCT(double red, double green, double blue);\n \n+\tstd::optional<MatrixInterpolator<double, 2, 1>> gains_;\n \tbool rgbMode_;\n };\n \n", "prefixes": [ "v1", "2/6" ] }