From patchwork Thu Jun 26 08:22:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 23657 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 607D7C3237 for ; Thu, 26 Jun 2025 08:22:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5A5E968DED; Thu, 26 Jun 2025 10:22:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="L1oi+Y/f"; 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 13A5F62C44 for ; Thu, 26 Jun 2025 10:22:39 +0200 (CEST) Received: from pb-laptop.local (185.221.143.107.nat.pool.zt.hu [185.221.143.107]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D761F6BE; Thu, 26 Jun 2025 10:22:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1750926140; bh=gYpL2eEnT+UvRkqBhg8RvjMbuG7iQbwMsCABVydV2Zg=; h=From:To:Subject:Date:From; b=L1oi+Y/fO1poukCeCvX2Vl6Pl1jVp1foNdNylCsT8/jMY14dX+7B0zFfVX0vgH+uw HXwIBiaUdVpMeDWl/1So2J+yXgGr99UP8I5ZGnoJSh2wemIM+/3iezKTpHGELjGS6C sEBRqyclP/SbPiDC2Vc9ZJ5Wa/w5vDwAk7sPqEY0= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org, David Plowman , Naushir Patuck Subject: [RFC PATCH v1] libcamera: pipeline: rpi: Do not clear request metadata anymore Date: Thu, 26 Jun 2025 10:22:35 +0200 Message-ID: <20250626082235.1845316-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.50.0 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" Since 6cf9c4d34fbda5 ("pipeline: ipa: rpi: Split RPiCameraData::dropFrameCount_") the initial n frames are not dropped anymore. So clearing the request metadata should not be necessary anymore, remove it. Signed-off-by: Barnabás Pőcze Reviewed-by: Naushir Patuck --- src/libcamera/pipeline/rpi/pisp/pisp.cpp | 7 +------ src/libcamera/pipeline/rpi/vc4/vc4.cpp | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp index 2df91bacf..834b0e3f9 100644 --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp @@ -2313,16 +2313,11 @@ void PiSPCameraData::tryRunPipeline() /* Take the first request from the queue and action the IPA. */ Request *request = requestQueue_.front(); + ASSERT(request->metadata().empty()); /* See if a new ScalerCrop value needs to be applied. */ applyScalerCrop(request->controls()); - /* - * Clear the request metadata and fill it with some initial non-IPA - * related controls. We clear it first because the request metadata - * may have been populated if we have dropped the previous frame. - */ - request->metadata().clear(); fillRequestMetadata(job.sensorControls, request); /* Set our state to say the pipeline is active. */ diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index e99a7edf8..02e835b00 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -927,16 +927,11 @@ void Vc4CameraData::tryRunPipeline() /* Take the first request from the queue and action the IPA. */ Request *request = requestQueue_.front(); + ASSERT(request->metadata().empty()); /* See if a new ScalerCrop value needs to be applied. */ applyScalerCrop(request->controls()); - /* - * Clear the request metadata and fill it with some initial non-IPA - * related controls. We clear it first because the request metadata - * may have been populated if we have dropped the previous frame. - */ - request->metadata().clear(); fillRequestMetadata(bayerFrame.controls, request); /* Set our state to say the pipeline is active. */