Show a patch.

GET /api/1.1/patches/13398/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 13398,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/13398/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/13398/",
    "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": "<20210819145759.184192-2-jeanmichel.hautbois@ideasonboard.com>",
    "date": "2021-08-19T14:57:51",
    "name": "[libcamera-devel,v4,1/9] ipa: move libipa::Algorithm to ipa/ipu3/algorithms",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "36eaaa0a95014ac0d65c7f9dd0b0fe5f668a2357",
    "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/13398/mbox/",
    "series": [
        {
            "id": 2372,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2372/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2372",
            "date": "2021-08-19T14:57:50",
            "name": "IPU3: Introduce modularity for algorithms",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2372/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/13398/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/13398/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 D8FF7BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 19 Aug 2021 14:58:07 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 97F2F688AE;\n\tThu, 19 Aug 2021 16:58: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 7C5AC68886\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 19 Aug 2021 16:58:03 +0200 (CEST)",
            "from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:d68d:3cb6:f3c7:c19c])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1176B2A8;\n\tThu, 19 Aug 2021 16:58:03 +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=\"fTb7bVTI\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1629385083;\n\tbh=LcTJ4K3dKBMOxaEr0rq9zyDH3NJLfL+Dtbmiu8Du9Sk=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=fTb7bVTIdRHVOLkAH8R29gtxO1nowwxGxAbI7VSCuw3r6iPLC4gnPFTTOjZEDt6sT\n\tkG6okMUUh4TxegSm+JzPUmkrY5hle/Qz67VVQXao7EpmNnWka/gAjt1/MnbOIKxoje\n\tD0eFRRDztb0yDSp9ni9m2EVVkzFpsLQ8cqPi4z8Q=",
        "From": "Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 19 Aug 2021 16:57:51 +0200",
        "Message-Id": "<20210819145759.184192-2-jeanmichel.hautbois@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210819145759.184192-1-jeanmichel.hautbois@ideasonboard.com>",
        "References": "<20210819145759.184192-1-jeanmichel.hautbois@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 1/9] ipa: move libipa::Algorithm to\n\tipa/ipu3/algorithms",
        "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 abstract Algorithm class was originally placed in libipa as an\nattempt define a generic algorithm container.\nThis was a little optimistic and pushed a bit far too early.\n\nMove the Algorithm class into the IPU3 which is the only user of the\nclass, as we adapt it to support modular algorithm components for the\nIPU3.\n\nNot documenting the namespace may cause issues with Doxygen in libipa.\nThe file libipa.cpp is thus created as an empty file for now, but we\ncan leverage it in the future to add more global libipa documentation,\nand possibly code too.\n\nSigned-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\nReviewed-by: Kieran Bingham kieran.bingham@ideasonboard.com\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n .../{libipa => ipu3/algorithms}/algorithm.cpp | 17 ++++---------\n src/ipa/ipu3/algorithms/algorithm.h           | 24 +++++++++++++++++++\n src/ipa/ipu3/algorithms/meson.build           |  5 ++++\n src/ipa/ipu3/ipu3_agc.h                       |  2 +-\n src/ipa/ipu3/ipu3_awb.h                       |  2 +-\n src/ipa/ipu3/meson.build                      |  4 ++++\n src/ipa/libipa/algorithm.h                    | 24 -------------------\n src/ipa/libipa/libipa.cpp                     | 22 +++++++++++++++++\n src/ipa/libipa/meson.build                    |  5 ++--\n 9 files changed, 63 insertions(+), 42 deletions(-)\n rename src/ipa/{libipa => ipu3/algorithms}/algorithm.cpp (55%)\n create mode 100644 src/ipa/ipu3/algorithms/algorithm.h\n create mode 100644 src/ipa/ipu3/algorithms/meson.build\n delete mode 100644 src/ipa/libipa/algorithm.h\n create mode 100644 src/ipa/libipa/libipa.cpp",
    "diff": "diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/ipu3/algorithms/algorithm.cpp\nsimilarity index 55%\nrename from src/ipa/libipa/algorithm.cpp\nrename to src/ipa/ipu3/algorithms/algorithm.cpp\nindex 930f9353..dd46846a 100644\n--- a/src/ipa/libipa/algorithm.cpp\n+++ b/src/ipa/ipu3/algorithms/algorithm.cpp\n@@ -2,7 +2,7 @@\n /*\n  * Copyright (C) 2021, Ideas On Board\n  *\n- * algorithm.cpp - ISP control algorithms\n+ * algorithm.cpp - IPU3 control algorithm interface\n  */\n \n #include \"algorithm.h\"\n@@ -14,26 +14,17 @@\n \n namespace libcamera {\n \n-/**\n- * \\brief The IPA namespace\n- *\n- * The IPA namespace groups all types specific to IPA modules. It serves as the\n- * top-level namespace for the IPA library libipa, and also contains\n- * module-specific namespaces for IPA modules.\n- */\n-namespace ipa {\n+namespace ipa::ipu3 {\n \n /**\n  * \\class Algorithm\n- * \\brief The base class for all IPA algorithms\n+ * \\brief The base class for all IPU3 algorithms\n  *\n  * The Algorithm class defines a standard interface for IPA algorithms. By\n  * abstracting algorithms, it makes possible the implementation of generic code\n  * to manage algorithms regardless of their specific type.\n  */\n \n-Algorithm::~Algorithm() = default;\n-\n-} /* namespace ipa */\n+} /* namespace ipa::ipu3 */\n \n } /* namespace libcamera */\ndiff --git a/src/ipa/ipu3/algorithms/algorithm.h b/src/ipa/ipu3/algorithms/algorithm.h\nnew file mode 100644\nindex 00000000..072f01c4\n--- /dev/null\n+++ b/src/ipa/ipu3/algorithms/algorithm.h\n@@ -0,0 +1,24 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Ideas On Board\n+ *\n+ * algorithm.h - IPU3 control algorithm interface\n+ */\n+#ifndef __LIBCAMERA_IPA_IPU3_ALGORITHM_H__\n+#define __LIBCAMERA_IPA_IPU3_ALGORITHM_H__\n+\n+namespace libcamera {\n+\n+namespace ipa::ipu3 {\n+\n+class Algorithm\n+{\n+public:\n+\tvirtual ~Algorithm() {}\n+};\n+\n+} /* namespace ipa::ipu3 */\n+\n+} /* namespace libcamera */\n+\n+#endif /* __LIBCAMERA_IPA_IPU3_ALGORITHM_H__ */\ndiff --git a/src/ipa/ipu3/algorithms/meson.build b/src/ipa/ipu3/algorithms/meson.build\nnew file mode 100644\nindex 00000000..dc538b79\n--- /dev/null\n+++ b/src/ipa/ipu3/algorithms/meson.build\n@@ -0,0 +1,5 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+ipu3_ipa_algorithms = files([\n+    'algorithm.cpp',\n+])\ndiff --git a/src/ipa/ipu3/ipu3_agc.h b/src/ipa/ipu3/ipu3_agc.h\nindex 9f3d4257..f00b98d6 100644\n--- a/src/ipa/ipu3/ipu3_agc.h\n+++ b/src/ipa/ipu3/ipu3_agc.h\n@@ -13,7 +13,7 @@\n \n #include <libcamera/geometry.h>\n \n-#include \"libipa/algorithm.h\"\n+#include \"algorithms/algorithm.h\"\n \n namespace libcamera {\n \ndiff --git a/src/ipa/ipu3/ipu3_awb.h b/src/ipa/ipu3/ipu3_awb.h\nindex 122cf68c..ea2d4320 100644\n--- a/src/ipa/ipu3/ipu3_awb.h\n+++ b/src/ipa/ipu3/ipu3_awb.h\n@@ -13,7 +13,7 @@\n \n #include <libcamera/geometry.h>\n \n-#include \"libipa/algorithm.h\"\n+#include \"algorithms/algorithm.h\"\n \n namespace libcamera {\n \ndiff --git a/src/ipa/ipu3/meson.build b/src/ipa/ipu3/meson.build\nindex b6364190..fcb27d68 100644\n--- a/src/ipa/ipu3/meson.build\n+++ b/src/ipa/ipu3/meson.build\n@@ -1,5 +1,7 @@\n # SPDX-License-Identifier: CC0-1.0\n \n+subdir('algorithms')\n+\n ipa_name = 'ipa_ipu3'\n \n ipu3_ipa_sources = files([\n@@ -8,6 +10,8 @@ ipu3_ipa_sources = files([\n     'ipu3_awb.cpp',\n ])\n \n+ipu3_ipa_sources += ipu3_ipa_algorithms\n+\n mod = shared_module(ipa_name,\n                     [ipu3_ipa_sources, libcamera_generated_ipa_headers],\n                     name_prefix : '',\ndiff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h\ndeleted file mode 100644\nindex 89cee4c4..00000000\n--- a/src/ipa/libipa/algorithm.h\n+++ /dev/null\n@@ -1,24 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2021, Ideas On Board\n- *\n- * algorithm.h - ISP control algorithm interface\n- */\n-#ifndef __LIBCAMERA_IPA_LIBIPA_ALGORITHM_H__\n-#define __LIBCAMERA_IPA_LIBIPA_ALGORITHM_H__\n-\n-namespace libcamera {\n-\n-namespace ipa {\n-\n-class Algorithm\n-{\n-public:\n-\tvirtual ~Algorithm();\n-};\n-\n-} /* namespace ipa */\n-\n-} /* namespace libcamera */\n-\n-#endif /* __LIBCAMERA_IPA_LIBIPA_ALGORITHM_H__ */\ndiff --git a/src/ipa/libipa/libipa.cpp b/src/ipa/libipa/libipa.cpp\nnew file mode 100644\nindex 00000000..08bc3541\n--- /dev/null\n+++ b/src/ipa/libipa/libipa.cpp\n@@ -0,0 +1,22 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Ideas On Board\n+ *\n+ * libipa.cpp - libipa interface\n+ */\n+\n+namespace libcamera {\n+\n+/**\n+ * \\brief The IPA namespace\n+ *\n+ * The IPA namespace groups all types specific to IPA modules. It serves as the\n+ * top-level namespace for the IPA library libipa, and also contains\n+ * module-specific namespaces for IPA modules.\n+ */\n+namespace ipa {\n+\n+} /* namespace ipa */\n+\n+} /* namespace libcamera */\n+\ndiff --git a/src/ipa/libipa/meson.build b/src/ipa/libipa/meson.build\nindex 3fda7c00..4d073a03 100644\n--- a/src/ipa/libipa/meson.build\n+++ b/src/ipa/libipa/meson.build\n@@ -1,15 +1,14 @@\n # SPDX-License-Identifier: CC0-1.0\n \n libipa_headers = files([\n-    'algorithm.h',\n     'camera_sensor_helper.h',\n     'histogram.h'\n ])\n \n libipa_sources = files([\n-    'algorithm.cpp',\n     'camera_sensor_helper.cpp',\n-    'histogram.cpp'\n+    'histogram.cpp',\n+    'libipa.cpp',\n ])\n \n libipa_includes = include_directories('..')\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "1/9"
    ]
}