Show a patch.

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

{
    "id": 15564,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/15564/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15564/",
    "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": "<20220328092433.69856-2-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2022-03-28T09:24:29",
    "name": "[libcamera-devel,v4,1/5] ipa: rkisp1: Use frame counter for the request queued",
    "commit_ref": "f84e5e01a4dbec6183c53810d1e579d32674aaae",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "f40238ea1be6984dbd54f0e5c8141c5dc9e823f8",
    "submitter": {
        "id": 75,
        "url": "https://patchwork.libcamera.org/api/1.1/people/75/?format=api",
        "name": "Jean-Michel Hautbois",
        "email": "jeanmichel.hautbois@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15564/mbox/",
    "series": [
        {
            "id": 3005,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3005/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3005",
            "date": "2022-03-28T09:24:28",
            "name": "IPA RkISP1 awb and misc improvements",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/3005/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15564/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15564/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 6ECF6C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 28 Mar 2022 09:24:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 937796563A;\n\tMon, 28 Mar 2022 11:24:43 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EE550604BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 28 Mar 2022 11:24:41 +0200 (CEST)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:4f49:c672:4655:7dbb])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 669FFB9C;\n\tMon, 28 Mar 2022 11:24:41 +0200 (CEST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648459483;\n\tbh=NhCazlqMoha0m10Fd7/+krMZZzST5W4Cn1YefZ60kgA=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=RsGPESc1WIhTJkTw87K2h6uS5o+r7u0qOXAU25zVHyVKWKwYxGYnowoDltKcgnnX7\n\t8xjqdY/oxu68wz9R1CNDo6jW9v2OVZdw594yOhxPgT3yAbr6OAM+BLq23zAXv5uORI\n\tIZCY7izp5k0MJlEa5H7fUQ5M7I9R2+b7W2JAGpFD1eDi2fCXyA8h38m34V6INFzxkS\n\tYIHpzY/tvXpWC9fviYMDLZGHrePjZ3Ta+giAo3cyXJbF/yiemXKsnDVevLNPsi0h3h\n\tEq8wIKG7MeuzJntSJMMIbjTynGRq9E73Lnzq76O3LlgHC0moUcgFirIPmMma9SSqxy\n\tOjfkE3qHsAf4A==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648459481;\n\tbh=NhCazlqMoha0m10Fd7/+krMZZzST5W4Cn1YefZ60kgA=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=jAiPKUoRCwGRPy2V428wHI53Tokqb0MffKbN8Hbg0mfbAo90MDKp23H7s/wCO6HAS\n\tG2bTd+90K4o0VS5xBXPBPk8qXvSHwIcZAxeBXxh9qXDHdnFDI2dmac7WtDfiUz1NZ9\n\tNDQkjsVT5CwclWCHjJ0oZDNZGco5gMJbvEBGP0lc="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"jAiPKUoR\"; dkim-atps=neutral",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 28 Mar 2022 11:24:29 +0200",
        "Message-Id": "<20220328092433.69856-2-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220328092433.69856-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20220328092433.69856-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 1/5] ipa: rkisp1: Use frame counter for\n\tthe request queued",
        "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>",
        "From": "Jean-Michel Hautbois via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Introduce a frameCount variable in the IPAFrameContext which increments\neach time a request is queued. It is reset at configure call, when the\ncamera is started.\n\nThis will allow the frameCount to be used by other algorithms, without\nhaving to keep multiple private frame counters.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rkisp1/ipa_context.cpp | 11 ++++++++++-\n src/ipa/rkisp1/ipa_context.h   |  4 +++-\n src/ipa/rkisp1/rkisp1.cpp      |  3 +++\n 3 files changed, 16 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 9cb2a9fd..c22e02d5 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -1,6 +1,6 @@\n /* SPDX-License-Identifier: LGPL-2.1-or-later */\n /*\n- * Copyright (C) 2021, Ideas On Board\n+ * Copyright (C) 2021-2022, Ideas On Board\n  *\n  * ipa_context.cpp - RkISP1 IPA Context\n  */\n@@ -113,4 +113,13 @@ namespace libcamera::ipa::rkisp1 {\n  * \\brief Analogue gain multiplier\n  */\n \n+/**\n+ * \\var IPAFrameContext::frameCount\n+ * \\brief Counter of requests queued to the IPA module\n+ *\n+ * The counter is reset to 0 when the IPA module is configured, and is\n+ * incremented for each request being queued, after calling the\n+ * Algorithm::prepare() function of all algorithms.\n+ */\n+\n } /* namespace libcamera::ipa::rkisp1 */\ndiff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex b94ade0c..212fa052 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -1,6 +1,6 @@\n /* SPDX-License-Identifier: LGPL-2.1-or-later */\n /*\n- * Copyright (C) 2021, Ideas On Board\n+ * Copyright (C) 2021-2022, Ideas On Board\n  *\n  * ipa_context.h - RkISP1 IPA Context\n  *\n@@ -43,6 +43,8 @@ struct IPAFrameContext {\n \t\tuint32_t exposure;\n \t\tdouble gain;\n \t} sensor;\n+\n+\tunsigned int frameCount;\n };\n \n struct IPAContext {\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 2225a84d..493811d9 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -190,6 +190,8 @@ int IPARkISP1::configure([[maybe_unused]] const IPACameraSensorInfo &info,\n \tcontext_.configuration.agc.minAnalogueGain = camHelper_->gain(minGain);\n \tcontext_.configuration.agc.maxAnalogueGain = camHelper_->gain(maxGain);\n \n+\tcontext_.frameContext.frameCount = 0;\n+\n \tfor (auto const &algo : algorithms_) {\n \t\tint ret = algo->configure(context_, info);\n \t\tif (ret)\n@@ -243,6 +245,7 @@ void IPARkISP1::queueRequest(const uint32_t frame, const uint32_t bufferId,\n \t\talgo->prepare(context_, params);\n \n \tparamsBufferReady.emit(frame);\n+\tcontext_.frameContext.frameCount++;\n }\n \n void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "1/5"
    ]
}