From patchwork Fri Mar 22 13:14:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Scally X-Patchwork-Id: 19787 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4A005C3272 for ; Fri, 22 Mar 2024 13:15:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 36A6263311; Fri, 22 Mar 2024 14:15:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tbEJgqdX"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9FBBA63036 for ; Fri, 22 Mar 2024 14:15:07 +0100 (CET) Received: from mail.ideasonboard.com (cpc141996-chfd3-2-0-cust928.12-3.cable.virginm.net [86.13.91.161]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 916278CC; Fri, 22 Mar 2024 14:14:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1711113279; bh=nfi9Nt2Bx5i6Jnsj1gRsnK1v/XJKtmjPzmsM4qU/nvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tbEJgqdXAIyOXkt3e1dPF1FvyF1AmFC/A4/Sjl6JD/TB4OUCevaRrRMPVp6PPPwBn E1Q0tGEmEeJd0N/8Z2C/G24UrnFhZepjgfhe6OQf4mMVsx6wniLzK8Tv0uJ3XvIPiz 7lHf+AYKqzBw1f7hUxaRKxf9WcuO/f+6HS+654MA= From: Daniel Scally To: libcamera-devel@lists.libcamera.org Cc: Daniel Scally Subject: [PATCH 01/10] ipa: libipa: Allow creation of empty Histogram Date: Fri, 22 Mar 2024 13:14:42 +0000 Message-Id: <20240322131451.3092931-2-dan.scally@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240322131451.3092931-1-dan.scally@ideasonboard.com> References: <20240322131451.3092931-1-dan.scally@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" For convenience's sake allow the creation of empty Histograms so they can be embedded within other Classes and filled out with data at some later point in time. Signed-off-by: Daniel Scally Reviewed-by: Stefan Klug Reviewed-by: Paul Elder --- src/ipa/libipa/histogram.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ipa/libipa/histogram.h b/src/ipa/libipa/histogram.h index 05bb4b80..db13c155 100644 --- a/src/ipa/libipa/histogram.h +++ b/src/ipa/libipa/histogram.h @@ -22,6 +22,7 @@ namespace ipa { class Histogram { public: + Histogram() { cumulative_.push_back(0); }; Histogram(Span data); size_t bins() const { return cumulative_.size() - 1; } uint64_t total() const { return cumulative_[cumulative_.size() - 1]; }