From patchwork Fri Mar 31 07:23:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18503 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 AE437C0F2A for ; Fri, 31 Mar 2023 07:40:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 666C5627A9; Fri, 31 Mar 2023 09:40:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1680248459; bh=aRIc5B+sTvytGlTffgEhxKt6BpAyCyw6+uqLU6iJiI8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=ASJMENd2Us13D6WNRD/flt85Q5LlVRWju0bw06xS3O0uDLdiXDhvAEzLtVZZrC3IK 6U4aff3bHDJ3HV4HOtzDdlqxdTCKY5ClhKaBPuCxJTLkGxowKTlTAoGQoc3K8cFIgp sXaxregnGLPhp7YgBvBs9RsslUScNfls18KyBkue7igELVmhXQ4J7OdiA8AG/5el5S OE2nZMCPFuiShZrMENP4Rn9ngYo98f+o7ZYvqQr0st3tKFvKCyE5siY93EX5BjE5jp 4SYOQX2FQFQ35Yi+1XrvUMXqZ0dssaP3pvGXKb6hJZuM4jMk38oob93urR4KZ63sZU KU3TjCDsbPKJA== Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 84D6062769 for ; Fri, 31 Mar 2023 09:40:56 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="UCP/xSWf"; dkim-atps=neutral Received: by mail-io1-xd2c.google.com with SMTP id o10so1231212iou.5 for ; Fri, 31 Mar 2023 00:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1680248455; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=quqiaExFAgBviDMcf8Asfps18bCBmhdSNFsVml+XS2A=; b=UCP/xSWfbrbAC9mFZ65jEjzT3b5Q0PRWpBfFNWWEBTYvc5ufKV1pLHOVA9INugRdyC lLYrMCs5hCByYTjjUBgn34fP9BmOQpwNmoCJkzqDJXNONrfAFeVhlYnd3zgeIJysN2lm uodClJ62zVaxsLwb4ZPbEYD8UmPwvxce8A3Lu+v9WPZWjXArSvd5+KwLtrQSFKzpbqN+ IRb/qRbtfMfwu9lvAq77GlHbgX8smr/lZYduJ/snuavlafnOUK+6k6HoitCU8QmgSCah 8WltIqfiAS3HhlDVmzsQotELQvet9fvaZLP5G8+nUHr97EFIpSnV0AVhDkw3JT77rAqD P1wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680248455; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=quqiaExFAgBviDMcf8Asfps18bCBmhdSNFsVml+XS2A=; b=Dzp/OpUo6fAUZSLeDC6chkeHafmm37j4MhtxRG0TcvjzA/6vE2LZozz+DdbibxhYBw hs/viM10BXXNrfMGQnFost3FSn4ORjdD8GQ5FAS6AZ0bp7GyZDUp4klWv/Kyk5TKGXiL IkpT0Kd/k3/TflgRyYXrAvUJmCfa6hoq/BQGWUsiJ99hDIAqQyxHpXjEwUm6f74w3HKI 3/eVi/rvHr/qJpNBuVHRkrYp065b6lPfGkECqFBiTxXid+BJY5QICNrGU6gR7X3Y8p2i S5bqWYwf8R+YyXQFMoGyo8X55R3w0NCuSq/8xqEYweFDl2Fe0FKdF9s++pkrRXwMEcXI TDZg== X-Gm-Message-State: AAQBX9dyPszE2811nc1FbDCU3M+nZbJQU+qiy5Y8i7O/rsu2T4EmFrJS BKM/3rVUUS8af7s/dJvGnp58yNZybtbYzoqp6e2EvQ== X-Google-Smtp-Source: AKy350YgAvyT+X1lyT6RoIpFou1ecFSKAwdWV69HlqV6+FVErvnxfjrjBzJk/8pqFRyvjNd4WMbjEQ== X-Received: by 2002:a05:6602:3806:b0:758:7246:c0f2 with SMTP id bb6-20020a056602380600b007587246c0f2mr5436867iob.1.1680248454855; Fri, 31 Mar 2023 00:40:54 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id i17-20020a6bf411000000b0074555814e73sm421943iog.32.2023.03.31.00.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 00:40:54 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 31 Mar 2023 08:23:38 +0100 Message-Id: <20230331072341.24851-8-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230331072341.24851-1-naush@raspberrypi.com> References: <20230331072341.24851-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 07/10] ipa: raspberrypi: Make RegionStats::get() always return a Region struct 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: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Update the overloaded RegionStats::get() and RegionStats::getFloating() member functions to return a Region struct for consistency. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Jacopo Mondi --- src/ipa/raspberrypi/controller/region_stats.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ipa/raspberrypi/controller/region_stats.h b/src/ipa/raspberrypi/controller/region_stats.h index 9aaf3a58a6f7..a8860dc8dba2 100644 --- a/src/ipa/raspberrypi/controller/region_stats.h +++ b/src/ipa/raspberrypi/controller/region_stats.h @@ -86,12 +86,12 @@ public: return get_(index); } - const T &get(const libcamera::Point &pos) const + const Region &get(const libcamera::Point &pos) const { return get(pos.y * size_.width + pos.x); } - const T &getFloating(unsigned int index) const + const Region &getFloating(unsigned int index) const { if (index >= numFloatingRegions()) return default_;