Show a patch.

GET /api/patches/21529/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 21529,
    "url": "https://patchwork.libcamera.org/api/patches/21529/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21529/",
    "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": "<20241007095425.211158-7-stefan.klug@ideasonboard.com>",
    "date": "2024-10-07T09:54:10",
    "name": "[v2,6/7] ipa: libipa: Add data accessor to Histogram",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "8a3d938ac00119ed1a54dd3c5794ebb17b47bf32",
    "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/21529/mbox/",
    "series": [
        {
            "id": 4661,
            "url": "https://patchwork.libcamera.org/api/series/4661/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4661",
            "date": "2024-10-07T09:54:04",
            "name": "Add support for IPA debugging metadata",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4661/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21529/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21529/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 4481EC32DF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Oct 2024 09:54:54 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 541C86536A;\n\tMon,  7 Oct 2024 11:54: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 00BAB6353B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2024 11:54:49 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:ba12:1296:516b:1122])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1F9A41667;\n\tMon,  7 Oct 2024 11:53:13 +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=\"WGXzmpdR\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1728294793;\n\tbh=LWH0Fjvo2R3wNXd0L9iqL8mPrb5JPIZ/8rxsFKxYbeA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=WGXzmpdR3j1quCFFGWcnJgz9FuY1EZ29GgOrjiR1v+W2KHSgJ62VUfX30+5em+ZO2\n\tg6As9uhf4R9fWlqDngEBgdBtFPY0lAhXifvql0HwJaAcMhp8+Fcb69s3HrPG8dMICH\n\tfz6v58zr2NfEb6n3fQi6m5Oy5BYu+FfqxRcL7m2o=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "Subject": "[PATCH v2 6/7] ipa: libipa: Add data accessor to Histogram",
        "Date": "Mon,  7 Oct 2024 11:54:10 +0200",
        "Message-ID": "<20241007095425.211158-7-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20241007095425.211158-1-stefan.klug@ideasonboard.com>",
        "References": "<20241007095425.211158-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": "For debugging purposes it is helpful to access the internal data of the\nhistogram.  Add an accessor for that.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v2:\n- return Span instead of reference to std::vector\n---\n src/ipa/libipa/histogram.cpp | 6 ++++++\n src/ipa/libipa/histogram.h   | 1 +\n 2 files changed, 7 insertions(+)",
    "diff": "diff --git a/src/ipa/libipa/histogram.cpp b/src/ipa/libipa/histogram.cpp\nindex 5fbfadf5e4e1..10e44b54a0cf 100644\n--- a/src/ipa/libipa/histogram.cpp\n+++ b/src/ipa/libipa/histogram.cpp\n@@ -62,6 +62,12 @@ Histogram::Histogram(Span<const uint32_t> data)\n  * \\return Number of bins\n  */\n \n+/**\n+ * \\fn Histogram::data()\n+ * \\brief Retrieve the internal data\n+ * \\return The data\n+ */\n+\n /**\n  * \\fn Histogram::total()\n  * \\brief Retrieve the total number of values in the data set\ndiff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h\nindex 6fd641683694..a926002c8cf0 100644\n--- a/src/ipa/libipa/histogram.h\n+++ b/src/ipa/libipa/histogram.h\n@@ -36,6 +36,7 @@ public:\n \t}\n \n \tsize_t bins() const { return cumulative_.size() - 1; }\n+\tconst Span<const uint64_t> data() const { return cumulative_; }\n \tuint64_t total() const { return cumulative_[cumulative_.size() - 1]; }\n \tuint64_t cumulativeFrequency(double bin) const;\n \tdouble quantile(double q, uint32_t first = 0, uint32_t last = UINT_MAX) const;\n",
    "prefixes": [
        "v2",
        "6/7"
    ]
}