Show a patch.

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

{
    "id": 15377,
    "url": "https://patchwork.libcamera.org/api/patches/15377/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/15377/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20220224113347.80001-2-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2022-02-24T11:33:43",
    "name": "[libcamera-devel,v3,1/5] ipa: rkisp1: Use frame counter for the request queued",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "2ce8cd37fcecf0cd1eb6160db5b316cc65dd831d",
    "submitter": {
        "id": 75,
        "url": "https://patchwork.libcamera.org/api/people/75/?format=api",
        "name": "Jean-Michel Hautbois",
        "email": "jeanmichel.hautbois@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/15377/mbox/",
    "series": [
        {
            "id": 2937,
            "url": "https://patchwork.libcamera.org/api/series/2937/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2937",
            "date": "2022-02-24T11:33:42",
            "name": "IPA RkISP1 awb and misc improvements",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/2937/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/15377/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/15377/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 2B663BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Feb 2022 11:33:57 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 08B9D601F9;\n\tThu, 24 Feb 2022 12:33:56 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 30B03610F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Feb 2022 12:33:53 +0100 (CET)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:ce74:6df2:4b76:b230])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ADB1B484;\n\tThu, 24 Feb 2022 12:33:52 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Ln5TpxzI\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1645702432;\n\tbh=mMJuuto1bzrXlL+ATfOahFbg6hgrOBbR0dCtYEcgtPk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Ln5TpxzIhaANpCh7AHlq3ueq90wUIVSFoYyED9mineL1HJYIOu46Fp4rtX01AQlL0\n\trZAX4MlKaCfLcMWiL9aTk8MGteshui1LMejcZQoT6snptpotum+PUWjmeMyr/34khM\n\tarQVnxklm8bF50EtQlDoep63Bazg6NnBwK/qgDFc=",
        "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 24 Feb 2022 12:33:43 +0100",
        "Message-Id": "<20220224113347.80001-2-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20220224113347.80001-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20220224113347.80001-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v3 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>",
        "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>\n\n---\nv3: - replace frameId by a frame counter\n    - Change the date of the copyright\n---\n src/ipa/rkisp1/ipa_context.cpp | 9 ++++++++-\n src/ipa/rkisp1/ipa_context.h   | 4 +++-\n src/ipa/rkisp1/rkisp1.cpp      | 3 +++\n 3 files changed, 14 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex 9cb2a9fd..664f572f 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,11 @@ namespace libcamera::ipa::rkisp1 {\n  * \\brief Analogue gain multiplier\n  */\n \n+/**\n+ * \\var IPAFrameContext::frameCount\n+ * \\brief Number of queued requests for this frame context\n+ *\n+ * It restarts from 0 when the camera is started.\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 2d79f15f..f119b3f3 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -196,6 +196,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@@ -284,6 +286,7 @@ void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params,\n \top.op = ActionParamFilled;\n \n \tqueueFrameAction.emit(frame, op);\n+\tcontext_.frameContext.frameCount++;\n }\n \n void IPARkISP1::updateStatistics(unsigned int frame,\n",
    "prefixes": [
        "libcamera-devel",
        "v3",
        "1/5"
    ]
}