From patchwork Mon Mar 27 12:20:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18476 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 5B16FC329E for ; Mon, 27 Mar 2023 12:20:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB3C66276C; Mon, 27 Mar 2023 14:20:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1679919652; 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=aecVvSP1fy0q90dGkWRZqgowL08tb3zfrATDhv6LyGEX1CItXHkLdZVUpgxQxqyjM ImiJMaM77Uhe9/wMSRqr/+oktW+TUu448c1O1OO0pxE6+tiEgYbmFwIbbMJiCsFC0f kteZ1YX6zrMWaQBsN3GTPB+QAc5HcJhiQUL7FfKxtvv8lAJqpo1mTMumB0jM2tL59/ QZ0h+o/0mzLvyDqDznfc1MUMXLzdVrpETMIqHWWoWKs+UQXK9H+c0SwlV2cKZWdmmt 4CKaBmGzNG1YGBcdcXO8NiTYkZpNPteSFIwnedCmW5FfRZpkmNC3LoNvdAgKbcXNdh Cd4nIlYbxM5Gg== Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BB8B262747 for ; Mon, 27 Mar 2023 14:20:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="TOC0g+Cx"; dkim-atps=neutral Received: by mail-io1-xd30.google.com with SMTP id d14so3784938ion.9 for ; Mon, 27 Mar 2023 05:20:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1679919648; 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=TOC0g+Cx+txP667AvOXek9H2l0zNgVOXocOqKnqk+/aGVgR+A1lRJykNJ5aFkB76Yt 6vZq8vEC9Coufs+xOJ/UPV007HNEN8q2aY1Pq37p9tLs1mOMmvBDUfmq8wMN0XPhGjmC KPLt+mJbB43RrtY7mCu7VHh6Do8kB5+oNw0N+9UMVikylgaxEBBAESq57P6T2horyVU7 pqv2jJ1/XHUtLaoA4wIehyY8PfkbC8GG42SAlpQcyRt6YhpztERZlE1lPTs/Z0gF0R5w thuokgaBasIfq1GaZ/i6WaFXZyzugquY+WtBegB+1gmherni8S9uogNN9Xpc9mNiYN6G smbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679919648; 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=5VR9XWFbcUyks+qEaQmta5+wz++f//4oWBk+B6VRip2MEuTzRMi5Xju2sP8ukqJsiP bMn2TlgmMHaHFaDjFyNbt8DoxGwrnHxYypT8mOiakhkrVUFWOCAruDIQTlthgmIGdwd4 pVH34uZPWcxM/tOSyl54wOSxEi2elWbjqtg4AdVDJdsFVtQMEV0lzB8/4G+w5uVPM9oJ e1qcJCES+3u7pxPiMxySAfILkTtkJR7jqXWXYvwqopXNd3ISKG9zZVFPQneRZHM4t7q8 G4/1w7b0oUxnPhS+awZq+RR8X2nz9tjkX81ZPFUPToCD1vl+4C4dZ3/hbYv+EmY1TWJI IEGQ== X-Gm-Message-State: AO0yUKXAyn6TCbEoKDACQRb9UihtB6ZsPRpZTXR1H7ZatVNCBW/XM30o zaAq/JQZoYuFuhtDiyoK0scWY7iJzVduDVcmB6OxoQ== X-Google-Smtp-Source: AK7set/TOoRFyhzghmmSKw1JTHBYKblB+YgAfN+a3qpPxG6C0bdn7KVz68/Aw1OWVU0JC6ZQoI34Wg== X-Received: by 2002:a6b:a1a:0:b0:759:1e9e:6daa with SMTP id z26-20020a6b0a1a000000b007591e9e6daamr9091771ioi.10.1679919648352; Mon, 27 Mar 2023 05:20:48 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id r7-20020a5edb47000000b00758ff97aaedsm3239026iop.16.2023.03.27.05.20.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 05:20:47 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Mar 2023 13:20:27 +0100 Message-Id: <20230327122030.11756-8-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230327122030.11756-1-naush@raspberrypi.com> References: <20230327122030.11756-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 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_;