18 template<
typename _Module>
50 template<
typename _Module>
51 class AlgorithmFactoryBase
54 AlgorithmFactoryBase(
const char *name)
57 _Module::registerAlgorithm(
this);
60 virtual ~AlgorithmFactoryBase() =
default;
62 const std::string &name()
const {
return name_; }
64 virtual std::unique_ptr<Algorithm<_Module>> create()
const = 0;
70 template<
typename _Algorithm>
75 : AlgorithmFactoryBase<typename _Algorithm::
Module>(name)
81 std::unique_ptr<Algorithm<typename _Algorithm::Module>>
create()
const override 83 return std::make_unique<_Algorithm>();
87 #define REGISTER_IPA_ALGORITHM(algorithm, name) \ 88 static AlgorithmFactory<algorithm> global_##algorithm##Factory(name); _Config Config
The type of the IPA configuration data.
Definition: module.h:35
virtual int init([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const YamlObject &tuningData)
Initialize the Algorithm with tuning data.
Definition: algorithm.h:26
virtual void prepare([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] typename Module::Params *params)
Fill the params buffer with ISP processing parameters for a frame.
Definition: algorithm.h:38
_Params Params
The type of the ISP specific parameters.
Definition: module.h:36
Top-level libcamera namespace.
Definition: backtrace.h:17
_FrameContext FrameContext
The type of the frame context.
Definition: module.h:34
Registration of Algorithm classes and creation of instances.
Definition: algorithm.h:71
_Stats Stats
The type of the IPA statistics and ISP results.
Definition: module.h:37
_Module Module
The IPA module type for this class of algorithms.
Definition: algorithm.h:22
std::unique_ptr< Algorithm< typename _Algorithm::Module > > create() const override
Create an instance of the Algorithm corresponding to the factory.
Definition: algorithm.h:81
AlgorithmFactory(const char *name)
Construct an algorithm factory.
Definition: algorithm.h:74
_Context Context
The type of the shared IPA context.
Definition: module.h:33
A class representing the tree structure of the YAML content.
Definition: yaml_parser.h:24
virtual int configure([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const typename Module::Config &configInfo)
Configure the Algorithm given an IPAConfigInfo.
Definition: algorithm.h:32
The base class for all IPA algorithms.
Definition: algorithm.h:19
The base class for all IPA modules.
Definition: module.h:30
virtual void process([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] typename Module::FrameContext *frameContext, [[maybe_unused]] const typename Module::Stats *stats)
Process ISP statistics, and run algorithm operations.
Definition: algorithm.h:43