From c0586867a9a131f058032ba82c0f461b51b8781a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Wed, 25 Jun 2025 15:08:21 +0200 Subject: [PATCH] libcamera: pipeline: rpi: Do not clear request metadata anymore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Daniel Scally --- 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 92b9070c..15dd9506 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 5cadef52..99d43bd0 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. */