Patch Detail
Show a patch.
GET /api/patches/26492/?format=api
{ "id": 26492, "url": "https://patchwork.libcamera.org/api/patches/26492/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26492/", "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": "<20260407-kbingham-awb-split-v1-9-a39af3f4dc20@ideasonboard.com>", "date": "2026-04-07T22:01:12", "name": "[09/13] libcamera: vector: Convertor Constructor", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "5d2a929b031cefc231d8a2854779345503704d40", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26492/mbox/", "series": [ { "id": 5874, "url": "https://patchwork.libcamera.org/api/series/5874/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5874", "date": "2026-04-07T22:01:03", "name": "ipa: simple: Convert to libipa AWB implementation", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5874/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26492/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26492/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 13676C32F7\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 7 Apr 2026 22:03:01 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6E2362DA7;\n\tWed, 8 Apr 2026 00:02:53 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E59A062DA8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 8 Apr 2026 00:02:42 +0200 (CEST)", "from [192.168.0.204] (ams.linuxembedded.co.uk [209.38.108.23])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 427F578E;\n\tWed, 8 Apr 2026 00:01:15 +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=\"OWT8u0yi\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1775599275;\n\tbh=oozcjV0cZYSOeVz0QApO4JVpN6M3yAnj1517g54bPlQ=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=OWT8u0yidvsv9CZnvowc2BvN+UGcrbsMSh+wmexQcSBiTId1XxNj+iUQwDItF/jRp\n\tvT4xh6ZrjakK6++YWPLxV3CU2t61KZtBEdblfnTmiW1NqoOnLWyJbeki86kHyAzW91\n\tweBzTb0ixOdd03FIsaVXem5ny9KeFrWjdHo0glII=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Date": "Tue, 07 Apr 2026 23:01:12 +0100", "Subject": "[PATCH 09/13] libcamera: vector: Convertor Constructor", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260407-kbingham-awb-split-v1-9-a39af3f4dc20@ideasonboard.com>", "References": "<20260407-kbingham-awb-split-v1-0-a39af3f4dc20@ideasonboard.com>", "In-Reply-To": "<20260407-kbingham-awb-split-v1-0-a39af3f4dc20@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "X-Mailer": "b4 0.14.2", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1775599360; l=1757;\n\ti=kieran.bingham@ideasonboard.com; s=20260204;\n\th=from:subject:message-id; \n\tbh=oozcjV0cZYSOeVz0QApO4JVpN6M3yAnj1517g54bPlQ=;\n\tb=VRRG1WjbZKei9rJaWng/94lcPy49YA2lH8SifodcvKa5VlV/nENRTUdyD2U37BIZ5Gvdh0mHb\n\tYowe1me0IMJBSX2Xh3vrafzquzdjIUEqoofb3xxB7jtQHlge4NgVg+z", "X-Developer-Key": "i=kieran.bingham@ideasonboard.com; a=ed25519;\n\tpk=IOxS2C6nWHNjLfkDR71Iesk904i6wJDfEERqV7hDBdY=", "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": "Extend the Vector class with a constructor to support casting to the\nstorage type when the given parameters are compatible.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n include/libcamera/internal/vector.h | 8 ++++++++\n src/libcamera/vector.cpp | 7 +++++++\n 2 files changed, 15 insertions(+)", "diff": "diff --git a/include/libcamera/internal/vector.h b/include/libcamera/internal/vector.h\nindex 16b6aef0b38f4b094d83449b5cdb1ba48b17c2bf..d29547f170e37c15f85e46abca82f89c8995115d 100644\n--- a/include/libcamera/internal/vector.h\n+++ b/include/libcamera/internal/vector.h\n@@ -51,6 +51,14 @@ public:\n \t\tstd::copy(data.begin(), data.end(), data_.begin());\n \t}\n \n+\ttemplate<typename U, std::enable_if_t<std::is_arithmetic_v<U> &&\n+\t\t\t\t\t !std::is_same_v<T, U>> * = nullptr>\n+\tconstexpr Vector(const Vector<U, Rows> &other)\n+\t{\n+\t\tfor (unsigned int i = 0; i < Rows; i++)\n+\t\t\tdata_[i] = static_cast<T>(other[i]);\n+\t}\n+\n \tconst T &operator[](size_t i) const\n \t{\n \t\tASSERT(i < data_.size());\ndiff --git a/src/libcamera/vector.cpp b/src/libcamera/vector.cpp\nindex 4dad1b9001c5df97f71031724729563cae0962c3..397e370fd023caef069095dc5abebe2d6d76848a 100644\n--- a/src/libcamera/vector.cpp\n+++ b/src/libcamera/vector.cpp\n@@ -52,6 +52,13 @@ LOG_DEFINE_CATEGORY(Vector)\n * The size of \\a data must be equal to the dimension size Rows of the vector.\n */\n \n+/**\n+ * \\fn Vector::Vector(const Vector<U, Rows> &other)\n+ * \\brief Construct a vector by converting another vector's element type\n+ * \\tparam U The source vector element type\n+ * \\param[in] other The vector to convert from\n+ */\n+\n /**\n * \\fn T Vector::operator[](size_t i) const\n * \\brief Index to an element in the vector\n", "prefixes": [ "09/13" ] }