summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/algorithm.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-20 00:12:00 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-06-29 17:20:59 +0300
commit83df7854933c06ff51f4473e54b72b3eac36d321 (patch)
tree217f1627cd119d0b130631d1218b114b47961e26 /src/ipa/rkisp1/algorithms/algorithm.h
parent9dacde0d651df322058c3611b3515820bf06715e (diff)
ipa: libipa: Introduce a Module class template
libipa defines an abstract Algorithm class template that is specialized by IPA modules. IPA modules then instantiate and manage algorithms internally, without help from libipa. With ongoing work on tuning data support for the RkISP1, and future similar work for the IPU3, more code duplication for algorithms management is expected. To address this and share code between multiple IPA modules, introduce a new Module class template that will define and manage top-level concepts for the IPA module. The Module class template needs to be specialized with the same types as the Algorithm class. To avoid manual specialization of both classes, store the types in the Module class, and replace the template arguments of the Algorithm class with a single Module argument from which the other types are retrieved. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/algorithm.h')
-rw-r--r--src/ipa/rkisp1/algorithms/algorithm.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ipa/rkisp1/algorithms/algorithm.h b/src/ipa/rkisp1/algorithms/algorithm.h
index 68e3a44e..c3212cff 100644
--- a/src/ipa/rkisp1/algorithms/algorithm.h
+++ b/src/ipa/rkisp1/algorithms/algorithm.h
@@ -7,21 +7,15 @@
#pragma once
-#include <linux/rkisp1-config.h>
-
-#include <libcamera/ipa/rkisp1_ipa_interface.h>
-
#include <libipa/algorithm.h>
-#include "ipa_context.h"
+#include "module.h"
namespace libcamera {
namespace ipa::rkisp1 {
-using Algorithm = libcamera::ipa::Algorithm<IPAContext, IPAFrameContext,
- IPACameraSensorInfo, rkisp1_params_cfg,
- rkisp1_stat_buffer>;
+using Algorithm = libcamera::ipa::Algorithm<Module>;
} /* namespace ipa::rkisp1 */