libcamera: ipa_manager: Split common code out of createIPA()
The createIPA() template function starts with code that doesn't depend on the template parameters. Split it to a non-template function to avoid code duplication in the binary. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
@@ -245,6 +245,23 @@ unsigned int IPAManager::addDir(const char *libDir, unsigned int maxDepth)
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retrieve an IPA module that matches a given pipeline handler
|
||||
* \param[in] pipe The pipeline handler
|
||||
* \param[in] minVersion Minimum acceptable version of IPA module
|
||||
* \param[in] maxVersion Maximum acceptable version of IPA module
|
||||
*/
|
||||
IPAModule *IPAManager::module(PipelineHandler *pipe, uint32_t minVersion,
|
||||
uint32_t maxVersion)
|
||||
{
|
||||
for (IPAModule *module : modules_) {
|
||||
if (module->match(pipe, minVersion, maxVersion))
|
||||
return module;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* \fn IPAManager::createIPA()
|
||||
* \brief Create an IPA proxy that matches a given pipeline handler
|
||||
|
||||
Reference in New Issue
Block a user