Patch Detail
Show a patch.
GET /api/1.1/patches/17420/?format=api
{ "id": 17420, "url": "https://patchwork.libcamera.org/api/1.1/patches/17420/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17420/", "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": "<20220927023642.12341-10-laurent.pinchart@ideasonboard.com>", "date": "2022-09-27T02:36:18", "name": "[libcamera-devel,v5,09/33] ipa: ipu3: Use base FrameContext class", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "f22ccfb9a0086bb0d003c61ca0f05fb549a409be", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17420/mbox/", "series": [ { "id": 3506, "url": "https://patchwork.libcamera.org/api/1.1/series/3506/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3506", "date": "2022-09-27T02:36:09", "name": "ipa: Frame context queue, IPU3 & RkISP consolidation, and RkISP1 improvements", "version": 5, "mbox": "https://patchwork.libcamera.org/series/3506/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17420/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17420/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 94909C327E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 27 Sep 2022 02:37:15 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4558062280;\n\tTue, 27 Sep 2022 04:37:15 +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 394A362289\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Sep 2022 04:37:13 +0200 (CEST)", "from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B24CC47C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 27 Sep 2022 04:37:12 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1664246235;\n\tbh=lWREngrB4gOteSDuh0Ey3KbllXbKoBisx8QRdnhiPA4=;\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=Lx9OIVXxwv7Y3IsPSQIocHXnaTGGqwKTCPXNnl8HYTTbDdGyjJeFGB/HPK1fOlt7m\n\tP64gAML4iFpLQ1FJs27SmAo57UfPjPzDWjMhdGhkt6imlRbBc8YNEReAEMb1z8cF8w\n\teIXsX8XRt190eimuU4lacqCWrpXtAGq/msjxSLrtFQMXrJ4dGhCT96eLv9e7fnbH0v\n\tJBoBTheS32qaFyFJHzo/6YEhxCgHd+YGI01wFmUJqqk0tZKHR9pNQguTTNVHX68GeI\n\t50BuYEWuga5i+I7C88TbImYybr3mJ+DfoZsQ7r9fTmMeIkJteuZAF+0DvVaB3agzo7\n\taHMKhJtDnsQ5w==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1664246232;\n\tbh=lWREngrB4gOteSDuh0Ey3KbllXbKoBisx8QRdnhiPA4=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Qrb4wp+xp+fVJoSJweU3RAnyNN646F/wx4Fl56+dGGfrRqq2M5aRGfvAqjY4oF8Ex\n\t9gOIZXIhfbiVRG7VhU1bOTd07AmRdIGlhHmzyysx3NtF+s5cXKQ9dCQZYxioNwGalM\n\tWOdf9xwd+RT0u62xf7esFRopKXJwvGni9OBSeUzk=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Qrb4wp+x\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 27 Sep 2022 05:36:18 +0300", "Message-Id": "<20220927023642.12341-10-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220927023642.12341-1-laurent.pinchart@ideasonboard.com>", "References": "<20220927023642.12341-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v5 09/33] ipa: ipu3: Use base FrameContext\n\tclass", "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Inherit from the base FrameContext class in the IPU3 IPAFrameContext.\nThis allows dropping the frame member, which is now stored in the base\nclass.\n\nAs the frame member of the base FrameContext class is private, the check\nthat accesses it in IPAIPU3::processStatsBuffer() would fail to compile.\nAs it won't be relevant anymore with the upcoming switch to the FCQueue\nclass, drop it.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/ipa/ipu3/ipa_context.cpp | 24 ++++--------------------\n src/ipa/ipu3/ipa_context.h | 7 ++++---\n src/ipa/ipu3/ipu3.cpp | 5 +----\n 3 files changed, 9 insertions(+), 27 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp\nindex 13cdb835ef7f..9cfca0db3a0d 100644\n--- a/src/ipa/ipu3/ipa_context.cpp\n+++ b/src/ipa/ipu3/ipa_context.cpp\n@@ -35,22 +35,6 @@ namespace libcamera::ipa::ipu3 {\n * most recently computed by the IPA algorithms.\n */\n \n-/**\n- * \\struct IPAFrameContext\n- * \\brief Context for a frame\n- *\n- * The frame context stores data specific to a single frame processed by the\n- * IPA. Each frame processed by the IPA has a context associated with it,\n- * accessible through the IPAContext structure.\n- *\n- * Fields in the frame context should reflect values and controls\n- * associated with the specific frame as requested by the application, and\n- * as configured by the hardware. Fields can be read by algorithms to\n- * determine if they should update any specific action for this frame, and\n- * finally to update the metadata control lists when the frame is fully\n- * completed.\n- */\n-\n /**\n * \\struct IPAContext\n * \\brief Global IPA context data shared between all algorithms\n@@ -188,15 +172,15 @@ IPAFrameContext::IPAFrameContext() = default;\n /**\n * \\brief Construct a IPAFrameContext instance\n */\n-IPAFrameContext::IPAFrameContext(uint32_t id, const ControlList &reqControls)\n-\t: frame(id), frameControls(reqControls)\n+IPAFrameContext::IPAFrameContext(const ControlList &reqControls)\n+\t: frameControls(reqControls)\n {\n \tsensor = {};\n }\n \n /**\n- * \\var IPAFrameContext::frame\n- * \\brief The frame number\n+ * \\struct IPAFrameContext\n+ * \\brief IPU3-specific FrameContext\n *\n * \\var IPAFrameContext::frameControls\n * \\brief Controls sent in by the application while queuing the request\ndiff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h\nindex 42e11141d3a1..e8fc42769075 100644\n--- a/src/ipa/ipu3/ipa_context.h\n+++ b/src/ipa/ipu3/ipa_context.h\n@@ -17,6 +17,8 @@\n #include <libcamera/controls.h>\n #include <libcamera/geometry.h>\n \n+#include <libipa/fc_queue.h>\n+\n namespace libcamera {\n \n namespace ipa::ipu3 {\n@@ -76,16 +78,15 @@ struct IPAActiveState {\n \t} toneMapping;\n };\n \n-struct IPAFrameContext {\n+struct IPAFrameContext : public FrameContext {\n \tIPAFrameContext();\n-\tIPAFrameContext(uint32_t id, const ControlList &reqControls);\n+\tIPAFrameContext(const ControlList &reqControls);\n \n \tstruct {\n \t\tuint32_t exposure;\n \t\tdouble gain;\n \t} sensor;\n \n-\tuint32_t frame;\n \tControlList frameControls;\n };\n \ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex e5a763fd2b08..b1b23fd8f927 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -607,9 +607,6 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,\n \n \tIPAFrameContext &frameContext = context_.frameContexts[frame % kMaxFrameContexts];\n \n-\tif (frameContext.frame != frame)\n-\t\tLOG(IPAIPU3, Warning) << \"Frame \" << frame << \" does not match its frame context\";\n-\n \tframeContext.sensor.exposure = sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();\n \tframeContext.sensor.gain = camHelper_->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());\n \n@@ -654,7 +651,7 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,\n void IPAIPU3::queueRequest(const uint32_t frame, const ControlList &controls)\n {\n \t/* \\todo Start processing for 'frame' based on 'controls'. */\n-\tcontext_.frameContexts[frame % kMaxFrameContexts] = { frame, controls };\n+\tcontext_.frameContexts[frame % kMaxFrameContexts] = { controls };\n }\n \n /**\n", "prefixes": [ "libcamera-devel", "v5", "09/33" ] }