summaryrefslogtreecommitdiff
path: root/src/ipa
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-07-14 17:59:49 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-07-14 20:12:18 +0200
commit09b4822f7f4ee2b02e2ddf7af1fe769b77765182 (patch)
treedabd2e374f0c2c11f3ba65d3abe8f64dfb641a1e /src/ipa
parent75f7bb99f259b54b1799f10d4704e1ff50c45915 (diff)
ipa: algorithms: af: Do not inherit from Algorithmjmondi/rockpi/af/imx519
The AfAlgorithm class defines the pure virtual interface for the Auto-focus algorithms and it is not meant to be instantiated. In the same way the AfHillClimbing class cannot be directly instantiated as it contains two pure virtual members. The platform-specific implementation is instead the class that will be registered to the AlgorithmFactory, and it's the only one that needs to inherit from Algorithm for this reason. Remove the Module template argument from the class hierarchy and have the platform specific class inherit from Algorithm. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa')
-rw-r--r--src/ipa/libipa/algorithms/af_algorithm.h3
-rw-r--r--src/ipa/libipa/algorithms/af_hill_climbing.h3
-rw-r--r--src/ipa/rkisp1/algorithms/af.h4
3 files changed, 4 insertions, 6 deletions
diff --git a/src/ipa/libipa/algorithms/af_algorithm.h b/src/ipa/libipa/algorithms/af_algorithm.h
index 2862042b..53d4adbf 100644
--- a/src/ipa/libipa/algorithms/af_algorithm.h
+++ b/src/ipa/libipa/algorithms/af_algorithm.h
@@ -13,8 +13,7 @@
namespace libcamera::ipa::common::algorithms {
-template<typename Module>
-class AfAlgorithm : public Algorithm<Module>
+class AfAlgorithm
{
public:
AfAlgorithm() = default;
diff --git a/src/ipa/libipa/algorithms/af_hill_climbing.h b/src/ipa/libipa/algorithms/af_hill_climbing.h
index e251f3eb..33e2348c 100644
--- a/src/ipa/libipa/algorithms/af_hill_climbing.h
+++ b/src/ipa/libipa/algorithms/af_hill_climbing.h
@@ -19,8 +19,7 @@ LOG_DECLARE_CATEGORY(Af)
namespace ipa::common::algorithms {
-template<typename Module>
-class AfHillClimbing : public AfAlgorithm<Module>
+class AfHillClimbing : public AfAlgorithm
{
public:
AfHillClimbing()
diff --git a/src/ipa/rkisp1/algorithms/af.h b/src/ipa/rkisp1/algorithms/af.h
index b2da4890..d27b5da7 100644
--- a/src/ipa/rkisp1/algorithms/af.h
+++ b/src/ipa/rkisp1/algorithms/af.h
@@ -10,11 +10,11 @@
#include <linux/rkisp1-config.h>
#include "libipa/algorithms/af_hill_climbing.h"
-#include "module.h"
+#include "algorithm.h"
namespace libcamera::ipa::rkisp1::algorithms {
-class Af : public ipa::common::algorithms::AfHillClimbing<Module>
+class Af : public ipa::common::algorithms::AfHillClimbing, public Algorithm
{
public:
Af() = default;