Patch Detail
Show a patch.
GET /api/patches/22744/?format=api
{ "id": 22744, "url": "https://patchwork.libcamera.org/api/patches/22744/?format=api", "web_url": "https://patchwork.libcamera.org/patch/22744/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20250206141018.236272-4-stefan.klug@ideasonboard.com>", "date": "2025-02-06T14:10:10", "name": "[3/4] ipa: Use Vector class from libcamera", "commit_ref": "82cf918b5bd70cf6cf60c2ba7a08353c993a8d82", "pull_url": null, "state": "accepted", "archived": false, "hash": "bfabf6b7549c14158a09f38227d163f70bfd10ac", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/22744/mbox/", "series": [ { "id": 4992, "url": "https://patchwork.libcamera.org/api/series/4992/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4992", "date": "2025-02-06T14:10:07", "name": "Move Vector class from libipa to libcamera", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4992/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/22744/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/22744/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 8E3EBC32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 6 Feb 2025 14:10:33 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 13C8C685F3;\n\tThu, 6 Feb 2025 15:10:33 +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 F0978685E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 6 Feb 2025 15:10:30 +0100 (CET)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:6b7d:6f52:efbb:46c8])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 722A011DA;\n\tThu, 6 Feb 2025 15:09:17 +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=\"c1nqBfVH\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1738850957;\n\tbh=70TC5rfQAKHjA1/Nsb/TBHDPn/n+dEWmX4/6XL1jX6w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=c1nqBfVHem8pO7Hu8Nez4AdFWORjicsRPLz3u3NCcJS7uZ7Sl+IMAtXYJA6RADF3u\n\t4Dj3VDonzapjBQsYdz2VTDMO/NAWNmDOjuGmy+ofC16m8YUHLiM+1B0Lo/e2+NwY34\n\tD7mlfIyYuQsWh8tbZsV4bRo6deE3vQZhe6GLqoXo=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH 3/4] ipa: Use Vector class from libcamera", "Date": "Thu, 6 Feb 2025 15:10:10 +0100", "Message-ID": "<20250206141018.236272-4-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20250206141018.236272-1-stefan.klug@ideasonboard.com>", "References": "<20250206141018.236272-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": "Now that there is a Vector class in libcamera, use that one.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n---\n src/ipa/ipu3/algorithms/awb.h | 2 +-\n src/ipa/libipa/colours.h | 2 +-\n src/ipa/libipa/pwl.h | 2 +-\n src/ipa/rkisp1/algorithms/awb.h | 3 ++-\n src/ipa/rkisp1/ipa_context.h | 2 +-\n src/ipa/rpi/controller/rpi/agc_channel.cpp | 7 ++++---\n 6 files changed, 10 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/algorithms/awb.h b/src/ipa/ipu3/algorithms/awb.h\nindex 1916990a5364..dbf69c9073a1 100644\n--- a/src/ipa/ipu3/algorithms/awb.h\n+++ b/src/ipa/ipu3/algorithms/awb.h\n@@ -13,7 +13,7 @@\n \n #include <libcamera/geometry.h>\n \n-#include \"libipa/vector.h\"\n+#include \"libcamera/internal/vector.h\"\n \n #include \"algorithm.h\"\n \ndiff --git a/src/ipa/libipa/colours.h b/src/ipa/libipa/colours.h\nindex fa6a8b575cc7..d39b2ca8b87e 100644\n--- a/src/ipa/libipa/colours.h\n+++ b/src/ipa/libipa/colours.h\n@@ -9,7 +9,7 @@\n \n #include <stdint.h>\n \n-#include \"vector.h\"\n+#include \"libcamera/internal/vector.h\"\n \n namespace libcamera {\n \ndiff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h\nindex d4ec9f4f18fb..8fdc70538b93 100644\n--- a/src/ipa/libipa/pwl.h\n+++ b/src/ipa/libipa/pwl.h\n@@ -12,7 +12,7 @@\n #include <utility>\n #include <vector>\n \n-#include \"vector.h\"\n+#include \"libcamera/internal/vector.h\"\n \n namespace libcamera {\n \ndiff --git a/src/ipa/rkisp1/algorithms/awb.h b/src/ipa/rkisp1/algorithms/awb.h\nindex e424804861a6..34ec42cbb164 100644\n--- a/src/ipa/rkisp1/algorithms/awb.h\n+++ b/src/ipa/rkisp1/algorithms/awb.h\n@@ -9,8 +9,9 @@\n \n #include <optional>\n \n+#include \"libcamera/internal/vector.h\"\n+\n #include \"libipa/interpolator.h\"\n-#include \"libipa/vector.h\"\n \n #include \"algorithm.h\"\n \ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex 5d5b79fa615e..c765b928a55f 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -22,10 +22,10 @@\n \n #include \"libcamera/internal/debug_controls.h\"\n #include \"libcamera/internal/matrix.h\"\n+#include \"libcamera/internal/vector.h\"\n \n #include <libipa/camera_sensor_helper.h>\n #include <libipa/fc_queue.h>\n-#include <libipa/vector.h>\n \n namespace libcamera {\n \ndiff --git a/src/ipa/rpi/controller/rpi/agc_channel.cpp b/src/ipa/rpi/controller/rpi/agc_channel.cpp\nindex e79184b7ac74..a5562760e034 100644\n--- a/src/ipa/rpi/controller/rpi/agc_channel.cpp\n+++ b/src/ipa/rpi/controller/rpi/agc_channel.cpp\n@@ -12,8 +12,9 @@\n \n #include <libcamera/base/log.h>\n \n+#include \"libcamera/internal/vector.h\"\n+\n #include \"libipa/colours.h\"\n-#include \"libipa/vector.h\"\n \n #include \"../awb_status.h\"\n #include \"../device_status.h\"\n@@ -700,7 +701,7 @@ static double computeInitialY(StatisticsPtr &stats, AwbStatus const &awb,\n \t * Note that the weights are applied by the IPA to the statistics directly,\n \t * before they are given to us here.\n \t */\n-\tipa::RGB<double> sum{ 0.0 };\n+\tRGB<double> sum{ 0.0 };\n \tdouble pixelSum = 0;\n \tfor (unsigned int i = 0; i < stats->agcRegions.numRegions(); i++) {\n \t\tauto ®ion = stats->agcRegions.get(i);\n@@ -716,7 +717,7 @@ static double computeInitialY(StatisticsPtr &stats, AwbStatus const &awb,\n \n \t/* Factor in the AWB correction if needed. */\n \tif (stats->agcStatsPos == Statistics::AgcStatsPos::PreWb)\n-\t\tsum *= ipa::RGB<double>{{ awb.gainR, awb.gainR, awb.gainB }};\n+\t\tsum *= RGB<double>{ { awb.gainR, awb.gainR, awb.gainB } };\n \n \tdouble ySum = ipa::rec601LuminanceFromRGB(sum);\n \n", "prefixes": [ "3/4" ] }