libcamera v0.1.0+127-8e215127-dirty (2023-12-02T01:06:12+00:00)
Supporting cameras in Linux since 2019
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 * ipa_module.h - 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
20
21namespace libcamera {
22
23class IPAModule : public Loggable
24{
25public:
26 explicit IPAModule(const std::string &libPath);
27 ~IPAModule();
28
29 bool isValid() const;
30
31 const struct IPAModuleInfo &info() const;
32 const std::vector<uint8_t> signature() const;
33 const std::string &path() const;
34
35 bool load();
36
38
39 bool match(PipelineHandler *pipe,
40 uint32_t minVersion, uint32_t maxVersion) const;
41
42protected:
43 std::string logPrefix() const override;
44
45private:
46 int loadIPAModuleInfo();
47
48 struct IPAModuleInfo info_;
49 std::vector<uint8_t> signature_;
50
51 std::string libPath_;
52 bool valid_;
53 bool loaded_;
54
55 void *dlHandle_;
56 typedef IPAInterface *(*IPAIntfFactory)(void);
57 IPAIntfFactory ipaCreate_;
58};
59
60} /* namespace libcamera */
C++ Interface for IPA implementation.
Definition: ipa_interface.h:31
Wrapper around IPA module shared object.
Definition: ipa_module.h:24
const struct IPAModuleInfo & info() const
Retrieve the IPA module information.
Definition: ipa_module.cpp:362
std::string logPrefix() const override
Retrieve a string to be prefixed to the log message.
Definition: ipa_module.cpp:484
const std::vector< uint8_t > signature() const
Retrieve the IPA module signature.
Definition: ipa_module.cpp:377
bool load()
Load the IPA implementation factory from the shared object.
Definition: ipa_module.cpp:412
IPAModule(const std::string &libPath)
Construct an IPAModule instance.
Definition: ipa_module.cpp:258
const std::string & path() const
Retrieve the IPA module path.
Definition: ipa_module.cpp:390
bool match(PipelineHandler *pipe, uint32_t minVersion, uint32_t maxVersion) const
Verify if the IPA module matches a given pipeline handler.
Definition: ipa_module.cpp:476
bool isValid() const
Check if the IPAModule instance is valid.
Definition: ipa_module.cpp:348
IPAInterface * createInterface()
Instantiate an IPA interface.
Definition: ipa_module.cpp:457
Base class to support log message extensions.
Definition: log.h:91
Create and manage cameras based on a set of media devices.
Definition: pipeline_handler.h:39
Image Processing Algorithm interface.
Image Processing Algorithm module information.
Logging infrastructure.
Top-level libcamera namespace.
Definition: backtrace.h:17
Create pipelines and cameras from a set of media devices.
Information of an IPA module.
Definition: ipa_module_info.h:16