21 template<
typename _Module>
42 [[maybe_unused]]
const uint32_t frame,
49 [[maybe_unused]]
const uint32_t frame,
56 [[maybe_unused]]
const uint32_t frame,
64 template<
typename _Module>
65 class AlgorithmFactoryBase
68 AlgorithmFactoryBase(
const char *name)
71 _Module::registerAlgorithm(
this);
74 virtual ~AlgorithmFactoryBase() =
default;
76 const std::string &name()
const {
return name_; }
78 virtual std::unique_ptr<Algorithm<_Module>> create()
const = 0;
84 template<
typename _Algorithm>
89 : AlgorithmFactoryBase<typename _Algorithm::
Module>(name)
95 std::unique_ptr<Algorithm<typename _Algorithm::Module>>
create()
const override 97 return std::make_unique<_Algorithm>();
101 #define REGISTER_IPA_ALGORITHM(algorithm, name) \ 102 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:29
virtual void process([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const uint32_t frame, [[maybe_unused]] typename Module::FrameContext &frameContext, [[maybe_unused]] const typename Module::Stats *stats, [[maybe_unused]] ControlList &metadata)
Process ISP statistics, and run algorithm operations.
Definition: algorithm.h:55
_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:85
_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:25
std::unique_ptr< Algorithm< typename _Algorithm::Module > > create() const override
Create an instance of the Algorithm corresponding to the factory.
Definition: algorithm.h:95
AlgorithmFactory(const char *name)
Construct an algorithm factory.
Definition: algorithm.h:88
_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:27
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:35
const ControlIdMap controls
List of all supported libcamera controls.
Definition: control_ids.cpp:1952
Associate a list of ControlId with their values for an object.
Definition: controls.h:380
Framework to manage controls related to an object.
The base class for all IPA algorithms.
Definition: algorithm.h:22
virtual void queueRequest([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const uint32_t frame, [[maybe_unused]] typename Module::FrameContext &frameContext, [[maybe_unused]] const ControlList &controls)
Provide control values to the algorithm.
Definition: algorithm.h:41
The base class for all IPA modules.
Definition: module.h:30
virtual void prepare([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] const uint32_t frame, [[maybe_unused]] typename Module::FrameContext &frameContext, [[maybe_unused]] typename Module::Params *params)
Fill the params buffer with ISP processing parameters for a frame.
Definition: algorithm.h:48