summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-12 01:52:00 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-19 08:20:34 +0300
commita5c81fc9457a295070243c4230a65805645e046a (patch)
tree2c0a603f377adde5db7a66f253b9487bd12cf530 /include
parent8847715ccdeb44d09dd8a49399257da235ffcc23 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/ipa_manager.h13
1 files changed, 4 insertions, 9 deletions
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<std::string> &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<IPAModule *> modules_;