template<typename _Context, typename _FrameContext, typename _Config, typename _Params, typename _Stats>
class libcamera::ipa::Module< _Context, _FrameContext, _Config, _Params, _Stats >
The base class for all IPA modules.
- Template Parameters
-
Context | The type of the shared IPA context |
FrameContext | The type of the frame context |
Config | The type of the IPA configuration data |
Params | The type of the ISP specific parameters |
Stats | The type of the IPA statistics and ISP results |
The Module class template defines a standard internal interface between IPA modules and libipa.
While IPA modules are platform-specific, many of their internal functions are conceptually similar, even if they take different types of platform-specifc parameters. For instance, IPA modules could share code that instantiates, initializes and run algorithms if it wasn't for the fact that the the format of ISP parameters or statistics passed to the related functions is device-dependent.
To enable a shared implementation of those common tasks in libipa, the Module class template defines a standard internal interface between IPA modules and libipa. The template parameters specify the types of module-dependent data. IPA modules shall create a specialization of the Module class template in their namespace, and use it to specialize other classes of libipa, such as the Algorithm class.
template<typename _Context , typename _FrameContext , typename _Config , typename _Params , typename _Stats >
Create algorithms from YAML configuration data.
- Parameters
-
[in] | context | The IPA context |
[in] | algorithms | Algorithms configuration data as a parsed YamlObject |
This function iterates over the list of algorithms parsed from the YAML configuration file, and instantiates and initializes the corresponding algorithms. The configuration data is expected to be correct, any error causes the function to fail and return immediately.
- Returns
- 0 on success, or a negative error code on failure
template<typename _Context , typename _FrameContext , typename _Config , typename _Params , typename _Stats >
libcamera::ipa::Module< _Context, _FrameContext, _Config, _Params, _Stats >::registerAlgorithm |
( |
AlgorithmFactoryBase< Module< _Context, _FrameContext, _Config, _Params, _Stats > > * |
factory | ) |
|
|
inlinestatic |
Add an algorithm factory class to the list of available algorithms.
- Parameters
-
[in] | factory | Factory to use to construct the algorithm |
This function registers an algorithm factory. It is meant to be called by the AlgorithmFactory constructor only.