Show a patch.

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

{
    "id": 21528,
    "url": "https://patchwork.libcamera.org/api/patches/21528/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21528/",
    "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": "<20241007095425.211158-6-stefan.klug@ideasonboard.com>",
    "date": "2024-10-07T09:54:09",
    "name": "[v2,5/7] ipa: rkisp1: Add debug metadata support to the rkisp1",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6bf976cda5a5d363b38a05be85fbfb90b57f8c1c",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21528/mbox/",
    "series": [
        {
            "id": 4661,
            "url": "https://patchwork.libcamera.org/api/series/4661/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4661",
            "date": "2024-10-07T09:54:04",
            "name": "Add support for IPA debugging metadata",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4661/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21528/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21528/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 D36EDC32DE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  7 Oct 2024 09:54:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 563D965369;\n\tMon,  7 Oct 2024 11:54:49 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54E3F63535\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  7 Oct 2024 11:54:45 +0200 (CEST)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:ba12:1296:516b:1122])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6E25915EE;\n\tMon,  7 Oct 2024 11:53:09 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"glVFO+vM\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1728294789;\n\tbh=RWLslE+nEKrMmRrdopi/a+SQk3O4hbiE3plewPKBxKQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=glVFO+vM9C78cOTAaCRCU0qsD3MkPtFkbslVRo1zxye6Fp/xTBOG2yfC0BuabJrIh\n\tRXu6Vj3QGxsM4AQixXRwD8t3uUspoylDyBetInAtM8rqXQ6KM32JJTm+yvXypvVk4U\n\tmzSpzc30TfTrUc8pIFMPJwybOCZHNyyfWJA72+Oo=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[PATCH v2 5/7] ipa: rkisp1: Add debug metadata support to the rkisp1",
        "Date": "Mon,  7 Oct 2024 11:54:09 +0200",
        "Message-ID": "<20241007095425.211158-6-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20241007095425.211158-1-stefan.klug@ideasonboard.com>",
        "References": "<20241007095425.211158-1-stefan.klug@ideasonboard.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": "Add a DebugMetadata helper to the context and add the corresponding\nplumbing.  This is all that is needed to support debug metadata in an\nIPA.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\n---\nChanges in v2:\n- Replace DebugMetadata::assignList by DebugMetadata::moveEntries\n---\n src/ipa/rkisp1/ipa_context.h | 5 +++++\n src/ipa/rkisp1/rkisp1.cpp    | 3 +++\n 2 files changed, 8 insertions(+)",
    "diff": "diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h\nindex d52e73ad2503..7b93a9e9461d 100644\n--- a/src/ipa/rkisp1/ipa_context.h\n+++ b/src/ipa/rkisp1/ipa_context.h\n@@ -17,8 +17,11 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/controls.h>\n #include <libcamera/geometry.h>\n+\n #include <libcamera/ipa/core_ipa_interface.h>\n \n+#include \"libcamera/internal/debug_controls.h\"\n+\n #include <libipa/camera_sensor_helper.h>\n #include <libipa/fc_queue.h>\n #include <libipa/matrix.h>\n@@ -194,6 +197,8 @@ struct IPAContext {\n \n \tControlInfoMap::Map ctrlMap;\n \n+\tDebugMetadata debugMetadata;\n+\n \t/* Interface to the Camera Helper */\n \tstd::unique_ptr<CameraSensorHelper> camHelper;\n };\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex a579f21de56f..b96141aabf0f 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -117,6 +117,7 @@ const IPAHwSettings ipaHwSettingsV12{\n const ControlInfoMap::Map rkisp1Controls{\n \t{ &controls::AwbEnable, ControlInfo(false, true) },\n \t{ &controls::ColourGains, ControlInfo(0.0f, 3.996f, 1.0f) },\n+\t{ &controls::DebugMetadataEnable, ControlInfo(false, true, false) },\n \t{ &controls::Sharpness, ControlInfo(0.0f, 10.0f, 1.0f) },\n \t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n };\n@@ -326,6 +327,7 @@ void IPARkISP1::unmapBuffers(const std::vector<unsigned int> &ids)\n void IPARkISP1::queueRequest(const uint32_t frame, const ControlList &controls)\n {\n \tIPAFrameContext &frameContext = context_.frameContexts.alloc(frame);\n+\tcontext_.debugMetadata.checkForEnable(controls);\n \n \tfor (auto const &a : algorithms()) {\n \t\tAlgorithm *algo = static_cast<Algorithm *>(a.get());\n@@ -377,6 +379,7 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId\n \t}\n \n \tsetControls(frame);\n+\tcontext_.debugMetadata.moveEntries(metadata);\n \n \tmetadataReady.emit(frame, metadata);\n }\n",
    "prefixes": [
        "v2",
        "5/7"
    ]
}