Show a patch.

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

{
    "id": 24187,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/24187/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24187/",
    "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": "<20250824-b4-v0-5-2-gpuisp-v2-a-v2-4-96f4576c814e@linaro.org>",
    "date": "2025-08-24T00:48:16",
    "name": "[v2,04/37] libcamera: software_isp: Move benchmark code to its own class",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c5a0f995b18e08d412628858ecb008f6a654d64b",
    "submitter": {
        "id": 175,
        "url": "https://patchwork.libcamera.org/api/1.1/people/175/?format=api",
        "name": "Bryan O'Donoghue",
        "email": "bryan.odonoghue@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24187/mbox/",
    "series": [
        {
            "id": 5400,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5400/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5400",
            "date": "2025-08-24T00:48:12",
            "name": "Add GLES 2.0 GPUISP to libcamera",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/5400/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24187/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24187/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 0BECCBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 24 Aug 2025 00:48:51 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AECE5692FB;\n\tSun, 24 Aug 2025 02:48:46 +0200 (CEST)",
            "from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com\n\t[IPv6:2a00:1450:4864:20::42e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 49E74692E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 24 Aug 2025 02:48:40 +0200 (CEST)",
            "by mail-wr1-x42e.google.com with SMTP id\n\tffacd0b85a97d-3c68ac7e238so724682f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Aug 2025 17:48:40 -0700 (PDT)",
            "from [192.168.0.13] (188-141-3-146.dynamic.upc.ie. [188.141.3.146])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-45b4e1d530esm69347225e9.0.2025.08.23.17.48.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 23 Aug 2025 17:48:39 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"EKjrcheU\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1755996520; x=1756601320;\n\tdarn=lists.libcamera.org; \n\th=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n\t:mime-version:subject:date:from:from:to:cc:subject:date:message-id\n\t:reply-to; bh=64YAzBv08eBeUOixco+cD2i/qSqZ5vgWsysXTG4pROE=;\n\tb=EKjrcheUbihDK7Iw65qZfuG3M9BsgV6S6dFvMfMy5/ZVwEr+TiCUecHMgdK65C4+Xl\n\t7vPrPCdPAagbSRMTQ1oPbIkykw0FJcf723oiq0us19IDGoDDmc7sBU21SL4MiGhhbyiR\n\tm4OalZl5/XdrbiDrXQWjv2+EKO0HKwu/dH1u0MNh+MgfnAPxKXzF0xqpv7hi7mcXWbK/\n\t6rRj8UASeqe9y0erS4A7RCAuIuWj5EVjH7mRCRq545dFAEZlqRnGrMQXQ1EhmzPrmsI1\n\t3RzOGbtx7PUQknEcJduP1hQtyoTjQNhcGuvMsFQ2ZIkaGJf3BSdCOr4EYybwsVV/Ymzz\n\t71Tw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1755996520; x=1756601320;\n\th=cc:to:in-reply-to:references:message-id:content-transfer-encoding\n\t:mime-version:subject:date:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=64YAzBv08eBeUOixco+cD2i/qSqZ5vgWsysXTG4pROE=;\n\tb=XNPctcnAxVnkGhGf03BwP23XC4heTaHYENk6FCx9DIEDyCzIE/UwX2xUdSMxxAiixV\n\t34RMQkLK4buhgCVq8+nFQfcJNYCpBsQoMrSxzdSmX2/TFJ+RvEFlXSwEPbeWJkxCViA9\n\ta3Bxfbx4aLIWU4REU2TOP5ECV3c/sY329BLfab8tqSLIcjvKO/xNxkORkDhhyKW6ahyO\n\t6BOs9pgsqJ1d4asewdjrWvYHRCEP8yspk3bHErHJVSpuQTOl2Htl3xkjImFqh3rX9gi8\n\tyGTMEcIdi1b2U8qNbhzIoCmplBghmghQn/kJNlsitXRxTV4uvxd2NyHDZlw9JqkVsICb\n\tkG/w==",
        "X-Gm-Message-State": "AOJu0Yw7aWufK1BEm1+qiizTaLzMkXbZ1ZYeqtw7Kx0+d/iNDQiDwcVh\n\tmPw/xvhiuMtR1dd+l5+vCTJn9VnCmC+zL1WL8gn8kSreycsk2gFUcWuWKL2EveN/Soc=",
        "X-Gm-Gg": "ASbGncuAQ6R4hUP93Pmm775B2fSkFb1ParQQz/Wpd6Q67eBJB3/5smj1ZUaJb27fKsU\n\tbqWRPiEZyDfGCvq9LTfO+iBacbJy8BkgFJBqGG3B4W1zRMHjOf9o3VzK0ku9jQxnWa3EZ1m6hVk\n\tLKW5RU16H/Yw1rIv5qaPyJbaUWGbVsT+h1R/BeRp6A6oHbpH2ZmXnCkDA/x9HjmBA3xljl402se\n\tIlgUVqyVYWehxJrcVTdWsHgEyXvbdcsPqO7O/LzFl0hahMgC4jSP+v/1OldkYoLAWsWiRIH2OvP\n\t9ZkP3FMptc1mCHJCKc4KYENWWPKRR7+hbQszJJzquOpmYeCCtLuxEWKixCQj6agtBf/V2QzMPxH\n\t95XPZsA5E80YlPvsDUgFSPJxIC+rKMNw2yPe4vadLCzOU4TVKKNcH2g3j1EKsMwTIBS2uk00HS7\n\t5Pv0saAXVtMZBhyRc0rYXe",
        "X-Google-Smtp-Source": "AGHT+IFJNIUqhlrANMlkLrEGqlViKR2DG9eRyz7KNLreD23B70r06CWz1YfBxtmn3iz4BXNA0kQEtQ==",
        "X-Received": "by 2002:a05:600c:45d0:b0:459:e025:8c5a with SMTP id\n\t5b1f17b1804b1-45b517d4b94mr71756715e9.33.1755996519743; \n\tSat, 23 Aug 2025 17:48:39 -0700 (PDT)",
        "From": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Date": "Sun, 24 Aug 2025 01:48:16 +0100",
        "Subject": "[PATCH v2 04/37] libcamera: software_isp: Move benchmark code to\n\tits own class",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20250824-b4-v0-5-2-gpuisp-v2-a-v2-4-96f4576c814e@linaro.org>",
        "References": "<20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org>",
        "In-Reply-To": "<20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Bryan O'Donoghue <bryan.odonoghue@linaro.org>, \n\tHans de Goede <hdegoede@redhat.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>, \n\tMilan Zamazal <mzamazal@redhat.com>",
        "X-Mailer": "b4 0.14.2",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=8718;\n\ti=bryan.odonoghue@linaro.org; h=from:subject:message-id;\n\tbh=DQzuBIbeoz7dvkzWgdJFlHALQxDxAg4mmCseoMwhdBA=;\n\tb=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBoqmFdA4vLSqqaY/cxt5GM1N5E8a7ni9aglLSfF\n\tp5o/p8j+V2JAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCaKphXQAKCRAicTuzoY3I\n\tOjNRD/4seRhRzNzaH7P8IOOtfOwEuI3CMbhdhJ1YRt1lcKpat9hgl+z1ZaaSS6Qn36x5K7dHEFj\n\t77OZHsr+pVuyXv0KoY9IK2NDloPZP36kSE05Aoei/zP4+TpIyzB1H6Ks4FRheLjo7GGMOtnbRP8\n\tkKwbKCPp9vPArX1vc4oZJu+Qug4fCl6oNfXKM7e9qYxROb5xBJVGUz4YlRsENQ9JYEfvTZNXu4d\n\tJs0vKTP0/Q17JcE4xFH6cN6BWryNkvP6OXL0kcn+nvGVGYVFwjGN6P2FWsq3DjYTkjZuomGAxJ0\n\tw3MinEuOSaWcEp4UjirMuOMBgJcUJb0Q61B7VTHllgTS+uUoXKhB2E3I1A86Bzy1+HlXB0ko9i1\n\taXENzgBfDsct0lSALXQbu8LDTMXq5P3QWUeqjjPuGiEOXy2LvC2wjtO/WtNsRYNRFriO5hE+qkl\n\tLB6PGVYJgLbK/UJMKq7h40X7D0KNQVJdNUrByHWGU2dVnnp+ilWZq5j1m3/As0nKSQoY9mnUUkL\n\tLJS/LP6khpv5TGfRtlNSRwRZHpXmjNeyPiDoNO1VJUpXWzNI5X6dPuLAr+cl2EO9WBs4guSwCWJ\n\td0xjUQkcnaVLAPPemCR6P0V0WvoLPyhIYF2WA3Xhf16BKPOw0CoGlbkGgL4DWOjsPcRECsUPpVs\n\tAuSAT59vOWC61aA==",
        "X-Developer-Key": "i=bryan.odonoghue@linaro.org; a=openpgp;\n\tfpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A",
        "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": "From: Hans de Goede <hdegoede@redhat.com>\n\nMove the code for the builtin benchmark to its own small\nBenchmark class.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\nSigned-off-by: Hans de Goede <hdegoede@redhat.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n .../libcamera/internal/software_isp/benchmark.h    | 36 +++++++++\n .../libcamera/internal/software_isp/meson.build    |  1 +\n src/libcamera/software_isp/benchmark.cpp           | 93 ++++++++++++++++++++++\n src/libcamera/software_isp/debayer_cpu.cpp         | 36 +--------\n src/libcamera/software_isp/debayer_cpu.h           |  7 +-\n src/libcamera/software_isp/meson.build             |  1 +\n 6 files changed, 135 insertions(+), 39 deletions(-)",
    "diff": "diff --git a/include/libcamera/internal/software_isp/benchmark.h b/include/libcamera/internal/software_isp/benchmark.h\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..8af2501548d75e1d0bd2043c0a83e96b3af9bd52\n--- /dev/null\n+++ b/include/libcamera/internal/software_isp/benchmark.h\n@@ -0,0 +1,36 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2024, Red Hat Inc.\n+ *\n+ * Authors:\n+ * Hans de Goede <hdegoede@redhat.com>\n+ *\n+ * Simple builtin benchmark to measure software ISP processing times\n+ */\n+\n+#pragma once\n+\n+#include <stdint.h>\n+#include <time.h>\n+\n+namespace libcamera {\n+\n+class Benchmark\n+{\n+public:\n+\tBenchmark();\n+\t~Benchmark();\n+\n+\tvoid startFrame(void);\n+\tvoid finishFrame(void);\n+\n+private:\n+\tunsigned int measuredFrames_;\n+\tint64_t frameProcessTime_;\n+\ttimespec frameStartTime_;\n+\t/* Skip 30 frames for things to stabilize then measure 30 frames */\n+\tstatic constexpr unsigned int kFramesToSkip = 30;\n+\tstatic constexpr unsigned int kLastFrameToMeasure = 60;\n+};\n+\n+} /* namespace libcamera */\ndiff --git a/include/libcamera/internal/software_isp/meson.build b/include/libcamera/internal/software_isp/meson.build\nindex ea3f3f1c1dfb3a9e87921416d471b96dc2fcf992..df7c3b97dbca7f0b645a985c857ea138a10ab402 100644\n--- a/include/libcamera/internal/software_isp/meson.build\n+++ b/include/libcamera/internal/software_isp/meson.build\n@@ -1,6 +1,7 @@\n # SPDX-License-Identifier: CC0-1.0\n \n libcamera_internal_headers += files([\n+    'benchmark.h',\n     'debayer_params.h',\n     'software_isp.h',\n     'swisp_stats.h',\ndiff --git a/src/libcamera/software_isp/benchmark.cpp b/src/libcamera/software_isp/benchmark.cpp\nnew file mode 100644\nindex 0000000000000000000000000000000000000000..b3da3c4169f907bfe9cae93fe4cafac6428f54c2\n--- /dev/null\n+++ b/src/libcamera/software_isp/benchmark.cpp\n@@ -0,0 +1,93 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2024, Red Hat Inc.\n+ *\n+ * Authors:\n+ * Hans de Goede <hdegoede@redhat.com>\n+ *\n+ * Simple builtin benchmark to measure software ISP processing times\n+ */\n+\n+#include \"libcamera/internal/software_isp/benchmark.h\"\n+\n+#include <libcamera/base/log.h>\n+\n+namespace libcamera {\n+\n+LOG_DEFINE_CATEGORY(Benchmark)\n+\n+/**\n+ * \\class Benchmark\n+ * \\brief Simple builtin benchmark\n+ *\n+ * Simple builtin benchmark to measure software ISP processing times.\n+ */\n+\n+/**\n+ * \\brief Constructs a Benchmark object\n+ */\n+Benchmark::Benchmark()\n+\t: measuredFrames_(0), frameProcessTime_(0)\n+{\n+}\n+\n+Benchmark::~Benchmark()\n+{\n+}\n+\n+static inline int64_t timeDiff(timespec &after, timespec &before)\n+{\n+\treturn (after.tv_sec - before.tv_sec) * 1000000000LL +\n+\t       (int64_t)after.tv_nsec - (int64_t)before.tv_nsec;\n+}\n+\n+/**\n+ * \\brief Start measuring process time for a single frame\n+ *\n+ * Call this function before processing frame data to start measuring\n+ * the process time for a frame.\n+ */\n+void Benchmark::startFrame(void)\n+{\n+\tif (measuredFrames_ >= Benchmark::kLastFrameToMeasure)\n+\t\treturn;\n+\n+\tframeStartTime_ = {};\n+\tclock_gettime(CLOCK_MONOTONIC_RAW, &frameStartTime_);\n+}\n+\n+/**\n+ * \\brief Finish measuring process time for a single frame\n+ *\n+ * Call this function after processing frame data to finish measuring\n+ * the process time for a frame.\n+ *\n+ * This function will log frame processing time information after\n+ * Benchmark::kLastFrameToMeasure frames have been processed.\n+ */\n+void Benchmark::finishFrame(void)\n+{\n+\tif (measuredFrames_ >= Benchmark::kLastFrameToMeasure)\n+\t\treturn;\n+\n+\tmeasuredFrames_++;\n+\n+\tif (measuredFrames_ <= Benchmark::kFramesToSkip)\n+\t\treturn;\n+\n+\ttimespec frameEndTime = {};\n+\tclock_gettime(CLOCK_MONOTONIC_RAW, &frameEndTime);\n+\tframeProcessTime_ += timeDiff(frameEndTime, frameStartTime_);\n+\n+\tif (measuredFrames_ == Benchmark::kLastFrameToMeasure) {\n+\t\tconst unsigned int measuredFrames = Benchmark::kLastFrameToMeasure -\n+\t\t\t\t\t\t    Benchmark::kFramesToSkip;\n+\t\tLOG(Benchmark, Info)\n+\t\t\t<< \"Processed \" << measuredFrames\n+\t\t\t<< \" frames in \" << frameProcessTime_ / 1000 << \"us, \"\n+\t\t\t<< frameProcessTime_ / (1000 * measuredFrames)\n+\t\t\t<< \" us/frame\";\n+\t}\n+}\n+\n+} /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/debayer_cpu.cpp b/src/libcamera/software_isp/debayer_cpu.cpp\nindex 66f6038c1e765b351871b69e915fbeea23324329..8d30bf4a2115137939f01378e8af594170d4d459 100644\n--- a/src/libcamera/software_isp/debayer_cpu.cpp\n+++ b/src/libcamera/software_isp/debayer_cpu.cpp\n@@ -554,9 +554,6 @@ int DebayerCpu::configure(const StreamConfiguration &inputCfg,\n \t\t\tlineBuffers_[i].resize(lineBufferLength_);\n \t}\n \n-\tmeasuredFrames_ = 0;\n-\tframeProcessTime_ = 0;\n-\n \treturn 0;\n }\n \n@@ -746,24 +743,9 @@ void DebayerCpu::process4(const uint8_t *src, uint8_t *dst)\n \t}\n }\n \n-namespace {\n-\n-inline int64_t timeDiff(timespec &after, timespec &before)\n-{\n-\treturn (after.tv_sec - before.tv_sec) * 1000000000LL +\n-\t       (int64_t)after.tv_nsec - (int64_t)before.tv_nsec;\n-}\n-\n-} /* namespace */\n-\n void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output, DebayerParams params)\n {\n-\ttimespec frameStartTime;\n-\n-\tif (measuredFrames_ < DebayerCpu::kLastFrameToMeasure) {\n-\t\tframeStartTime = {};\n-\t\tclock_gettime(CLOCK_MONOTONIC_RAW, &frameStartTime);\n-\t}\n+\tbench_.startFrame();\n \n \tstd::vector<DmaSyncer> dmaSyncers;\n \tfor (const FrameBuffer::Plane &plane : input->planes())\n@@ -817,21 +799,7 @@ void DebayerCpu::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output\n \tdmaSyncers.clear();\n \n \t/* Measure before emitting signals */\n-\tif (measuredFrames_ < DebayerCpu::kLastFrameToMeasure &&\n-\t    ++measuredFrames_ > DebayerCpu::kFramesToSkip) {\n-\t\ttimespec frameEndTime = {};\n-\t\tclock_gettime(CLOCK_MONOTONIC_RAW, &frameEndTime);\n-\t\tframeProcessTime_ += timeDiff(frameEndTime, frameStartTime);\n-\t\tif (measuredFrames_ == DebayerCpu::kLastFrameToMeasure) {\n-\t\t\tconst unsigned int measuredFrames = DebayerCpu::kLastFrameToMeasure -\n-\t\t\t\t\t\t\t    DebayerCpu::kFramesToSkip;\n-\t\t\tLOG(Debayer, Info)\n-\t\t\t\t<< \"Processed \" << measuredFrames\n-\t\t\t\t<< \" frames in \" << frameProcessTime_ / 1000 << \"us, \"\n-\t\t\t\t<< frameProcessTime_ / (1000 * measuredFrames)\n-\t\t\t\t<< \" us/frame\";\n-\t\t}\n-\t}\n+\tbench_.finishFrame();\n \n \t/*\n \t * Buffer ids are currently not used, so pass zeros as its parameter.\ndiff --git a/src/libcamera/software_isp/debayer_cpu.h b/src/libcamera/software_isp/debayer_cpu.h\nindex 89a89893d6c039a8d8df4ba87519becfd8fccfa3..182607cda870be6f650368479b30865c7457880e 100644\n--- a/src/libcamera/software_isp/debayer_cpu.h\n+++ b/src/libcamera/software_isp/debayer_cpu.h\n@@ -17,6 +17,7 @@\n \n #include <libcamera/base/object.h>\n \n+#include \"libcamera/internal/software_isp/benchmark.h\"\n #include \"libcamera/internal/bayer_format.h\"\n #include \"libcamera/internal/software_isp/swstats_cpu.h\"\n \n@@ -160,11 +161,7 @@ private:\n \tunsigned int xShift_; /* Offset of 0/1 applied to window_.x */\n \tbool enableInputMemcpy_;\n \tbool swapRedBlueGains_;\n-\tunsigned int measuredFrames_;\n-\tint64_t frameProcessTime_;\n-\t/* Skip 30 frames for things to stabilize then measure 30 frames */\n-\tstatic constexpr unsigned int kFramesToSkip = 30;\n-\tstatic constexpr unsigned int kLastFrameToMeasure = 60;\n+\tBenchmark bench_;\n };\n \n } /* namespace libcamera */\ndiff --git a/src/libcamera/software_isp/meson.build b/src/libcamera/software_isp/meson.build\nindex aac7eda7b5b3636e1a580ddb095a0ffd512e86ea..59fa5f02a0a5620fa524d8a171332f04e0f769b2 100644\n--- a/src/libcamera/software_isp/meson.build\n+++ b/src/libcamera/software_isp/meson.build\n@@ -8,6 +8,7 @@ if not softisp_enabled\n endif\n \n libcamera_internal_sources += files([\n+    'benchmark.cpp',\n     'debayer.cpp',\n     'debayer_cpu.cpp',\n     'software_isp.cpp',\n",
    "prefixes": [
        "v2",
        "04/37"
    ]
}