Show a patch.

GET /api/1.1/patches/23390/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 23390,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23390/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23390/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20250519092245.269048-6-naush@raspberrypi.com>",
    "date": "2025-05-19T09:20:53",
    "name": "[v1,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/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/23390/mbox/",
    "series": [
        {
            "id": 5182,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5182/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5182",
            "date": "2025-05-19T09:20:48",
            "name": "Eliminating startup frames",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5182/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23390/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23390/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 050F2C331E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 19 May 2025 09:23:04 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C957768D7A;\n\tMon, 19 May 2025 11:23:03 +0200 (CEST)",
            "from mail-wm1-x332.google.com (mail-wm1-x332.google.com\n\t[IPv6:2a00:1450:4864:20::332])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A0D268D7A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 May 2025 11:22:54 +0200 (CEST)",
            "by mail-wm1-x332.google.com with SMTP id\n\t5b1f17b1804b1-43cfe99f2a7so4145935e9.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 19 May 2025 02:22:54 -0700 (PDT)",
            "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-3a366e08747sm8645961f8f.95.2025.05.19.02.22.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 19 May 2025 02:22:53 -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=\"nnnrMIs3\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1747646574; x=1748251374;\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=HyZHAEPEvRlhx9HxiH7c+Sa84pjnUrsNuklV5311nY4=;\n\tb=nnnrMIs3iphU3CGkXZZcEhkBGAeJj5olIpVvhPpyJ8zyGYYSbDmwKCw3EjdLMeARGs\n\tOoO7G+U2gAB5yE8c89SPWhXstHTv6uKZ7JfWvv3cickd8jR72BOH0ljkTJNE1Lf4D9c3\n\tv/a1BG0uVIBVse0otbRxjrLmzU4eXvv0ntw9TD8qPG5KjyGopfcI3HBcKdZjPeYoHcoc\n\tCTvZU/vSG0CI6yt2zpkdkfWtihcN21GU5B0UCDvzCtuCmNopVdgg1tBCNCxqXPANroSp\n\tjbaZK0o0qSCntTetb89eug0ct8f8jnMCXs/Vu0dYIIjOF/Lvgxi3dJ7Bn559xBcrkUvC\n\tuLcg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1747646574; x=1748251374;\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=HyZHAEPEvRlhx9HxiH7c+Sa84pjnUrsNuklV5311nY4=;\n\tb=eqRDyLHBUsW2lfWCRgTAYeGZFdf4/LUVV2vx9ZDRdWHrCxWydKiNRgdhrL/tnodBST\n\t24TMY087A5jVRUvf0sA11/nyZMVTHpt5pAyKuX2kCzbpjATHrTRNNktb8GhxKI9TrIjB\n\tpxUyWA5goxaOUT+QruVwwap2iaC0lvccpYOQBxf/fS8hg3ihoRVabThuj4xOE9dqGR5w\n\tdSJvH24AXsMh+xEEwZpWjks+IU9qbWL2eNDgz9q2c+zbOOWtaBq/QkMTUR93LiFohrZv\n\tsuJl8AI3iuf+7XJC8v0wDiDIvsILwmNuEEpvYzpef/atA9g7P+Xo7tb9oH977dNz41Fi\n\tw+6A==",
        "X-Gm-Message-State": "AOJu0Yw9fhSoaIceRRg1fFfA/9eT2DepakWRAOCRdRIn7ybZibFQa6+h\n\tIUpCsK9AdiVGDuuaPctmXULo+z1BFbE5hKKP9D4A1oWUxaRXm8PPk/Hm03rhsKY9dWAsumF7AoU\n\tGXHi3",
        "X-Gm-Gg": "ASbGncv1WwNcNFP5MU3F1ASuL0lsDSnLX5OGrJ9t5bTvt53wL8ASPrtPK0U3YGs9fZI\n\tzX1cVoRQ+ZtYS+IISCtvvto2FIyMODDmw/JFtnhELkSvdgC9q1fPFTwqjOvCe6IwS9BAu0DAUYO\n\tQIbdpmaFSIG/Jl86GLHWrEUwfpV/lgOa6FgV4U9YgS/kjGJ/meMKX+fk4t8yk+N9CqPlVzZ7uXH\n\tJR7ao9jYjlFWIAfVXVEJcu7SC+CxN/EFQEcal0qoGt14VTTj1JIBudBq+VaVwVfJV/Ii+gwapey\n\tQKB38Lv5z8NbAqRFnX8qw3B61sT0XnIAg1JiJ0Ej3CVS3WqwtUtoF70CRm+H7IJ/q8nlMWTIssF\n\tl7yBmPg==",
        "X-Google-Smtp-Source": "AGHT+IHKPj7U53tgMhR2lnKh+fg6qYusXxNLkRdDDXG0VWXDG5P+fTTEsONIbP1RoZYb/4yalhxSsQ==",
        "X-Received": "by 2002:a05:600d:108:10b0:43b:c0fa:f9bf with SMTP id\n\t5b1f17b1804b1-442fd7165b7mr21711295e9.3.1747646573789; \n\tMon, 19 May 2025 02:22:53 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH v1 5/6] pipeline: rpi: Remove ispOutputCount_ and\n\tispOutputTotal_",
        "Date": "Mon, 19 May 2025 10:20:53 +0100",
        "Message-ID": "<20250519092245.269048-6-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250519092245.269048-1-naush@raspberrypi.com>",
        "References": "<20250519092245.269048-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>\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": [
        "v1",
        "5/6"
    ]
}