Show a patch.

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

{
    "id": 23346,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/23346/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/23346/",
    "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": "<20250507082753.2306743-6-naush@raspberrypi.com>",
    "date": "2025-05-07T07:52:12",
    "name": "[RFC,5/6] pipeline: rpi: Remove ispOutputCount_ and ispOutputTotal_",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/23346/mbox/",
    "series": [
        {
            "id": 5164,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5164/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5164",
            "date": "2025-05-07T07:52:07",
            "name": "Eliminating startup frames",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5164/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/23346/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/23346/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 6132BC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 May 2025 08:28:17 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4E77768B34;\n\tWed,  7 May 2025 10:28:14 +0200 (CEST)",
            "from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B7A768B33\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 May 2025 10:28:01 +0200 (CEST)",
            "by mail-wr1-x431.google.com with SMTP id\n\tffacd0b85a97d-3a0b0dd3b5bso161521f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 07 May 2025 01:28:01 -0700 (PDT)",
            "from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-441d440fff6sm22182575e9.25.2025.05.07.01.28.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 07 May 2025 01:28:00 -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=\"m8bRhiI7\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1746606481; x=1747211281;\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=m8bRhiI7VHLdkVmYaGltNOAzXLNhftjO5FNcHyDA4DsLNAOG1erw4y7NjRLeXAkFGN\n\thUfkWK5W/kUEpRY0DL/Vxs6cxamXT8dgch7ebMbFzpS/xEypf5mmMacUOIqJPKKVGoUe\n\tw0xaYUIHE1QOJNBXfPKAsI9FFGcBk1IGY0Lhug1zAnQsZcaYCZgMgOC4jBSw5qiWATkj\n\tcreDKIz/m0Kz2IoeLZbp2n4NO2ryO0hAJGYeaHg+K3yRd3qkUt6YjRHR6uKAEHMnp+A6\n\tCfgYRmyUGQJFtaYnz22N3pv17sabPNyp5jD7W4JRaLOQn/4v2YkJrPXbjWfncExulsWw\n\t8Kkg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1746606481; x=1747211281;\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=A77v3m4JVBQDG3YxkkL8pkeqg0KlF07KS0CxE6I6MSemeQUN/al7EjSMc5t/YRk+WI\n\to7kzZRgQuml8vrQe0LoTPCB7cdSoMMwXMZjP1ZH0cYF/lbJH/5lm4obHvRRBxO7Q9sLk\n\tdas5Eegp2zn2gEkCCFNIx91WckGdmDDimSlEz38U2v5uyD2vZdO6/ehw6Ql46JnJ2RXC\n\tCL/oJkyQgjNgmEK45eGn66zwLtfP8QvbCuMAF2bnOE9Cb/oFbWFgXAM/at6lqidTLYcz\n\tDSgjJqFkw+MUrK/gX736zAz3fZ2WA/EglWLSVclbEltpg1V47BPK2xNKO1wrRc12YE5W\n\t48pw==",
        "X-Gm-Message-State": "AOJu0Yz2YgjNqszihTc+E4zkGwVbTkNWocMk51nT94GPCv5pyL5pKZqv\n\tdKFWP2CGaPOicE1Yq42XizK0eEo+4OQg6LrRKnoX9iIZGCaccdBeWjByIOqdaH9LfgE3NHJYw9U\n\tI",
        "X-Gm-Gg": "ASbGncuKEDYHGrY+hh6fNU3QtDJXs51HHYE/I+d2vvC6LHdZtg23j8NLgSvxz+CXstS\n\tbNqcA3aeYWhHhQ6+gVXTHpfyL2LD3b6X+SPTkFwZvNFW521heUo82s1sfnpPWTtlVYG0Qbyx2Ur\n\tPzDzJ9UUSFmR7mUdfzV8nBIf5Zm9yJ1KUF45FsGRMGpMFE8sl9kyibH2Ge3levmzqZxh+HLX5Ud\n\t2OZDjDdKDz85g57ecgF7qHLPW58jVymkzrWFt/ZkX7xY1+g1qQiMoX5ANwZX4zYgcxv2qRQ6bVI\n\tPx7m8cgqgxuhOwpSWKLEKol9hCgB6zxagKqEJK2nhWRUpRCCeez0UvvexH6V",
        "X-Google-Smtp-Source": "AGHT+IGr21+tSsVRDiZfnP+i3RPITy8FkNZSO/gplnSdPsan+gGNn9X3G630ixx1It6KluUfyt+SZQ==",
        "X-Received": "by 2002:a05:600c:3d9b:b0:439:9a1f:d73d with SMTP id\n\t5b1f17b1804b1-441d44ecc08mr5683615e9.8.1746606480774; \n\tWed, 07 May 2025 01:28:00 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[RFC PATCH 5/6] pipeline: rpi: Remove ispOutputCount_ and\n\tispOutputTotal_",
        "Date": "Wed,  7 May 2025 08:52:12 +0100",
        "Message-ID": "<20250507082753.2306743-6-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20250507082753.2306743-1-naush@raspberrypi.com>",
        "References": "<20250507082753.2306743-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": [
        "RFC",
        "5/6"
    ]
}