Patch Detail
Show a patch.
GET /api/patches/17333/?format=api
{ "id": 17333, "url": "https://patchwork.libcamera.org/api/patches/17333/?format=api", "web_url": "https://patchwork.libcamera.org/patch/17333/", "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-25-laurent.pinchart@ideasonboard.com>", "date": "2022-09-08T01:41:52", "name": "[libcamera-devel,v4,24/32] ipa: rkisp1: Document the active state and frame context", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "64e6ea2387a0a766c22109e5fd8bab16334ee704", "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/17333/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/17333/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/17333/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 371D4C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 8 Sep 2022 01:42:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD0FF620F1;\n\tThu, 8 Sep 2022 03:42:53 +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 5C6C562094\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 8 Sep 2022 03:42:51 +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 E0C046CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 8 Sep 2022 03:42:50 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1662601373;\n\tbh=lir+T+wpRYOiNU4TK0RI1MEqMh5BYXbnxK6geybiTVY=;\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=jc+4xEArCV/4xv9yH+1aCUaG8+WSSfPDlYF2pQxZJtgDgMUbuvTwEXGNTfbk1DUxs\n\togK6sYBMeUq+Wc4xZfkDqgfHH/U0rNortSz6HWdBbANTUD0uioLZk12nfGaI2gblv6\n\tXPnI3zyxhUX/oIuNj31p73Xo/KVdfxGhYHuzgpwstIqAMeM9pxbpYScDmeh0Acshwc\n\tMOBGFvoicVtKZkA5O7DyLHt8R6gswECwryoa+/Te2DbvlG1ZXMsstiBMhZ3SdtHUye\n\txMIjrGqY4YYBwfNI4HttGkpCPTUpR+0yCXaT/YXtqAzKykfYLiB0Qi6ONFTxm5tCza\n\t7w3u9nbJVoy7g==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1662601371;\n\tbh=lir+T+wpRYOiNU4TK0RI1MEqMh5BYXbnxK6geybiTVY=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=rhiugPjO9K8+o956ntxyYtszgIZ2C+1gJZymcOjY/3VQS/LvksbTQYZ4jLKFxj+mU\n\t/93w3LMnP4SgqxDfw0UjUO3jrWKM6U8gq5+FhiS3fiTt4kCeeXbgscLtlUNOh/zPqj\n\tSFbQxc98wzvGISPgvHODpuQiLb+AWi5CKGjgB5Yg=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rhiugPjO\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 8 Sep 2022 04:41:52 +0300", "Message-Id": "<20220908014200.28728-25-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 24/32] ipa: rkisp1: Document the active\n\tstate and frame context", "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": "Now that data used by algorithms has been partitioned between the active\nstate and frame context, we have a better view of the role of each of\nthose structures. Document them appropriately.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rkisp1/ipa_context.cpp | 55 ++++++++++++++++++++++++++++------\n 1 file changed, 46 insertions(+), 9 deletions(-)", "diff": "diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp\nindex b2628ef73d49..335cb32c538d 100644\n--- a/src/ipa/rkisp1/ipa_context.cpp\n+++ b/src/ipa/rkisp1/ipa_context.cpp\n@@ -88,16 +88,28 @@ namespace libcamera::ipa::rkisp1 {\n * \\struct IPAActiveState\n * \\brief Active state for algorithms\n *\n- * The active state stores algorithm-specific data that needs to be shared\n- * between multiple algorithms and the IPA module. It is accessible through the\n- * IPAContext structure.\n+ * The active state contains all algorithm-specific data that need to be\n+ * maintained by algorithms across frames. Unlike the session configuration,\n+ * the active state is mutable and constantly updated by algorithms. The active\n+ * state is accessible through the IPAContext structure.\n *\n- * \\todo Split the data contained in this structure between the active state\n- * and the frame contexts.\n+ * The active state stores two distinct categories of information:\n *\n- * Each of the fields in the active state belongs to either a specific\n- * algorithm, or to the top-level IPA module. A field may be read by any\n- * algorithm, but should only be written by its owner.\n+ * - The consolidated value of all algorithm controls. Requests passed to\n+ * the queueRequest() function store values for controls that the\n+ * application wants to modify for that particular frame, and the\n+ * queueRequest() function updates the active state with those values.\n+ * The active state thus contains a consolidated view of the value of all\n+ * controls handled by the algorithm.\n+ *\n+ * - The value of parameters computed by the algorithm when running in auto\n+ * mode. Algorithms running in auto mode compute new parameters every\n+ * time statistics buffers are received (either synchronously, or\n+ * possibly in a background thread). The latest computed value of those\n+ * parameters is stored in the active state in the process() function.\n+ *\n+ * Each of the members in the active state belongs to a specific algorithm. A\n+ * member may be read by any algorithm, but shall only be written by its owner.\n */\n \n /**\n@@ -185,7 +197,32 @@ namespace libcamera::ipa::rkisp1 {\n * \\struct RkISP1FrameContext\n * \\brief Per-frame context for algorithms\n *\n- * \\todo Populate the frame context for all algorithms\n+ * The frame context stores two distinct categories of information:\n+ *\n+ * - The value of the controls to be applied to the frame. These values are\n+ * typically set in the queueRequest() function, from the consolidated\n+ * control values stored in the active state. The frame context thus stores\n+ * values for all controls related to the algorithm, not limited to the\n+ * controls specified in the corresponding request, but consolidated from all\n+ * requests that have been queued so far.\n+ *\n+ * For controls that can be set manually or computed by an algorithm\n+ * (depending on the algorithm operation mode), such as for instance the\n+ * colour gains for the AWB algorithm, the control value will be stored in\n+ * the frame context in the queueRequest() function only when operating in\n+ * manual mode. When operating in auto mode, the values are computed by the\n+ * algorithm in process(), stored in the active state, and copied to the\n+ * frame context in prepare(), just before being stored in the ISP parameters\n+ * buffer.\n+ *\n+ * The queueRequest() function can also store ancillary data in the frame\n+ * context, such as flags to indicate if (and what) control values have\n+ * changed compared to the previous request.\n+ *\n+ * - Status information computed by the algorithm for a frame. For instance,\n+ * the colour temperature estimated by the AWB algorithm from ISP statistics\n+ * calculated on a frame is stored in the frame context for that frame in\n+ * the process() function.\n */\n \n /**\n", "prefixes": [ "libcamera-devel", "v4", "24/32" ] }