{"id":23479,"url":"https://patchwork.libcamera.org/api/patches/23479/?format=json","web_url":"https://patchwork.libcamera.org/patch/23479/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20250606105651.1624640-6-naush@raspberrypi.com>","date":"2025-06-06T10:55:23","name":"[v3,5/6] pipeline: rpi: Remove ispOutputCount_ and ispOutputTotal_","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"0b44ad44faf89e9fb657eb2d801e9d80f0272517","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/23479/mbox/","series":[{"id":5209,"url":"https://patchwork.libcamera.org/api/series/5209/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5209","date":"2025-06-06T10:55:18","name":"Eliminating startup frames","version":3,"mbox":"https://patchwork.libcamera.org/series/5209/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/23479/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/23479/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id D07EFC3324\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Jun 2025 10:57:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA89A68DC6;\n\tFri,  6 Jun 2025 12:57:09 +0200 (CEST)","from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8DC3668DBE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Jun 2025 12:57:00 +0200 (CEST)","by mail-wm1-x331.google.com with SMTP id\n\t5b1f17b1804b1-450ddb35583so1798975e9.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 06 Jun 2025 03:57:00 -0700 (PDT)","from NAUSH-P-DELL.tail9c427.ts.net ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-452137277afsm20092455e9.30.2025.06.06.03.56.59\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 06 Jun 2025 03:56:59 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ad2U3I9z\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1749207420; x=1749812220;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=UjhoSFLjQT8XeMDrUTrn+s1ViaVwS7kMkgdRcH6/WUg=;\n\tb=ad2U3I9zpLAhCS17UruZrqXLptJUe8aFCQf4/ZjuAtCMf/8PQbBf307kWIyDiVpFtj\n\t+OiHq0qM/LgYlE9zRZs8RlRooyzifeegDHwZL/t6qzYk3n8DWI1XmccVpRhqxWc4LkGp\n\twdK+Rra3A1AKuRvFN1+9OnjR/9usoIpO3lthh1O/lMaWqsmGj51mQQEhsCZMN2iL1cxV\n\tV4zsGV9qwyGdDJ6SQEYJKZqwPphY1G5aF8/H5KfSWqbz1299uHIwZDMX4G8tPFObq9mH\n\tTxa0y6qp9kaX85royTt/1PqIVNOPWSDPaP8ORpFGw4PWdk0CtOqsAFdaCxzz57gKWKS5\n\talVQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1749207420; x=1749812220;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=UjhoSFLjQT8XeMDrUTrn+s1ViaVwS7kMkgdRcH6/WUg=;\n\tb=nK4ba1uUap2yDjb5IsdlLgSkQKJSpaaaWAxpgljbU3ujdOnGRzc6RhYFkBLPaOADb/\n\tvAs6w9PodbqPtfCPhZo4zg3gO0XpebPW/jrWrQ5xrBI5tQ4U/PzHJpmMpd4vTxmrmTBA\n\tozupxd+6et6hxHDArbQrNUfbcHUzhWwScuRj2NaR15wQi93QBHrquKMSKfKiLWNo12l0\n\teI+QEIFNfzN8+rnlwfwrC8eO18xBXWu5eVYUcg7sVbLyM6GVD936wewAL0I2/RDhqaZn\n\tGAqsqZAf7/5AHXqQWcxsrYtNM2L/5SSuZsBOmpA6FtQbTwkrjekRM3f87d9q7bbf2VnE\n\tsyMQ==","X-Gm-Message-State":"AOJu0Yyh5VVtBLDChPX9D3z560SZrWVvXzMSGrvacV8dVnLKmZb3Mv0z\n\tZy2XIhQCTZ9fWRqVsufiLSxrMTxYHe+73wTTkmz0cT01mhOYZHmoLzETzHEJ39+iiwVtYqMYy0d\n\t0dM9Y","X-Gm-Gg":"ASbGncsAWZPf//Qxhzpm73dZpzdoZBICORFM5/7Y82ST9uELsjjWVcTc1ukYHZVQbgG\n\tNzJd7dFbKGxNsIJMM6T5GimD7JE9Kj7tBZZvLfE1ic0t/IsLaGjfaoYvpG81+7dCYTTnq7ad5t+\n\tLJBtMnB1m0XbXpUPA72OS142VpD7bQdRglRHtTT8SMUcmwxUxF8aCCJE+bgVb4WPEkdn4tPO1as\n\tHuHwBp52XzFSdWPSuL7Xu2MSmoC7t3GDYzUifOi3OLYHHXKnlsOpyeqsd6j1w/Cmzqrz2FGd0lQ\n\tYt5HSsvpzva4/r26xnDedc4uQr1SelldqHlLKmpEmIJbZ8JUCDAwT1vj4/F1pcvzr0ZCK6LXvwo\n\t5o9+ZgjmcOOU=","X-Google-Smtp-Source":"AGHT+IFv0jDjECPcCbx/BNJrcRuXsTVfA7mx6ZBPiR5Cr5Qd8uEOKs82+tFJ7xIIyNgdz0thgKhOsw==","X-Received":"by 2002:a05:600c:6297:b0:450:d5ed:3c20 with SMTP id\n\t5b1f17b1804b1-4529abd72bfmr7101445e9.6.1749207419576; \n\tFri, 06 Jun 2025 03:56:59 -0700 (PDT)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"[PATCH v3 5/6] pipeline: rpi: Remove ispOutputCount_ and\n\tispOutputTotal_","Date":"Fri,  6 Jun 2025 11:55:23 +0100","Message-ID":"<20250606105651.1624640-6-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20250606105651.1624640-1-naush@raspberrypi.com>","References":"<20250606105651.1624640-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"With the drop frame logic removed from the pipeline handler, these\nmember variables and not used, so remove them.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.h |  6 +-----\n src/libcamera/pipeline/rpi/pisp/pisp.cpp          | 12 ------------\n src/libcamera/pipeline/rpi/vc4/vc4.cpp            | 15 ---------------\n 3 files changed, 1 insertion(+), 32 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\nindex e27c4f860d1a..898f31577059 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n@@ -48,8 +48,7 @@ class CameraData : public Camera::Private\n public:\n \tCameraData(PipelineHandler *pipe)\n \t\t: Camera::Private(pipe), state_(State::Stopped),\n-\t\t  startupFrameCount_(0), invalidFrameCount_(0), buffersAllocated_(false),\n-\t\t  ispOutputCount_(0), ispOutputTotal_(0)\n+\t\t  startupFrameCount_(0), invalidFrameCount_(0), buffersAllocated_(false)\n \t{\n \t}\n \n@@ -179,9 +178,6 @@ protected:\n \n \tvirtual void tryRunPipeline() = 0;\n \n-\tunsigned int ispOutputCount_;\n-\tunsigned int ispOutputTotal_;\n-\n private:\n \tvoid checkRequestCompleted();\n };\ndiff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\nindex 91e7f4c94d96..ccf135c3d8ce 100644\n--- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n+++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n@@ -1834,12 +1834,6 @@ void PiSPCameraData::beOutputDequeue(FrameBuffer *buffer)\n \t\tdmabufSyncEnd(buffer->planes()[0].fd);\n \n \thandleStreamBuffer(buffer, stream);\n-\n-\t/*\n-\t * Increment the number of ISP outputs generated.\n-\t * This is needed to track dropped frames.\n-\t */\n-\tispOutputCount_++;\n \thandleState();\n }\n \n@@ -1885,7 +1879,6 @@ void PiSPCameraData::prepareIspComplete(const ipa::RPi::BufferIds &buffers, bool\n \t\t * If there is no need to run the Backend, just signal that the\n \t\t * input buffer is completed and all Backend outputs are ready.\n \t\t */\n-\t\tispOutputCount_ = ispOutputTotal_;\n \t\tbuffer = cfe_[Cfe::Output0].getBuffers().at(bayerId).buffer;\n \t\thandleStreamBuffer(buffer, &cfe_[Cfe::Output0]);\n \t} else\n@@ -1994,7 +1987,6 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)\n \tglobal.bayer_enables |= PISP_BE_BAYER_ENABLE_INPUT;\n \tglobal.bayer_order = toPiSPBayerOrder(cfeFormat.fourcc);\n \n-\tispOutputTotal_ = 1; /* Config buffer */\n \tif (PISP_IMAGE_FORMAT_COMPRESSED(inputFormat.format)) {\n \t\tpisp_decompress_config decompress;\n \t\tdecompress.offset = DefaultCompressionOffset;\n@@ -2025,7 +2017,6 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)\n \t\tsetupOutputClipping(ispFormat0, outputFormat0);\n \n \t\tbe_->SetOutputFormat(0, outputFormat0);\n-\t\tispOutputTotal_++;\n \t}\n \n \tif (global.rgb_enables & PISP_BE_RGB_ENABLE_OUTPUT1) {\n@@ -2049,7 +2040,6 @@ int PiSPCameraData::configureBe(const std::optional<ColorSpace> &yuvColorSpace)\n \t\tsetupOutputClipping(ispFormat1, outputFormat1);\n \n \t\tbe_->SetOutputFormat(1, outputFormat1);\n-\t\tispOutputTotal_++;\n \t}\n \n \t/* Setup the TDN I/O blocks in case TDN gets turned on later. */\n@@ -2256,8 +2246,6 @@ void PiSPCameraData::prepareCfe()\n \n void PiSPCameraData::prepareBe(uint32_t bufferId, bool stitchSwapBuffers)\n {\n-\tispOutputCount_ = 0;\n-\n \tFrameBuffer *buffer = cfe_[Cfe::Output0].getBuffers().at(bufferId).buffer;\n \n \tLOG(RPI, Debug) << \"Input re-queue to ISP, buffer id \" << bufferId\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex fe910bdf2ff9..ac6dab814d35 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -597,8 +597,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \t\tstream->setFlags(StreamFlag::External);\n \t}\n \n-\tispOutputTotal_ = outStreams.size();\n-\n \t/*\n \t * If ISP::Output0 stream has not been configured by the application,\n \t * we must allow the hardware to generate an output so that the data\n@@ -625,8 +623,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \t\t\treturn -EINVAL;\n \t\t}\n \n-\t\tispOutputTotal_++;\n-\n \t\tLOG(RPI, Debug) << \"Defaulting ISP Output0 format to \"\n \t\t\t\t<< format;\n \t}\n@@ -662,8 +658,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \t\t\t\t\t<< ret;\n \t\t\treturn -EINVAL;\n \t\t}\n-\n-\t\tispOutputTotal_++;\n \t}\n \n \t/* ISP statistics output format. */\n@@ -676,8 +670,6 @@ int Vc4CameraData::platformConfigure(const RPi::RPiCameraConfiguration *rpiConfi\n \t\treturn ret;\n \t}\n \n-\tispOutputTotal_++;\n-\n \t/*\n \t * Configure the Unicam embedded data output format only if the sensor\n \t * supports it.\n@@ -843,12 +835,6 @@ void Vc4CameraData::ispOutputDequeue(FrameBuffer *buffer)\n \t\thandleStreamBuffer(buffer, stream);\n \t}\n \n-\t/*\n-\t * Increment the number of ISP outputs generated.\n-\t * This is needed to track dropped frames.\n-\t */\n-\tispOutputCount_++;\n-\n \thandleState();\n }\n \n@@ -880,7 +866,6 @@ void Vc4CameraData::prepareIspComplete(const ipa::RPi::BufferIds &buffers,\n \t\t\t<< \", timestamp: \" << buffer->metadata().timestamp;\n \n \tisp_[Isp::Input].queueBuffer(buffer);\n-\tispOutputCount_ = 0;\n \n \tif (sensorMetadata_ && embeddedId) {\n \t\tbuffer = unicam_[Unicam::Embedded].getBuffers().at(embeddedId & RPi::MaskID).buffer;\n","prefixes":["v3","5/6"]}