Patch Detail
Show a patch.
GET /api/patches/17318/?format=api
{ "id": 17318, "url": "https://patchwork.libcamera.org/api/patches/17318/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17318/", "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": "<20220908014200.28728-10-laurent.pinchart@ideasonboard.com>", "date": "2022-09-08T01:41:37", "name": "[libcamera-devel,v4,09/32] ipa: ipu3: Use base FrameContext class", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "f22ccfb9a0086bb0d003c61ca0f05fb549a409be", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/17318/mbox/", "series": [ { "id": 3476, "url": "https://patchwork.libcamera.org/api/series/3476/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3476", "date": "2022-09-08T01:41:28", "name": "ipa: Frame context queue, IPU3 & RkISP consolidation, and RkISP1 improvements", "version": 4, "mbox": "https://patchwork.libcamera.org/series/3476/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/17318/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17318/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 D213CC327E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 8 Sep 2022 01:42:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 882CF620AD;\n\tThu, 8 Sep 2022 03:42:31 +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 5E78C620B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 8 Sep 2022 03:42:30 +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 DD83D888\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 8 Sep 2022 03:42:29 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662601351;\n\tbh=9WeMQgLeNyxB5edUAp1qiDP6ehK4JQAlX4CfMPpflBU=;\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=OPo1uo27F6coZhWBa+DS9xBs2SF/P5w8UCZR+EGZrB/3ggA6d59Reu0WiWbvu9fs/\n\tdNfwmoK7DKVymkr14Rg+p/+TzRuFICKes5IYMkeoB3QVy0XUXPEQcP3miLsVWYnf1o\n\tOjTGLkrJn3RkJ6LYobQ4Xufjvj+4YojcbvhGLHCBXe1bmqmO2ENd/F53hdXxUGyUrv\n\tySpWLe+XDscYdXSWmzqclI6x1tB5EFXzQrBF2UAssZ8MQJRJPSp5VtSvmDMc8aS0/B\n\t0XkbZXMSo4tNlQwlVs3UCtbuKJq0AUZ9vcglFa763InxchkGxkbFZWhtwlLcM6EN8h\n\tpjtvamuHscVWg==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662601350;\n\tbh=9WeMQgLeNyxB5edUAp1qiDP6ehK4JQAlX4CfMPpflBU=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=Bb++AA9MvZq2OA+PsRV8Cw3uuAsYhiM0ppjkjrjNHkTZ63KPhioopoR+8ZxstM3vr\n\tAn6/H5Er/uuLqac12uuKy1ZrTIivQgoV+OBTMLzr5sYjUIjHEjl69CWzofS1FXZfdT\n\tBUycEDlvQ0HpzsUKi5rNdQ+tfw8rhGPF0Eqtrwhw=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Bb++AA9M\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 8 Sep 2022 04:41:37 +0300", "Message-Id": "<20220908014200.28728-10-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>", "References": "<20220908014200.28728-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 09/32] 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\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\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", "v4", "09/32" ] }