diff options
author | Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> | 2021-11-23 14:24:39 +0100 |
---|---|---|
committer | Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> | 2021-11-29 20:41:37 +0100 |
commit | fdf1426694d8934a0f7c910def43e48eb4a8b959 (patch) | |
tree | 6678110b06f426f63c13ad2467bb9ec5c8ab4a50 /src/ipa/ipu3/algorithms/algorithm.h | |
parent | b6fa52fc5bdc928daee0fd2fc33208bfdf0477d1 (diff) |
ipa: libipa: Introduce Algorithm class template
The algorithms are using the same function names with specialized
parameters. Instead of duplicating code, introduce a libipa Algorithm
class which implements a base class with template parameters in libipa,
and use it in each IPA.
As we now won't need an algorithm class for each IPA, move the
documentation to libipa, and make it agnostic of the IPA used. While at
it, fix the IPU3::Algorithm::Awb documentation.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/algorithms/algorithm.h')
-rw-r--r-- | src/ipa/ipu3/algorithms/algorithm.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ipa/ipu3/algorithms/algorithm.h b/src/ipa/ipu3/algorithms/algorithm.h index 16310ab1..d2eecc78 100644 --- a/src/ipa/ipu3/algorithms/algorithm.h +++ b/src/ipa/ipu3/algorithms/algorithm.h @@ -9,21 +9,15 @@ #include <libcamera/ipa/ipu3_ipa_interface.h> +#include <libipa/algorithm.h> + #include "ipa_context.h" namespace libcamera { namespace ipa::ipu3 { -class Algorithm -{ -public: - virtual ~Algorithm() {} - - virtual int configure(IPAContext &context, const IPAConfigInfo &configInfo); - virtual void prepare(IPAContext &context, ipu3_uapi_params *params); - virtual void process(IPAContext &context, const ipu3_uapi_stats_3a *stats); -}; +using Algorithm = libcamera::ipa::Algorithm<IPAContext, IPAConfigInfo, ipu3_uapi_params, ipu3_uapi_stats_3a>; } /* namespace ipa::ipu3 */ |