Patch Detail
Show a patch.
GET /api/1.1/patches/21899/?format=api
{ "id": 21899, "url": "https://patchwork.libcamera.org/api/1.1/patches/21899/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21899/", "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": "<20241115074628.417215-4-dan.scally@ideasonboard.com>", "date": "2024-11-15T07:46:25", "name": "[v3,3/6] ipa: rkisp1: Use centralised libipa helpers", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0fdd553ac46ec83f8f11a9824dfa113ac0a29cdc", "submitter": { "id": 156, "url": "https://patchwork.libcamera.org/api/1.1/people/156/?format=api", "name": "Dan Scally", "email": "dan.scally@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/21899/mbox/", "series": [ { "id": 4792, "url": "https://patchwork.libcamera.org/api/1.1/series/4792/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4792", "date": "2024-11-15T07:46:22", "name": "Centralise common functions in IPA modules", "version": 3, "mbox": "https://patchwork.libcamera.org/series/4792/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21899/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21899/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 C7CADC0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Nov 2024 07:46:57 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E9C2465869;\n\tFri, 15 Nov 2024 08:46:53 +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 0D1516585E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Nov 2024 08:46:49 +0100 (CET)", "from mail.ideasonboard.com\n\t(cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DAA72FC5;\n\tFri, 15 Nov 2024 08:46:33 +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=\"jzxLBMn2\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1731656794;\n\tbh=pYUogIqwFlE9rtSCiMpCOv+mp+KdUEJQt/YLSUmQY2M=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jzxLBMn23Kl0C6VfveVtulnt42I0sE583H/az83MaIRKHwwuJtqjlPJnpXCPoPkkB\n\tK4qJji4BaGkPIaMjPXX8/UYR5dHxfRi/LooKmgRgmVbzmg3nlGHxAdjvT6xDXFjdmd\n\tKLdbtyPfdqQtUH9BPOhYFq2amvtt7Jf0PZO4k66Y=", "From": "Daniel Scally <dan.scally@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "mike.rudenko@gmail.com, Daniel Scally <dan.scally@ideasonboard.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>", "Subject": "[PATCH v3 3/6] ipa: rkisp1: Use centralised libipa helpers", "Date": "Fri, 15 Nov 2024 07:46:25 +0000", "Message-Id": "<20241115074628.417215-4-dan.scally@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20241115074628.417215-1-dan.scally@ideasonboard.com>", "References": "<20241115074628.417215-1-dan.scally@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": "Use the centralised libipa helpers instead of open-coding common\nfunctions.\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nSigned-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n---\nChanges in v3:\n\n\t- None\n\nChanges in v2:\n\n\t- Dropped the ipa:: prefix for function calls\n\n src/ipa/rkisp1/algorithms/awb.cpp | 18 ++----------------\n src/ipa/rkisp1/algorithms/awb.h | 2 --\n 2 files changed, 2 insertions(+), 18 deletions(-)", "diff": "diff --git a/src/ipa/rkisp1/algorithms/awb.cpp b/src/ipa/rkisp1/algorithms/awb.cpp\nindex b3c00bef..5c1d9511 100644\n--- a/src/ipa/rkisp1/algorithms/awb.cpp\n+++ b/src/ipa/rkisp1/algorithms/awb.cpp\n@@ -16,6 +16,8 @@\n \n #include <libcamera/ipa/core_ipa_interface.h>\n \n+#include \"libipa/colours.h\"\n+\n /**\n * \\file awb.h\n */\n@@ -178,22 +180,6 @@ void Awb::prepare(IPAContext &context, const uint32_t frame,\n \t}\n }\n \n-uint32_t Awb::estimateCCT(double red, double green, double blue)\n-{\n-\t/* Convert the RGB values to CIE tristimulus values (XYZ) */\n-\tdouble X = (-0.14282) * (red) + (1.54924) * (green) + (-0.95641) * (blue);\n-\tdouble Y = (-0.32466) * (red) + (1.57837) * (green) + (-0.73191) * (blue);\n-\tdouble Z = (-0.68202) * (red) + (0.77073) * (green) + (0.56332) * (blue);\n-\n-\t/* Calculate the normalized chromaticity values */\n-\tdouble x = X / (X + Y + Z);\n-\tdouble y = Y / (X + Y + Z);\n-\n-\t/* Calculate CCT */\n-\tdouble n = (x - 0.3320) / (0.1858 - y);\n-\treturn 449 * n * n * n + 3525 * n * n + 6823.3 * n + 5520.33;\n-}\n-\n /**\n * \\copydoc libcamera::ipa::Algorithm::process\n */\ndiff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\nindex b3b2c0bb..6ac3a5c3 100644\n--- a/src/ipa/rkisp1/algorithms/awb.h\n+++ b/src/ipa/rkisp1/algorithms/awb.h\n@@ -32,8 +32,6 @@ public:\n \t\t ControlList &metadata) override;\n \n private:\n-\tuint32_t estimateCCT(double red, double green, double blue);\n-\n \tbool rgbMode_;\n };\n \n", "prefixes": [ "v3", "3/6" ] }