{"id":14756,"url":"https://patchwork.libcamera.org/api/1.1/patches/14756/?format=json","web_url":"https://patchwork.libcamera.org/patch/14756/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20211124134019.110765-8-jeanmichel.hautbois@ideasonboard.com>","date":"2021-11-24T13:40:15","name":"[libcamera-devel,v4,07/11] ipa: rkisp1: Use the Algorithm class","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"bdc44ff602c09c8df544366a12a24555659112f8","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/1.1/people/75/?format=json","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/14756/mbox/","series":[{"id":2751,"url":"https://patchwork.libcamera.org/api/1.1/series/2751/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2751","date":"2021-11-24T13:40:08","name":"Introduce AGC for RkISP1","version":4,"mbox":"https://patchwork.libcamera.org/series/2751/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/14756/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/14756/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 EC865C3250\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 24 Nov 2021 13:40:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 87503603EE;\n\tWed, 24 Nov 2021 14:40:34 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5ECD660231\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 24 Nov 2021 14:40:24 +0100 (CET)","from tatooine.ideasonboard.com (unknown\n\t[IPv6:2a01:e0a:169:7140:968b:bd0c:97fc:7c17])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 159CF1B61;\n\tWed, 24 Nov 2021 14:40:24 +0100 (CET)"],"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=\"Ux569/Xz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1637761224;\n\tbh=DoH6PDHGpmx1HKaude0FEcYU8GHsomwLvfLJ93Nx13w=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=Ux569/XzRCo5cb6pNBld1159ROw31h/t+GFX4gLcrbslzL8okeWwKKyaQJstXPWVf\n\taphHrUn70kcCdWrzdhMiyaVheKJfa7JxSVd3k9nOKbIdhskHIFevou8msYWmtLX8Ad\n\t/2I63PVtrFJ9VL8Abi1KaxD77nbzXMWVU/avcIV8=","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 24 Nov 2021 14:40:15 +0100","Message-Id":"<20211124134019.110765-8-jeanmichel.hautbois@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20211124134019.110765-1-jeanmichel.hautbois@ideasonboard.com>","References":"<20211124134019.110765-1-jeanmichel.hautbois@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v4 07/11] ipa: rkisp1: Use the Algorithm\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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Now that libipa offers a templated class for Algorithm, use it in\nRkISP1.\n\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>\n\n---\nv4: use #pragma once\n---\n src/ipa/rkisp1/algorithms/algorithm.h | 25 +++++++++++++++++++++++++\n src/ipa/rkisp1/algorithms/meson.build |  4 ++++\n src/ipa/rkisp1/meson.build            |  4 ++++\n src/ipa/rkisp1/rkisp1.cpp             |  7 ++++++-\n 4 files changed, 39 insertions(+), 1 deletion(-)\n create mode 100644 src/ipa/rkisp1/algorithms/algorithm.h\n create mode 100644 src/ipa/rkisp1/algorithms/meson.build","diff":"diff --git a/src/ipa/rkisp1/algorithms/algorithm.h b/src/ipa/rkisp1/algorithms/algorithm.h\nnew file mode 100644\nindex 00000000..59333e30\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/algorithm.h\n@@ -0,0 +1,25 @@\n+/* SPDX-License-Identifier: LGPL-2.1-or-later */\n+/*\n+ * Copyright (C) 2021, Ideas On Board\n+ *\n+ * algorithm.h - RkISP1 control algorithm interface\n+ */\n+#pragma once\n+\n+#include <linux/rkisp1-config.h>\n+\n+#include <libcamera/ipa/rkisp1_ipa_interface.h>\n+\n+#include <libipa/algorithm.h>\n+\n+#include \"ipa_context.h\"\n+\n+namespace libcamera {\n+\n+namespace ipa::rkisp1 {\n+\n+using Algorithm = libcamera::ipa::Algorithm<IPAContext, IPACameraSensorInfo, rkisp1_params_cfg, rkisp1_stat_buffer>;\n+\n+} /* namespace ipa::rkisp1 */\n+\n+} /* namespace libcamera */\ndiff --git a/src/ipa/rkisp1/algorithms/meson.build b/src/ipa/rkisp1/algorithms/meson.build\nnew file mode 100644\nindex 00000000..1c6c59cf\n--- /dev/null\n+++ b/src/ipa/rkisp1/algorithms/meson.build\n@@ -0,0 +1,4 @@\n+# SPDX-License-Identifier: CC0-1.0\n+\n+rkisp1_ipa_algorithms = files([\n+])\ndiff --git a/src/ipa/rkisp1/meson.build b/src/ipa/rkisp1/meson.build\nindex 3683c922..8c822fbb 100644\n--- a/src/ipa/rkisp1/meson.build\n+++ b/src/ipa/rkisp1/meson.build\n@@ -1,5 +1,7 @@\n # SPDX-License-Identifier: CC0-1.0\n \n+subdir('algorithms')\n+\n ipa_name = 'ipa_rkisp1'\n \n rkisp1_ipa_sources = files([\n@@ -7,6 +9,8 @@ rkisp1_ipa_sources = files([\n     'rkisp1.cpp',\n ])\n \n+rkisp1_ipa_sources += rkisp1_ipa_algorithms\n+\n mod = shared_module(ipa_name,\n                     [rkisp1_ipa_sources, libcamera_generated_ipa_headers],\n                     name_prefix : '',\ndiff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp\nindex 34c3f9a2..225f1847 100644\n--- a/src/ipa/rkisp1/rkisp1.cpp\n+++ b/src/ipa/rkisp1/rkisp1.cpp\n@@ -25,9 +25,11 @@\n \n #include <libcamera/internal/mapped_framebuffer.h>\n \n-#include \"ipa_context.h\"\n+#include \"algorithms/algorithm.h\"\n #include \"libipa/camera_sensor_helper.h\"\n \n+#include \"ipa_context.h\"\n+\n namespace libcamera {\n \n LOG_DEFINE_CATEGORY(IPARkISP1)\n@@ -82,6 +84,9 @@ private:\n \n \t/* Local parameter storage */\n \tstruct IPAContext context_;\n+\n+\t/* Maintain the algorithms used by the IPA */\n+\tstd::list<std::unique_ptr<ipa::rkisp1::Algorithm>> algorithms_;\n };\n \n int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision)\n","prefixes":["libcamera-devel","v4","07/11"]}