summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/module.h
AgeCommit message (Collapse)Author
2022-06-29ipa: libipa: module: Make the Module class LoggableLaurent Pinchart
To help attribute messages logged by the Module class to a particular IPA module, make the class loggable. The logPrefix() function must be implemented by the IPA module-specific derived class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-29ipa: libipa: module: Add support for instantiation from YAMLLaurent Pinchart
Add a Module::createAlgorithms() function to instantiate algorithms from a YamlObject. The instantiated algorithms are stored in a private member variable list, exposed through the Module::algorithms() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-29ipa: libipa: algorithm: Add an algorithm registration mechanismLaurent Pinchart
In order to allow dynamic instantiation of algorithms based on tuning data files, add a mechanism to register algorithms with the IPA module. The implementation relies on an AlgorithmFactory class and a registration macro, similar to the pipeline handler registration mechanism. The main difference is that the algorithm registration and instantiation are implemented in the Module class instead of the AlgorithmFactory class, making the factory an internal implementation detail. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2022-06-29ipa: libipa: Introduce a Module class templateLaurent Pinchart
libipa defines an abstract Algorithm class template that is specialized by IPA modules. IPA modules then instantiate and manage algorithms internally, without help from libipa. With ongoing work on tuning data support for the RkISP1, and future similar work for the IPU3, more code duplication for algorithms management is expected. To address this and share code between multiple IPA modules, introduce a new Module class template that will define and manage top-level concepts for the IPA module. The Module class template needs to be specialized with the same types as the Algorithm class. To avoid manual specialization of both classes, store the types in the Module class, and replace the template arguments of the Algorithm class with a single Module argument from which the other types are retrieved. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>