From a5c81fc9457a295070243c4230a65805645e046a Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Jul 2021 01:52:00 +0300 Subject: 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 Reviewed-by: Kieran Bingham Reviewed-by: Umang Jain Reviewed-by: Paul Elder --- include/libcamera/internal/ipa_manager.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h index 42201839..0687842e 100644 --- a/include/libcamera/internal/ipa_manager.h +++ b/include/libcamera/internal/ipa_manager.h @@ -34,15 +34,7 @@ public: uint32_t minVersion, uint32_t maxVersion) { - IPAModule *m = nullptr; - - for (IPAModule *module : self_->modules_) { - if (module->match(pipe, minVersion, maxVersion)) { - m = module; - break; - } - } - + IPAModule *m = self_->module(pipe, minVersion, maxVersion); if (!m) return nullptr; @@ -62,6 +54,9 @@ private: std::vector &files); unsigned int addDir(const char *libDir, unsigned int maxDepth = 0); + IPAModule *module(PipelineHandler *pipe, uint32_t minVersion, + uint32_t maxVersion); + bool isSignatureValid(IPAModule *ipa) const; std::vector modules_; -- cgit v1.2.1