From patchwork Wed Jan 8 11:09:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22468 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 1C879BD80A for ; Wed, 8 Jan 2025 11:10:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C83FA68503; Wed, 8 Jan 2025 12:10:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="b6no12eL"; dkim-atps=neutral Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BB5CB608AB for ; Wed, 8 Jan 2025 12:10:35 +0100 (CET) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43616bf3358so25445795e9.3 for ; Wed, 08 Jan 2025 03:10:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736334635; x=1736939435; darn=lists.libcamera.org; 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=B7RQnbyjyrsg/0lgDdzviLQ9dDzroinzgu5Rz/x5ULU=; b=b6no12eLYuke4tNoQZrZ3KSfqIUJ466y/wBVUmolBH4CwLLM6Bj4/XHCXd1vAQbpf+ j9wIR5OgN9q/4GMC5REB/Svlws+0H7LFqg1fIe/0nZ8Ph94g6zUXUHy9ykk9TiZl6wYI ZwLGG49qaUCfwAZrvPzlcsCTfeX7gL4GyGegZgsqqR1t48sSO0JeJjzor6yowZft23SE rTVZzJEjo5qg+h73lHaQOAxtMuZXEgqTYPGfqXBC2DvNMnVKeXChjnewM/9srPD8yJwp 2fw0mOoW9c8vaBn0VhpcC5BT0b1Ahi6nON61MKyoWHH1Ev4UbnrFLJnwgyMzR8S2QDco pLlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736334635; x=1736939435; 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=B7RQnbyjyrsg/0lgDdzviLQ9dDzroinzgu5Rz/x5ULU=; b=q7Jx/iTQC6zZOafyl8Wqtj5Xn7xIO9ybQ/eda/g3LfiKTeU2rf8k+c5D2JfPSl+gda mRt2ZkC1yrxRGqM7e2oDbt7uIwCyMN1bqf1odeiuJwP9IrnqzZT4lB+2aGMAt87ZePpe GoaCKquL4N5FN3ofRpD23nZDjQrrWLe2NiPxNNBeUJhaS2Wf7Ue6U7eN/CXOKBr/NUI7 VqSBRB2S965cE5AWdq8exubH93xsRFBkQ9rpWhCSe40XkX9eAMRXKUatryHjUSXoF5jh Sxg3stwNnnNZxuhBMk9XKQvonqf3UCxQf4MzjGoWtWeA524A9ozoexrGAvnYWgNjINjl bUfw== X-Gm-Message-State: AOJu0YxAFHgtEYdfFqVQsiYam5Y84NHEzlznzyfgYVacJjwOfrdXQO+s pEN2YTxW+iJYIxB1IdNeJIWlih1cOau+FAjD14OGnJ2RON5HpW0b0VCZy2Gj1saKmYrnPI7eKO5 TuKk= X-Gm-Gg: ASbGnctECFCS0MTdIVQCoLZT5a9gfOlx2qz+lngrw1LajZyUPMr3aMut8UHyH2u4b5h O7XMO5r1IRnCfxcHJzB9R+ypjyiLqC1ccn1KlJLc9XuQiW1w1NHt0ILA8nArWunGjc2XQwHnlHj qt18+Vyl4iJBWVlCGqX5L9rQAO3c8Z6en5Iel4j9Zbu8KnkLGxIKHZ1WFXW+3+kbvSIlqmFGgIw DB/S/ygDkKZdpOeKH/pkNFEH+5snLuH2DcqH0DcFb0kpJIq+Ur/Bi3uSj84s87Qb/E3cP3asnsv X-Google-Smtp-Source: AGHT+IHUohmKQwxxP9Il3iBIfwzMhgcd/FnfmEq2eJG6P6bD1Y5Wl0B+EqUe2YwbcWaGIJrH7hrvKg== X-Received: by 2002:a05:600c:a09:b0:434:f1d5:144a with SMTP id 5b1f17b1804b1-436e2557087mr7850405e9.0.1736334635039; Wed, 08 Jan 2025 03:10:35 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2ddefcbsm17141325e9.22.2025.01.08.03.10.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 03:10:34 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Laurent Pinchart Subject: [PATCH v3 1/4] ipa: rpi: Use r-value references in the set()/setLocked() functions Date: Wed, 8 Jan 2025 11:09:33 +0000 Message-ID: <20250108111030.3257931-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250108111030.3257931-1-naush@raspberrypi.com> References: <20250108111030.3257931-1-naush@raspberrypi.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" Use an r-value reference in set() and setLocked(), allowing more efficient metadata handling with std::forward and std::move if needed. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/rpi/controller/metadata.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ipa/rpi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h index b4650d25170f..b884490918c7 100644 --- a/src/ipa/rpi/controller/metadata.h +++ b/src/ipa/rpi/controller/metadata.h @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -36,10 +37,10 @@ public: } template - void set(std::string const &tag, T const &value) + void set(std::string const &tag, T &&value) { std::scoped_lock lock(mutex_); - data_[tag] = value; + data_[tag] = std::forward(value); } template @@ -104,10 +105,10 @@ public: } template - void setLocked(std::string const &tag, T const &value) + void setLocked(std::string const &tag, T &&value) { /* Use this only if you're holding the lock yourself. */ - data_[tag] = value; + data_[tag] = std::forward(value); } /* From patchwork Wed Jan 8 11:09:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22469 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 D665AC32F0 for ; Wed, 8 Jan 2025 11:10:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 76C3568500; Wed, 8 Jan 2025 12:10:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="L5d962O+"; dkim-atps=neutral Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C1F65684E1 for ; Wed, 8 Jan 2025 12:10:36 +0100 (CET) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-436284cdbe0so25955605e9.3 for ; Wed, 08 Jan 2025 03:10:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736334636; x=1736939436; darn=lists.libcamera.org; 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=IIG4zUWJV+wv/nFX9HY32UphHg0iL6nIDLZ67W++gCA=; b=L5d962O+VwoWD9mfZopcXn4VoDUHl2YpuyQdlpYt5BHyYIfbTAZbLgcKDaRWvIQ1ga SiUgyvq//9GqE5FJu+OP5dhfX1YHQHyWPqDUjauocCindJ52PEwykSUM1Po9aIpyCzza saWRFPtC8kWHlg0DRIIaAm3s0jVoeXVuS76rS8uP6dHS+QqkIY/r3+BA8QeStxe0IWe2 fNd+J7AE0+uri4QRP9r/Iu4Op8i4TcrY7WoO6n+MFFgIGCDYbQ9kkZ4ZYxakkCcq3QkD IqSgNtVcLmCpE08RflYIuqbad15kOZwu5roigcWQiGSUnz5bjwuYFGzuJfxye9gYMK3J TXdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736334636; x=1736939436; 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=IIG4zUWJV+wv/nFX9HY32UphHg0iL6nIDLZ67W++gCA=; b=T3qxEe1i2Wvvmn5YEhRtWsJzWnWKXDfMipkMNe7swBY+NFp+PV8zl3tVFudD6lHAGP U0ZI3owprXbyNwsqnciNshhXPEN8qikXCai7ogjw1pSZtXfCnaSpXZuuIqdt28mAgTD6 CXhMC1yFJb7PXmK5jsz5hr80ZFioj+PafFN340O4N8RZDIUWIvlYtBA5y5zXKm8VT7Ug P5IoybyGuLEzQGiVozv5dA8XtxHQtfT00SoUoftSSQLTs4h0SIJUsz2MofhqxQ43MQkg sa0D6AStTsoOdeDSRaEucqwKVc5dJ6iQU6CPEZ+rbNoP1SZA6UvX1ufyZ1B5ht3RWK/K kkbA== X-Gm-Message-State: AOJu0Yxug8XycxOXoHE7cedikhXp3R3mLfyqtQEwI7OM5SffywAv5SEf HosPVAixH+W3hWaky+wQwB546y7C4U/IARYTZW7w59uoSjvhOnWh6zPafM/dACaNopsVSKf/QgH FvDY= X-Gm-Gg: ASbGncvBlZOGHKo1YQTVVIGgEQV/n4VdtFeIiwvIxmRn5jLjfUQ56ShKc/Yj/dpmzDq HWITFHhOM0U9uyBvBfu7Jee9tqEYIUw8k822Y6BYT+n5IL7BMK5LOcvpdLF6FkjVLSDpMankMsR V3Z06Amd+F/n/+ObfbNtGNjXKwVmb1IaVJ93keou062A0MWs3RVzIFtFk/ZkEr/P+PJTK+tgZj2 YsbIr8xgFW4O4nbh4ehOVUNbz0G3uyBdD4i19a/1TKICggYvYFgdGVEZjJkY55cBZKFPhB9TxX+ X-Google-Smtp-Source: AGHT+IH3P3RDTRHseoRuftKm7KXGgRY+qvE2re28yc3zFXBL8DE70VTR53pUHytM1klzg30fzmMEuA== X-Received: by 2002:a05:600c:4f14:b0:42c:aeee:e604 with SMTP id 5b1f17b1804b1-436e27170d3mr7420615e9.8.1736334635889; Wed, 08 Jan 2025 03:10:35 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2ddefcbsm17141325e9.22.2025.01.08.03.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 03:10:35 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Laurent Pinchart Subject: [PATCH v3 2/4] ipa: rpi: Add erase()/eraseLocked() to RPiController::Metadata Date: Wed, 8 Jan 2025 11:09:34 +0000 Message-ID: <20250108111030.3257931-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250108111030.3257931-1-naush@raspberrypi.com> References: <20250108111030.3257931-1-naush@raspberrypi.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" These functions erase a key/value pair from the metadata object. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/rpi/controller/metadata.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/ipa/rpi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h index b884490918c7..77d3b0745059 100644 --- a/src/ipa/rpi/controller/metadata.h +++ b/src/ipa/rpi/controller/metadata.h @@ -91,6 +91,12 @@ public: data_.insert(other.data_.begin(), other.data_.end()); } + void erase(std::string const &tag) + { + std::scoped_lock lock(mutex_); + eraseLocked(tag); + } + template T *getLocked(std::string const &tag) { @@ -111,6 +117,14 @@ public: data_[tag] = std::forward(value); } + void eraseLocked(std::string const &tag) + { + auto it = data_.find(tag); + if (it == data_.end()) + return; + data_.erase(it); + } + /* * Note: use of (lowercase) lock and unlock means you can create scoped * locks with the standard lock classes. From patchwork Wed Jan 8 11:09:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22470 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 85BAABD80A for ; Wed, 8 Jan 2025 11:10:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6F00568516; Wed, 8 Jan 2025 12:10:41 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="SJ4kK9k1"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 85D01684E2 for ; Wed, 8 Jan 2025 12:10:37 +0100 (CET) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4361e82e3c3so25989175e9.0 for ; Wed, 08 Jan 2025 03:10:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736334637; x=1736939437; darn=lists.libcamera.org; 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=LMWk2T6O0FX1QjFHGshf9zrKq9ib51COSr3XgGiWJjk=; b=SJ4kK9k1R2xp0iAoTzSFQvWvtBSbDHrAfVbQmk8ukYxOGrl22wihYdK2NEA0/SaLU3 UO5DoCJEQUUny+oaxzfhd5IpyCEpsao1cXNZ4TJRF6iaIl/UaduJ3cWU2efxl+Qp/dFK WSuP4PtHu7X2hf1b6+8Yp43k/Nqo6tjQyfsUTAaYcrl/61gqoornGjCgh7u3VRCmMjqs IvDRdTZP57IkoVnjeo7o6I88izJkCbMqLfarin5bc7yTXVLLWE/wo1AMyX7pKFQwrRvy LhvjgHpFMadTusZbzzaFYVj3810hLhwpMwLymQFLw67z8Ub3rGy5ltG5kBxfP+rTb0XU fwAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736334637; x=1736939437; 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=LMWk2T6O0FX1QjFHGshf9zrKq9ib51COSr3XgGiWJjk=; b=Hsue7vD4cB0+I3eQZjSEuSCopbYMsS8/4ZDuibCMhvw/5yfiVdBy4CYim7eUjGGOKx Pt0HlYhijWHWbdP2I2di4s3fS5ioNL0hyWi8vNNnHmjSNqxHZTGHEGXex9x56jxYS7GT 3WuXVI3VGYZK5bt+a/7BIF56gGjgKVuqf7JHlT/0ltfMIJLI36bHAvE5LKK0TzlCG0yB xPO7NxWbTNyqFI0iZ3f2rusjhmOwffb5MSA5JYsNIrH92YC+k1DkAPatxh4rVGUMrqsH yADKCTjlLAid4bowONlWQmaeHYBXViIuhj2YswJ5lETQGzwuEPmfglzXuzH9IHN3RQmK /0Mg== X-Gm-Message-State: AOJu0Yw/MtqMEKUbrwE6G0rxR633cibvEwYFLP8MiLrtPWo/3bA2VSTF 17GE9077y4NbJd0m/gsUTaLVAWQD0oY/4flIE8S+iFjTPj+aUZTxjntusG8jVbX3NbqJNRHKjGZ kEhg= X-Gm-Gg: ASbGncu0oBD7jUuQYFScGnJDQ7U4xNvXmvv70HYatpV5dO3K5226YFlby6aAPbmnXBO cMXUPm4oAvjZhqOt/Yja81PKFNDLGZmW/ehLSgY6H8xz4GOGHYLp9Ik3xfbK/J2O80yvxNuGUXj wciqcBycaRs2FmRDi6K2h+sNrvB9co432BtwyRL4y8lxvZOtT23huStJm5xfnNQlG+GaxISSYVV THp3Lyndlsduhg4wusd+MeafVbanlxL8Z83XSxQxAJNQEvEaLcmUk7rlQSZ/SxA3SalEdnH2B1D X-Google-Smtp-Source: AGHT+IEZ8EGlXCHz8Njxi2CDY/KVHhEmhtBs4zXZ8LCn5ZJ1uspM+SwZdj6VFKoNRBwZn461PWHYEQ== X-Received: by 2002:a05:600c:3ca0:b0:436:17f4:9b3b with SMTP id 5b1f17b1804b1-436e270729bmr7513835e9.6.1736334636745; Wed, 08 Jan 2025 03:10:36 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2ddefcbsm17141325e9.22.2025.01.08.03.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 03:10:36 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Laurent Pinchart Subject: [PATCH v3 3/4] ipa: rpi: Add a HW property to determine if the data buffer is strided Date: Wed, 8 Jan 2025 11:09:35 +0000 Message-ID: <20250108111030.3257931-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250108111030.3257931-1-naush@raspberrypi.com> References: <20250108111030.3257931-1-naush@raspberrypi.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" This property (dataBufferStrided) indicates if the CSI-2 hardware writes to the embedded/metadata buffer directly, or if it treats the buffer like an image buffer and strides the metadata lines. Unicam writes this buffer strided, while the PiSP Frontend writes to it directly. This information will be relevant to data parsers in the helpers where the data is structured in lines. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/rpi/controller/controller.cpp | 2 ++ src/ipa/rpi/controller/controller.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/ipa/rpi/controller/controller.cpp b/src/ipa/rpi/controller/controller.cpp index e0131018e7b2..651fff632400 100644 --- a/src/ipa/rpi/controller/controller.cpp +++ b/src/ipa/rpi/controller/controller.cpp @@ -39,6 +39,7 @@ static const std::map HardwareConfigMap .pipelineWidth = 13, .statsInline = false, .minPixelProcessingTime = 0s, + .dataBufferStrided = true, } }, { @@ -71,6 +72,7 @@ static const std::map HardwareConfigMap * frames wider than ~16,000 pixels. */ .minPixelProcessingTime = 1.0us / 380, + .dataBufferStrided = false, } }, }; diff --git a/src/ipa/rpi/controller/controller.h b/src/ipa/rpi/controller/controller.h index eff520bd61de..fdb46557de9c 100644 --- a/src/ipa/rpi/controller/controller.h +++ b/src/ipa/rpi/controller/controller.h @@ -49,6 +49,7 @@ public: unsigned int pipelineWidth; bool statsInline; libcamera::utils::Duration minPixelProcessingTime; + bool dataBufferStrided; }; Controller(); From patchwork Wed Jan 8 11:09:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 22471 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 C3CE4C32F0 for ; Wed, 8 Jan 2025 11:10:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 92CB868503; Wed, 8 Jan 2025 12:10:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Y9nI8gtq"; dkim-atps=neutral Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FB8D684E4 for ; Wed, 8 Jan 2025 12:10:38 +0100 (CET) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-4361e82e3c3so25989205e9.0 for ; Wed, 08 Jan 2025 03:10:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1736334638; x=1736939438; darn=lists.libcamera.org; 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=353pXkmOOArp5EYfEz09P8Q//IsEvbXNQ4sKh5FVhgU=; b=Y9nI8gtqQ9SFwQx5UsY2w4rb0tKSskivRxO+YwYdY0TfyNSr3QCq4lAXpVWaz77yTj ffZmdghb3EOYn+3Off2OnPJzbKkeUyeBMZEOo43OuSy540YX2zhGxGp/rIrkcgQwuWG/ jBvO1q+RWugwuZ3+TpUwOV5X1ujdv7JAaFU3lUgTkdNsExgz6ykRyaU6qSlZsMB3p5lo oNX6ijCMfljs2dxvsI7+kGFG5XhMxbRHQIG4yxLCmP0Z/HocmOvw38UuvlsSxDicHqdA 88jj0TZVxxl08dOkC+9NEx/gVftblbuzkBIb390spwaLjjR+BtpFIqQbCstGpqf186TS Czvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736334638; x=1736939438; 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=353pXkmOOArp5EYfEz09P8Q//IsEvbXNQ4sKh5FVhgU=; b=JKFNo7ZQKjdodAizIqHlE1eqUgsdmwJgM/713JJuqrXyb2ZC4qAj4YpsIet5g9VGKc oY7OJagf+f+Bv5IssBBJKaYZpaebdee8660pqy8q9C/si5/axDCEOyk1rw7s/NM54aVN ZNhZVcCdhCX6CgVzm8rrZzFFrNy2W5yEnc/AcMLNRkDEOVeHLcLQSk7OmXakrMU0l2Gd fJloKY+7Fn8Zw93Gpy0VuZWTNdcEd2z0PQ3GJJCyMfkbnL8SDurKGCNf2dAcBCiaJptf VGmJr7+TPPyMZGpL0iaNZw6PiFyh5U3kOptOYQzUPZzH1bFOvRYi26WtZ2b+WQ4L9n8w BccA== X-Gm-Message-State: AOJu0YxzsEpWpl3Sf6EcVM4qjskvyT6phjPdxVDGFJfss9wHpOr7rO8+ xkwHLx0uk1SSVfPtm6NAczdRn3kr6Vdmug0dfiWQHfE+i2zZcZm836xlPp7DBUWHyLaupSEiqkS R+0U= X-Gm-Gg: ASbGncuncv8gxIlBAd33q6D/klE9K4nO9xnMKcBbzY7TshSZcrloLzq32d5DtEwmD7a jmnEjJW25zwokvPvLVJoYxi8IXpqtECsq3kqucwZfYsL1+EwGU24wCn/uCNmlu4y4HU9r/hff36 KZi6LlhxstxRELeJEQT/2s4+JKN4nr3FCl7GxRP8Fy+LYTzcAKsjpo+k5vDu8/c+laH3FUbr4Qz LnuAPtf6gm5xRXltGwCMRCbOYOAKbWwnFr3mINw7jM4X5dScxetZCpQrsFxnZyEFrgmvfHWp5wa X-Google-Smtp-Source: AGHT+IHjG5VvkSKARqDCVyE8SB9sXAJ1EZeERA/DmlJCzen48VBcqRi9T4syq/tMPcRKaj/eXvTFxw== X-Received: by 2002:a05:600c:1385:b0:436:1b94:2deb with SMTP id 5b1f17b1804b1-436e26f556fmr7452645e9.5.1736334637668; Wed, 08 Jan 2025 03:10:37 -0800 (PST) Received: from NAUSH-P-DELL.pitowers.org ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-436e2ddefcbsm17141325e9.22.2025.01.08.03.10.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jan 2025 03:10:37 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck , David Plowman , Kieran Bingham Subject: [PATCH v3 4/4] ipa: rpi: Provide the camera helper with the hardware configuration Date: Wed, 8 Jan 2025 11:09:36 +0000 Message-ID: <20250108111030.3257931-5-naush@raspberrypi.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250108111030.3257931-1-naush@raspberrypi.com> References: <20250108111030.3257931-1-naush@raspberrypi.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" Add a CamHelper::setHwConfig() helper used by the IPA to set the hardware configuration in use by the pipeline. This will be needed by the IMX500 camera helper in a future commit to determine if the metadata buffer is strided. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Acked-by: Kieran Bingham --- src/ipa/rpi/cam_helper/cam_helper.cpp | 5 +++++ src/ipa/rpi/cam_helper/cam_helper.h | 2 ++ src/ipa/rpi/common/ipa_base.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/src/ipa/rpi/cam_helper/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp index 8c720652fbd0..a78db9c1cd7c 100644 --- a/src/ipa/rpi/cam_helper/cam_helper.cpp +++ b/src/ipa/rpi/cam_helper/cam_helper.cpp @@ -156,6 +156,11 @@ void CamHelper::setCameraMode(const CameraMode &mode) } } +void CamHelper::setHwConfig(const Controller::HardwareConfig &hwConfig) +{ + hwConfig_ = hwConfig; +} + bool CamHelper::sensorEmbeddedDataPresent() const { return false; diff --git a/src/ipa/rpi/cam_helper/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h index 29371bdbf5ea..4a826690ec65 100644 --- a/src/ipa/rpi/cam_helper/cam_helper.h +++ b/src/ipa/rpi/cam_helper/cam_helper.h @@ -71,6 +71,7 @@ public: CamHelper(std::unique_ptr parser, unsigned int frameIntegrationDiff); virtual ~CamHelper(); void setCameraMode(const CameraMode &mode); + void setHwConfig(const Controller::HardwareConfig &hwConfig); virtual void prepare(libcamera::Span buffer, Metadata &metadata); virtual void process(StatisticsPtr &stats, Metadata &metadata); @@ -101,6 +102,7 @@ protected: std::unique_ptr parser_; CameraMode mode_; + Controller::HardwareConfig hwConfig_; private: /* diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp index 0c8aee699155..6ff1e22b15d4 100644 --- a/src/ipa/rpi/common/ipa_base.cpp +++ b/src/ipa/rpi/common/ipa_base.cpp @@ -151,6 +151,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams ¶ms, Ini lensPresent_ = params.lensPresent; controller_.initialise(); + helper_->setHwConfig(controller_.getHardwareConfig()); /* Return the controls handled by the IPA */ ControlInfoMap::Map ctrlMap = ipaControls;