Patch Detail
Show a patch.
GET /api/patches/14348/?format=api
{ "id": 14348, "url": "https://patchwork.libcamera.org/api/patches/14348/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14348/", "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": "<20211026112340.110169-16-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-10-26T11:23:36", "name": "[libcamera-devel,v5,15/19] ipa: ipu3: Isolate ipa_context documentation", "commit_ref": "5faa0b1a2a00a2881a4a9babc0ee0d12adf08c4b", "pull_url": null, "state": "accepted", "archived": false, "hash": "6877898d968dbd65cd97be635a6950176f4f51ef", "submitter": { "id": 75, "url": "https://patchwork.libcamera.org/api/people/75/?format=api", "name": "Jean-Michel Hautbois", "email": "jeanmichel.hautbois@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14348/mbox/", "series": [ { "id": 2658, "url": "https://patchwork.libcamera.org/api/series/2658/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2658", "date": "2021-10-26T11:23:21", "name": "Document IPU3 IPA", "version": 5, "mbox": "https://patchwork.libcamera.org/series/2658/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14348/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14348/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 C3DB1BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Oct 2021 11:24:06 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7080D64891;\n\tTue, 26 Oct 2021 13:24:06 +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 AD7E16488E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Oct 2021 13:23:47 +0200 (CEST)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:dce3:eb54:18d7:6f3d])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5BE99DBF;\n\tTue, 26 Oct 2021 13:23:47 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hkyJvQL9\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1635247427;\n\tbh=pst3JPVUNmp/asmcNXBtC/aHyzbUwCtJNPA5V/ec35w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=hkyJvQL9HPM79+KaMR+jz9g95hMQ80HFk3mQmd5fainkWq1YBUdYh6csAQCQ+SEpR\n\tgB0HsXXJob+dQtpW27BgvZn1vnN2hvzIX6iU/qj4b7VUEhe8wthb6Im+D8GdYXvoBs\n\tVIU9t792yEZo1wgpJDiAOItdi13jher5NqtJFrL8=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 26 Oct 2021 13:23:36 +0200", "Message-Id": "<20211026112340.110169-16-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20211026112340.110169-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20211026112340.110169-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v5 15/19] ipa: ipu3: Isolate ipa_context\n\tdocumentation", "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": "From: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nThe IPU3 IPA core is growing with additional documentation. The\nipa_context documentation is stored here, but it pushes the IPU3\ndocumentation and implementation further from the head of the file.\n\nFurthermore, the ipa_context documentation is outside of the ipa::ipu3\nnamespace and isn't identified correctly by Doxygen.\n\nMove the ipa_context to its own compilation object even though there\nisn't any code, but to maintain consistency with our documentation\nmodel.\n\nCorrectly re-introduce the documentation into the libcamera::ipa::ipu3\nnamespace during the move.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n\n---\nv4:\n- put the \\file block before the namespace\n---\n src/ipa/ipu3/ipa_context.cpp | 136 +++++++++++++++++++++++++++++++++++\n src/ipa/ipu3/ipu3.cpp | 124 --------------------------------\n src/ipa/ipu3/meson.build | 1 +\n 3 files changed, 137 insertions(+), 124 deletions(-)\n create mode 100644 src/ipa/ipu3/ipa_context.cpp", "diff": "diff --git a/src/ipa/ipu3/ipa_context.cpp b/src/ipa/ipu3/ipa_context.cpp\nnew file mode 100644\nindex 00000000..94a5f7f6\n--- /dev/null\n+++ b/src/ipa/ipu3/ipa_context.cpp\n@@ -0,0 +1,136 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Google Inc.\n+ *\n+ * ipa_context.cpp - IPU3 IPA Context\n+ */\n+\n+#include \"ipa_context.h\"\n+\n+/**\n+ * \\file ipa_context.h\n+ * \\brief Context and state information shared between the algorithms\n+ */\n+\n+namespace libcamera::ipa::ipu3 {\n+\n+/**\n+ * \\struct IPASessionConfiguration\n+ * \\brief Session configuration for the IPA module\n+ *\n+ * The session configuration contains all IPA configuration parameters that\n+ * remain constant during the capture session, from IPA module start to stop.\n+ * It is typically set during the configure() operation of the IPA module, but\n+ * may also be updated in the start() operation.\n+ */\n+\n+/**\n+ * \\struct IPAFrameContext\n+ * \\brief Per-frame context for algorithms\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+ * \\todo Detail how to access contexts for a particular frame\n+ *\n+ * Each of the fields in the frame context 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+ */\n+\n+/**\n+ * \\struct IPAContext\n+ * \\brief Global IPA context data shared between all algorithms\n+ *\n+ * \\var IPAContext::configuration\n+ * \\brief The IPA session configuration, immutable during the session\n+ *\n+ * \\var IPAContext::frameContext\n+ * \\brief The frame context for the frame being processed\n+ *\n+ * \\todo While the frame context is supposed to be per-frame, this\n+ * single frame context stores data related to both the current frame\n+ * and the previous frames, with fields being updated as the algorithms\n+ * are run. This needs to be turned into real per-frame data storage.\n+ */\n+\n+/**\n+ * \\struct IPASessionConfiguration::grid\n+ * \\brief Grid configuration of the IPA\n+ *\n+ * \\var IPASessionConfiguration::grid::bdsGrid\n+ * \\brief Bayer Down Scaler grid plane config used by the kernel\n+ *\n+ * \\var IPASessionConfiguration::grid::bdsOutputSize\n+ * \\brief BDS output size configured by the pipeline handler\n+ *\n+ * \\var IPASessionConfiguration::grid::stride\n+ * \\brief Number of cells on one line including the ImgU padding\n+ */\n+\n+/**\n+ * \\struct IPASessionConfiguration::agc\n+ * \\brief AGC parameters configuration of the IPA\n+ *\n+ * \\var IPASessionConfiguration::agc::minShutterSpeed\n+ * \\brief Minimum shutter speed supported with the configured sensor\n+ *\n+ * \\var IPASessionConfiguration::grid::maxShutterSpeed\n+ * \\brief Maximum shutter speed supported with the configured sensor\n+ *\n+ * \\var IPASessionConfiguration::grid::minAnalogueGain\n+ * \\brief Minimum analogue gain supported with the configured sensor\n+ *\n+ * \\var IPASessionConfiguration::grid::maxAnalogueGain\n+ * \\brief Maximum analogue gain supported with the configured sensor\n+ */\n+\n+/**\n+ * \\struct IPAFrameContext::agc\n+ * \\brief Context for the Automatic Gain Control algorithm\n+ *\n+ * The exposure and gain determined are expected to be applied to the sensor\n+ * at the earliest opportunity.\n+ *\n+ * \\var IPAFrameContext::agc::exposure\n+ * \\brief Exposure time expressed as a number of lines\n+ *\n+ * \\var IPAFrameContext::agc::gain\n+ * \\brief Analogue gain multiplier\n+ *\n+ * The gain should be adapted to the sensor specific gain code before applying.\n+ */\n+\n+/**\n+ * \\struct IPAFrameContext::awb\n+ * \\brief Context for the Automatic White Balance algorithm\n+ *\n+ * \\struct IPAFrameContext::awb::gains\n+ * \\brief White balance gains\n+ *\n+ * \\var IPAFrameContext::awb::gains::red\n+ * \\brief White balance gain for R channel\n+ *\n+ * \\var IPAFrameContext::awb::gains::green\n+ * \\brief White balance gain for G channel\n+ *\n+ * \\var IPAFrameContext::awb::gains::blue\n+ * \\brief White balance gain for B channel\n+ */\n+\n+/**\n+ * \\struct IPAFrameContext::toneMapping\n+ * \\brief Context for ToneMapping and Gamma control\n+ *\n+ * \\var IPAFrameContext::toneMapping::gamma\n+ * \\brief Gamma value for the LUT\n+ *\n+ * \\var IPAFrameContext::toneMapping::gammaCorrection\n+ * \\brief Per-pixel tone mapping implemented as a LUT\n+ *\n+ * The LUT structure is defined by the IPU3 kernel interface. See\n+ * <linux/intel-ipu3.h> struct ipu3_uapi_gamma_corr_lut for further details.\n+ */\n+\n+} /* namespace libcamera::ipa::ipu3 */\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 4c0fff00..a10fdd4a 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -37,130 +37,6 @@\n #include \"algorithms/tone_mapping.h\"\n #include \"libipa/camera_sensor_helper.h\"\n \n-/**\n- * \\file ipa_context.h\n- * \\brief Context and state information shared between the algorithms\n- */\n-\n-/**\n- * \\struct IPASessionConfiguration\n- * \\brief Session configuration for the IPA module\n- *\n- * The session configuration contains all IPA configuration parameters that\n- * remain constant during the capture session, from IPA module start to stop.\n- * It is typically set during the configure() operation of the IPA module, but\n- * may also be updated in the start() operation.\n- */\n-\n-/**\n- * \\struct IPAFrameContext\n- * \\brief Per-frame context for algorithms\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- * \\todo Detail how to access contexts for a particular frame\n- *\n- * Each of the fields in the frame context 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- */\n-\n-/**\n- * \\struct IPAContext\n- * \\brief Global IPA context data shared between all algorithms\n- *\n- * \\var IPAContext::configuration\n- * \\brief The IPA session configuration, immutable during the session\n- *\n- * \\var IPAContext::frameContext\n- * \\brief The frame context for the frame being processed\n- *\n- * \\todo While the frame context is supposed to be per-frame, this\n- * single frame context stores data related to both the current frame\n- * and the previous frames, with fields being updated as the algorithms\n- * are run. This needs to be turned into real per-frame data storage.\n- */\n-\n-/**\n- * \\struct IPASessionConfiguration::grid\n- * \\brief Grid configuration of the IPA\n- *\n- * \\var IPASessionConfiguration::grid::bdsGrid\n- * \\brief Bayer Down Scaler grid plane config used by the kernel\n- *\n- * \\var IPASessionConfiguration::grid::bdsOutputSize\n- * \\brief BDS output size configured by the pipeline handler\n- *\n- * \\var IPASessionConfiguration::grid::stride\n- * \\brief Number of cells on one line including the ImgU padding\n- */\n-\n-/**\n- * \\struct IPASessionConfiguration::agc\n- * \\brief AGC parameters configuration of the IPA\n- *\n- * \\var IPASessionConfiguration::agc::minShutterSpeed\n- * \\brief Minimum shutter speed supported with the configured sensor\n- *\n- * \\var IPASessionConfiguration::grid::maxShutterSpeed\n- * \\brief Maximum shutter speed supported with the configured sensor\n- *\n- * \\var IPASessionConfiguration::grid::minAnalogueGain\n- * \\brief Minimum analogue gain supported with the configured sensor\n- *\n- * \\var IPASessionConfiguration::grid::maxAnalogueGain\n- * \\brief Maximum analogue gain supported with the configured sensor\n- */\n-\n-/**\n- * \\struct IPAFrameContext::agc\n- * \\brief Context for the Automatic Gain Control algorithm\n- *\n- * The exposure and gain determined are expected to be applied to the sensor\n- * at the earliest opportunity.\n- *\n- * \\var IPAFrameContext::agc::exposure\n- * \\brief Exposure time expressed as a number of lines\n- *\n- * \\var IPAFrameContext::agc::gain\n- * \\brief Analogue gain multiplier\n- *\n- * The gain should be adapted to the sensor specific gain code before applying.\n- */\n-\n-/**\n- * \\struct IPAFrameContext::awb\n- * \\brief Context for the Automatic White Balance algorithm\n- *\n- * \\struct IPAFrameContext::awb::gains\n- * \\brief White balance gains\n- *\n- * \\var IPAFrameContext::awb::gains::red\n- * \\brief White balance gain for R channel\n- *\n- * \\var IPAFrameContext::awb::gains::green\n- * \\brief White balance gain for G channel\n- *\n- * \\var IPAFrameContext::awb::gains::blue\n- * \\brief White balance gain for B channel\n- */\n-\n-/**\n- * \\struct IPAFrameContext::toneMapping\n- * \\brief Context for ToneMapping and Gamma control\n- *\n- * \\var IPAFrameContext::toneMapping::gamma\n- * \\brief Gamma value for the LUT\n- *\n- * \\var IPAFrameContext::toneMapping::gammaCorrection\n- * \\brief Per-pixel tone mapping implemented as a LUT\n- *\n- * The LUT structure is defined by the IPU3 kernel interface. See\n- * <linux/intel-ipu3.h> struct ipu3_uapi_gamma_corr_lut for further details.\n- */\n-\n /* Minimum grid width, expressed as a number of cells */\n static constexpr uint32_t kMinGridWidth = 16;\n /* Maximum grid width, expressed as a number of cells */\ndiff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build\nindex 39320980..3194111a 100644\n--- a/src/ipa/ipu3/meson.build\n+++ b/src/ipa/ipu3/meson.build\n@@ -5,6 +5,7 @@ subdir('algorithms')\n ipa_name = 'ipa_ipu3'\n \n ipu3_ipa_sources = files([\n+ 'ipa_context.cpp',\n 'ipu3.cpp',\n ])\n \n", "prefixes": [ "libcamera-devel", "v5", "15/19" ] }