From patchwork Wed Mar 22 13:06:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 18434 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 E352CC32A0 for ; Wed, 22 Mar 2023 13:06:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8051362710; Wed, 22 Mar 2023 14:06:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1679490389; bh=YMeB7Yt2BHmOWFHNjvg7Zwd4fmpx4B1nhACxM1E/89M=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=zhdWyyIYpW8jEwJUR1ec33uXEABulbJ0T5Z3tRs4ai65xtehmk4CGyBdrmimkUXwC OoeVpMOCPtZ0Wkb/tZp99kDdlZwFNjharvetHt1enfkGk3EMEu9xQhvcvBXsTP1Rzn MJ8i9cERQIdPRuk8sVGrqQH0FEUACONuf4RcZkT8iyjxI+YU44uNexP6k7S9FVmeyP xJhBm8fDdURNz/LeeoR2LTnuTNM2CQX/2VWKyFlbXi5vrxcM91L+tqMPQUx3y54Yjr dJZCMA1EAwh6ep1hzri7rM0u6Pn0A/owMSHygXk26P62FolV4c8vGXKOTIdI0pYIrl myGNCEI+vAkeQ== Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7631C62722 for ; Wed, 22 Mar 2023 14:06:26 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="SyCfU+4M"; dkim-atps=neutral Received: by mail-io1-xd35.google.com with SMTP id t129so8396943iof.12 for ; Wed, 22 Mar 2023 06:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1679490385; 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=2D3sopp01tCN1h+VaYdiNoKyN5GcBEkpOHldOdbSyLk=; b=SyCfU+4M0wa9n8zfhgQL+cY36Zt7a0UrWjT/srQIXktpiQOWevik88a3KeyNrGMk/H IKStUo0hPOxjpje4E/MkkHjZvy8vBhaETm0nW7ht72bF6bT6QKIedrXeauUV4Z+T1ylr zsQQaZLFRJWZXU+6zl8wlk6kg2LIBAzX15hPf4tfb/FZ3fItvTZ0ABzviW9L9ztbuNM7 RwPGDKzGvuJnvswouNujzjEckKGq1mdDCsygTsu61XdpTW+gEjBjnoUwyRdl7r8KrP60 hYnNR447coY/OH8aZSkNiZ6Ts6Dh7hzKFnEzxTnmgYc9U0sYFGuc7xSPLpF6OHlRrYro TABw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679490385; 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=2D3sopp01tCN1h+VaYdiNoKyN5GcBEkpOHldOdbSyLk=; b=3W8gfMzwn8lDhmFkrcYvP90zJLhbOK5AHO5162jrLGbJFePnEi7T/Aqi6jVcTdhsXV tZBk2H9ywWip2UMcwF2E4w8EqVzdC7LUWjb4++mzMHD4BDMfCHtTYCqR9u7FHlRaRBhk 8QKJ/FO75w3T6fmlxj8xECvS79mBmVRbULeu4TVAsbzp1xO5WJzreV9TJjDax+Q6DSQR nsFcvN3qt5D5kssug0mPWw2V6LNuw7cyn/FbSrSPDDNIAsfDsiwKmVVJ89Zzw5Kzqi+i SNHvNtn/5liNKjr8VP5DCIoZobOoPr0kp/lLNk0iXGEzY0vGioDytSlFRMdm1n+tT7KL d3sQ== X-Gm-Message-State: AO0yUKXg/vMjJHaiYDWf0iiUEalUwthP+PgbMUjETUOU1tgo5yjh2eM4 V4q3AO5DZxFkL2y6HVC8g6r+JT+LQuG5oDRqy17gTQ== X-Google-Smtp-Source: AK7set9AoERnoUHAtrSN3TGtIdEJFpOgeB8ylyX9D4nUxtAkK6DOmKOD8+zVA7mxONDHHjiQL5KAyw== X-Received: by 2002:a6b:b4c5:0:b0:74c:aa8f:1f4c with SMTP id d188-20020a6bb4c5000000b0074caa8f1f4cmr1220412iof.8.1679490385012; Wed, 22 Mar 2023 06:06:25 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id l6-20020a026646000000b003c488204c6fsm4927960jaf.76.2023.03.22.06.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Mar 2023 06:06:24 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 22 Mar 2023 13:06:09 +0000 Message-Id: <20230322130612.5208-8-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230322130612.5208-1-naush@raspberrypi.com> References: <20230322130612.5208-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 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 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_;