Patch Detail
Show a patch.
GET /api/1.1/patches/14282/?format=api
{ "id": 14282, "url": "https://patchwork.libcamera.org/api/1.1/patches/14282/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14282/", "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": "<20211022151218.111966-16-jeanmichel.hautbois@ideasonboard.com>", "date": "2021-10-22T15:12:14", "name": "[libcamera-devel,v3,15/19] ipa: ipu3: Isolate ipa_context documentation", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": false, "hash": "176632cbc4e6f3fdbd7cb5a978bc068304892647", "submitter": { "id": 75, "url": "https://patchwork.libcamera.org/api/1.1/people/75/?format=api", "name": "Jean-Michel Hautbois", "email": "jeanmichel.hautbois@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/14282/mbox/", "series": [ { "id": 2651, "url": "https://patchwork.libcamera.org/api/1.1/series/2651/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2651", "date": "2021-10-22T15:11:59", "name": "Document IPU3 IPA", "version": 3, "mbox": "https://patchwork.libcamera.org/series/2651/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14282/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14282/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 5EA5DBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 22 Oct 2021 15:12:43 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0B14A68F70;\n\tFri, 22 Oct 2021 17:12:43 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9908F68F63\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 Oct 2021 17:12:25 +0200 (CEST)", "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:22cc:3af6:5ccb:8367])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 51E8189A;\n\tFri, 22 Oct 2021 17:12:25 +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=\"fhZZGxxc\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1634915545;\n\tbh=97yl4VHaefVjKeqqscGVm+JOfxALLtIzyRou8ODdNcQ=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=fhZZGxxcDuOYXjx+GJq9d778VQasUiSD18/H9UTIqtznNE668IpkFEEGdKnuEsALb\n\tHYBUURwr+QGLOnwl0hMdik704BtJ+06O6GyN6sRjjD+wCrkGv8U1FJjyYtQNQdBZXz\n\tvnJDhq7VLHLySOQdzFhBgdYg7XPbB9yoAKSHUrpY=", "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 22 Oct 2021 17:12:14 +0200", "Message-Id": "<20211022151218.111966-16-jeanmichel.hautbois@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "In-Reply-To": "<20211022151218.111966-1-jeanmichel.hautbois@ideasonboard.com>", "References": "<20211022151218.111966-1-jeanmichel.hautbois@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 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": "The 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>\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..3e154e60\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+namespace libcamera::ipa::ipu3 {\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+} /* namespace libcamera::ipa::ipu3 */\ndiff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex f7632bc0..065febf8 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", "v3", "15/19" ] }