Patch Detail
Show a patch.
GET /api/1.1/patches/19983/?format=api
{ "id": 19983, "url": "https://patchwork.libcamera.org/api/1.1/patches/19983/?format=api", "web_url": "https://patchwork.libcamera.org/patch/19983/", "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": "<20240502133046.1976565-2-dan.scally@ideasonboard.com>", "date": "2024-05-02T13:30:39", "name": "[v4,1/8] ipa: libipa: Allow creation of empty Histogram", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "05c21ff9be2e8e77cd36633b52f8aa4749710ebf", "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/19983/mbox/", "series": [ { "id": 4284, "url": "https://patchwork.libcamera.org/api/1.1/series/4284/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4284", "date": "2024-05-02T13:30:38", "name": "Centralise Agc into libipa", "version": 4, "mbox": "https://patchwork.libcamera.org/series/4284/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/19983/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/19983/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 EEDF9C328F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 2 May 2024 13:31:21 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A892363422;\n\tThu, 2 May 2024 15:31:17 +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 936A26340B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 2 May 2024 15:31:14 +0200 (CEST)", "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 CEAF563B;\n\tThu, 2 May 2024 15:30:16 +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=\"kOhEX2Xl\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1714656617;\n\tbh=5eAYQCE7T/j+A/S6AnmKfFjKNnyhQifJ5JLK31/JP68=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=kOhEX2XlkzZhQrCeem3lx4hSp9WuzmT1p2HZCAAOti8HJktXyi/jr816vtj0jyQ4j\n\tvtLtVOpzB4QQbjcEj1SnIj1br6kE7c6Y54++jYfLnVos5t+MYfhWLH9N9wzSmsdxac\n\t9P1/LpW0nhVYbs/Ny13XtGJ1Dl7IOUWpFgpJqUKY=", "From": "Daniel Scally <dan.scally@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Daniel Scally <dan.scally@ideasonboard.com>,\n\tStefan Klug <stefan.klug@ideasonboard.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>", "Subject": "[PATCH v4 1/8] ipa: libipa: Allow creation of empty Histogram", "Date": "Thu, 2 May 2024 14:30:39 +0100", "Message-Id": "<20240502133046.1976565-2-dan.scally@ideasonboard.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20240502133046.1976565-1-dan.scally@ideasonboard.com>", "References": "<20240502133046.1976565-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": "For convenience's sake allow the creation of empty Histograms so\nthey can be embedded within other Classes and filled out with\ndata at some later point in time.\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Daniel Scally <dan.scally@ideasonboard.com>\n---\nChanges in v4:\n\n\t- None\n\nChanges in v3:\n\n\t- None\n\nChanges in v2:\n\n\t- Added documentation\n\n src/ipa/libipa/histogram.cpp | 9 +++++++++\n src/ipa/libipa/histogram.h | 1 +\n 2 files changed, 10 insertions(+)", "diff": "diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp\nindex 6b5cde8e..c1aac59b 100644\n--- a/src/ipa/libipa/histogram.cpp\n+++ b/src/ipa/libipa/histogram.cpp\n@@ -28,6 +28,15 @@ namespace ipa {\n * specified bin. It can be used to find quantiles and averages between quantiles.\n */\n \n+/**\n+ * \\fn Histogram::Histogram()\n+ * \\brief Construct an empty Histogram\n+ *\n+ * This empty constructor exists largely to allow Histograms to be embedded in\n+ * other classes which may be created before the contents of the Histogram are\n+ * known.\n+ */\n+\n /**\n * \\brief Create a cumulative histogram\n * \\param[in] data A pre-sorted histogram to be passed\ndiff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h\nindex 05bb4b80..54bb2a19 100644\n--- a/src/ipa/libipa/histogram.h\n+++ b/src/ipa/libipa/histogram.h\n@@ -22,6 +22,7 @@ namespace ipa {\n class Histogram\n {\n public:\n+\tHistogram() { cumulative_.push_back(0); }\n \tHistogram(Span<const uint32_t> data);\n \tsize_t bins() const { return cumulative_.size() - 1; }\n \tuint64_t total() const { return cumulative_[cumulative_.size() - 1]; }\n", "prefixes": [ "v4", "1/8" ] }