{"id":19937,"url":"https://patchwork.libcamera.org/api/patches/19937/?format=json","web_url":"https://patchwork.libcamera.org/patch/19937/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240424124917.1250837-2-dan.scally@ideasonboard.com>","date":"2024-04-24T12:49:10","name":"[v3,1/8] ipa: libipa: Allow creation of empty Histogram","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"05c21ff9be2e8e77cd36633b52f8aa4749710ebf","submitter":{"id":156,"url":"https://patchwork.libcamera.org/api/people/156/?format=json","name":"Dan Scally","email":"dan.scally@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/19937/mbox/","series":[{"id":4270,"url":"https://patchwork.libcamera.org/api/series/4270/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4270","date":"2024-04-24T12:49:09","name":"Centralise Agc into libipa","version":3,"mbox":"https://patchwork.libcamera.org/series/4270/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/19937/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/19937/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 BBBF9C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Apr 2024 12:49:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 50A7663408;\n\tWed, 24 Apr 2024 14:49:39 +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 E6D82633EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Apr 2024 14:49:34 +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 C001E7E9;\n\tWed, 24 Apr 2024 14:48:42 +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=\"Jc47R/hL\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1713962922;\n\tbh=gWcdBPI+pLxGTihk5wyi1Tu4BUUfoChnbIvfitaZsQ4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Jc47R/hL11+68DhFAgbhGpJAjnVw+HnQRt5oNk4HYvpmYGCAac16hTXnkwSgJ776J\n\tYYee1gnPDvmDx6nM25rqxYwOhrW41dwSbOL9FdhUJiqbgd4v4iL5jhBZ6N7V8nhNiu\n\t18zZnnV2BiuTAsvqqOZXm8twMvYUMZmOADqC9h4U=","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 v3 1/8] ipa: libipa: Allow creation of empty Histogram","Date":"Wed, 24 Apr 2024 13:49:10 +0100","Message-Id":"<20240424124917.1250837-2-dan.scally@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20240424124917.1250837-1-dan.scally@ideasonboard.com>","References":"<20240424124917.1250837-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 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":["v3","1/8"]}