Patch Detail
Show a patch.
GET /api/1.1/patches/22828/?format=api
{ "id": 22828, "url": "https://patchwork.libcamera.org/api/1.1/patches/22828/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22828/", "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": "<20250223230403.1226-7-laurent.pinchart@ideasonboard.com>", "date": "2025-02-23T23:03:54", "name": "[06/15] libipa: awb: Pass lux value to calculateAwb() as unsigned int", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "351a5541b91f3b357155bed65413a5ddaae25327", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22828/mbox/", "series": [ { "id": 5012, "url": "https://patchwork.libcamera.org/api/1.1/series/5012/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5012", "date": "2025-02-23T23:03:48", "name": "libipa: awb: Drive-by fixes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5012/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22828/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22828/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 EA5F2BDB13\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 23 Feb 2025 23:04:40 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7A1F3686C5;\n\tMon, 24 Feb 2025 00:04:39 +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 98791686BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Feb 2025 00:04:28 +0100 (CET)", "from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9B377929\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Feb 2025 00:03:02 +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=\"ETJ3fsY/\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740351782;\n\tbh=5NFBOrd3hb7bgceA18jz0+VIQboQgIkSiykBSKqNLj4=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=ETJ3fsY/ZD+gdxrl4dHfR+Go1v2EoXgu4VIgw5pspvwGL4C6Fw/4Ul9ayEvUDmvRa\n\tUSJq+R1muUlmqLOelFZorEC0q1VG2UnGd9cfHNhfVYxQftlBmeb5G54eEnEBFXHqFE\n\tyf1vYopMMsLrFhmHHntY/fbLCsnUuQIwj8hmL2X4=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH 06/15] libipa: awb: Pass lux value to calculateAwb() as\n\tunsigned int", "Date": "Mon, 24 Feb 2025 01:03:54 +0200", "Message-ID": "<20250223230403.1226-7-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.45.3", "In-Reply-To": "<20250223230403.1226-1-laurent.pinchart@ideasonboard.com>", "References": "<20250223230403.1226-1-laurent.pinchart@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": "The lux value can never be negative. Pass it as an unsigned int.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nDo we need a Lux type ? And maybe a ColourTemperature type ?\n---\n src/ipa/libipa/awb.h | 2 +-\n src/ipa/libipa/awb_bayes.cpp | 2 +-\n src/ipa/libipa/awb_bayes.h | 2 +-\n src/ipa/libipa/awb_grey.cpp | 2 +-\n src/ipa/libipa/awb_grey.h | 2 +-\n 5 files changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/src/ipa/libipa/awb.h b/src/ipa/libipa/awb.h\nindex 4a1b012a4334..5c298d3b6f69 100644\n--- a/src/ipa/libipa/awb.h\n+++ b/src/ipa/libipa/awb.h\n@@ -35,7 +35,7 @@ public:\n \tvirtual ~AwbAlgorithm() = default;\n \n \tvirtual int init(const YamlObject &tuningData) = 0;\n-\tvirtual AwbResult calculateAwb(const AwbStats &stats, int lux) = 0;\n+\tvirtual AwbResult calculateAwb(const AwbStats &stats, unsigned int lux) = 0;\n \tvirtual RGB<double> gainsFromColourTemperature(double colourTemperature) = 0;\n \n \tconst ControlInfoMap::Map &controls() const\ndiff --git a/src/ipa/libipa/awb_bayes.cpp b/src/ipa/libipa/awb_bayes.cpp\nindex e75bfcd693d9..9287b884cb95 100644\n--- a/src/ipa/libipa/awb_bayes.cpp\n+++ b/src/ipa/libipa/awb_bayes.cpp\n@@ -275,7 +275,7 @@ RGB<double> AwbBayes::gainsFromColourTemperature(double colourTemperature)\n \treturn { { gains[0], 1.0, gains[1] } };\n }\n \n-AwbResult AwbBayes::calculateAwb(const AwbStats &stats, int lux)\n+AwbResult AwbBayes::calculateAwb(const AwbStats &stats, unsigned int lux)\n {\n \tipa::Pwl prior;\n \tif (lux > 0) {\ndiff --git a/src/ipa/libipa/awb_bayes.h b/src/ipa/libipa/awb_bayes.h\nindex 47db7243273f..23bf88061118 100644\n--- a/src/ipa/libipa/awb_bayes.h\n+++ b/src/ipa/libipa/awb_bayes.h\n@@ -34,7 +34,7 @@ public:\n \tAwbBayes() = default;\n \n \tint init(const YamlObject &tuningData) override;\n-\tAwbResult calculateAwb(const AwbStats &stats, int lux) override;\n+\tAwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override;\n \tRGB<double> gainsFromColourTemperature(double temperatureK) override;\n \tvoid handleControls(const ControlList &controls) override;\n \ndiff --git a/src/ipa/libipa/awb_grey.cpp b/src/ipa/libipa/awb_grey.cpp\nindex 06ffd45618d8..e979cc4d1a3e 100644\n--- a/src/ipa/libipa/awb_grey.cpp\n+++ b/src/ipa/libipa/awb_grey.cpp\n@@ -70,7 +70,7 @@ int AwbGrey::init(const YamlObject &tuningData)\n *\n * \\return The AWB result\n */\n-AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] int lux)\n+AwbResult AwbGrey::calculateAwb(const AwbStats &stats, [[maybe_unused]] unsigned int lux)\n {\n \tAwbResult result;\n \tauto means = stats.getRGBMeans();\ndiff --git a/src/ipa/libipa/awb_grey.h b/src/ipa/libipa/awb_grey.h\nindex 1a365e616a98..e3c34201dbc9 100644\n--- a/src/ipa/libipa/awb_grey.h\n+++ b/src/ipa/libipa/awb_grey.h\n@@ -23,7 +23,7 @@ public:\n \tAwbGrey() = default;\n \n \tint init(const YamlObject &tuningData) override;\n-\tAwbResult calculateAwb(const AwbStats &stats, int lux) override;\n+\tAwbResult calculateAwb(const AwbStats &stats, unsigned int lux) override;\n \tRGB<double> gainsFromColourTemperature(double colourTemperature) override;\n \n private:\n", "prefixes": [ "06/15" ] }