Patch Detail
Show a patch.
GET /api/patches/21476/?format=api
{ "id": 21476, "url": "https://patchwork.libcamera.org/api/patches/21476/?format=api", "web_url": "https://patchwork.libcamera.org/patch/21476/", "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": "<20241002161933.247091-6-stefan.klug@ideasonboard.com>", "date": "2024-10-02T16:19:23", "name": "[v1,5/8] ipa: rkisp1: Add debug metadata support to the rkisp1", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f85459ecce2796ce363f00446362f22ab6a4606a", "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/21476/mbox/", "series": [ { "id": 4648, "url": "https://patchwork.libcamera.org/api/series/4648/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4648", "date": "2024-10-02T16:19:18", "name": "Add support for IPA debugging metadata", "version": 1, "mbox": "https://patchwork.libcamera.org/series/4648/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/21476/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/21476/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 14A37BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 2 Oct 2024 16:20:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B5F756352B;\n\tWed, 2 Oct 2024 18:20:29 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E49D63522\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 2 Oct 2024 18:20:28 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:b246:b33f:c662:8ae1])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 958AF1961;\n\tWed, 2 Oct 2024 18:18:55 +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=\"A/jAcXU1\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1727885935;\n\tbh=CssnFubvUamdyis/BcEWB10C/94940YtvnUa9bm7OMw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=A/jAcXU1XNzznEJqrjEcX36oAlHAzXnByQMynpUdagu9mKkScGXfHkIbS2gVjSgni\n\txextvyaXIVco2cQCHG4TAnCy1h99cccSj9lmxA9ikUidSr5XQ50kpyPigEkyD+qtnA\n\t3kD6WtmCviO5YxLgpDx8pLGTmgb1585LlOqNM/rQ=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>", "Subject": "[PATCH v1 5/8] ipa: rkisp1: Add debug metadata support to the rkisp1", "Date": "Wed, 2 Oct 2024 18:19:23 +0200", "Message-ID": "<20241002161933.247091-6-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20241002161933.247091-1-stefan.klug@ideasonboard.com>", "References": "<20241002161933.247091-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 src/ipa/rkisp1/ipa_context.h | 5 +++++\n src/ipa/rkisp1/rkisp1.cpp | 4 ++++\n 2 files changed, 9 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..5b1ef0c372c6 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@@ -368,6 +370,7 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId\n \t\tcontext_.camHelper->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());\n \n \tControlList metadata(controls::controls);\n+\tcontext_.debugMetadata.assignControlList(&metadata);\n \n \tfor (auto const &a : algorithms()) {\n \t\tAlgorithm *algo = static_cast<Algorithm *>(a.get());\n@@ -377,6 +380,7 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId\n \t}\n \n \tsetControls(frame);\n+\tcontext_.debugMetadata.assignControlList(nullptr);\n \n \tmetadataReady.emit(frame, metadata);\n }\n", "prefixes": [ "v1", "5/8" ] }