libcamera v0.7.2+1-aebe4861-nvm
Supporting cameras in Linux since 2019
Loading...
Searching...
No Matches
ipa_module.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2019, Google Inc.
4 *
5 * Image Processing Algorithm module
6 */
7
8#pragma once
9
10#include <stdint.h>
11#include <string>
12#include <vector>
13
14#include <libcamera/base/log.h>
15
18
19namespace libcamera {
20
21class IPAModule : public Loggable
22{
23public:
24 explicit IPAModule(const std::string &libPath);
25 ~IPAModule();
26
27 bool isValid() const;
28
29 const struct IPAModuleInfo &info() const;
30 const std::vector<uint8_t> &signature() const;
31 const std::string &path() const;
32
33 bool load();
34
36
37 bool match(const char *name, uint32_t minVersion,
38 uint32_t maxVersion) const;
39
40protected:
41 std::string logPrefix() const override;
42
43private:
44 int loadIPAModuleInfo();
45
46 struct IPAModuleInfo info_;
47 std::vector<uint8_t> signature_;
48
49 std::string libPath_;
50 bool valid_;
51 bool loaded_;
52
53 void *dlHandle_;
54 typedef IPAInterface *(*IPAIntfFactory)(void);
55 IPAIntfFactory ipaCreate_;
56};
57
58} /* namespace libcamera */
C++ Interface for IPA implementation.
Definition ipa_interface.h:18
Wrapper around IPA module shared object.
Definition ipa_module.h:22
const struct IPAModuleInfo & info() const
Retrieve the IPA module information.
Definition ipa_module.cpp:356
bool match(const char *name, uint32_t minVersion, uint32_t maxVersion) const
Verify if the IPA module matches a given name.
Definition ipa_module.cpp:470
std::string logPrefix() const override
Retrieve a string to be prefixed to the log message.
Definition ipa_module.cpp:478
const std::vector< uint8_t > & signature() const
Retrieve the IPA module signature.
Definition ipa_module.cpp:371
bool load()
Load the IPA implementation factory from the shared object.
Definition ipa_module.cpp:406
const std::string & path() const
Retrieve the IPA module path.
Definition ipa_module.cpp:384
bool isValid() const
Check if the IPAModule instance is valid.
Definition ipa_module.cpp:342
IPAInterface * createInterface()
Instantiate an IPA interface.
Definition ipa_module.cpp:451
Base class to support log message extensions.
Definition log.h:105
Image Processing Algorithm interface.
Image Processing Algorithm module information.
Logging infrastructure.
Top-level libcamera namespace.
Definition backtrace.h:17
Information of an IPA module.
Definition ipa_module_info.h:16