libcamera: include/libcamera/internal/ipa_module.h Source File

libcamera v0.7.2 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
16#include <libcamera/ipa/ipa_interface.h>
17#include <libcamera/ipa/ipa_module_info.h>
18
19#include "libcamera/internal/pipeline_handler.h"
20
21namespace libcamera {
22
23 class 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
37 IPAInterface *createInterface();
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 */
libcamera::IPAInterface
C++ Interface for IPA implementation.
Definition ipa_interface.h:18
libcamera::IPAModule::info
const struct IPAModuleInfo & info() const
Retrieve the IPA module information.
Definition ipa_module.cpp:361
libcamera::IPAModule::logPrefix
std::string logPrefix() const override
Retrieve a string to be prefixed to the log message.
Definition ipa_module.cpp:483
libcamera::IPAModule::signature
const std::vector< uint8_t > & signature() const
Retrieve the IPA module signature.
Definition ipa_module.cpp:376
libcamera::IPAModule::load
bool load()
Load the IPA implementation factory from the shared object.
Definition ipa_module.cpp:411
libcamera::IPAModule::IPAModule
IPAModule(const std::string &libPath)
Construct an IPAModule instance.
Definition ipa_module.cpp:257
libcamera::IPAModule::path
const std::string & path() const
Retrieve the IPA module path.
Definition ipa_module.cpp:389
libcamera::IPAModule::match
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:475
libcamera::IPAModule::isValid
bool isValid() const
Check if the IPAModule instance is valid.
Definition ipa_module.cpp:347
libcamera::IPAModule::createInterface
IPAInterface * createInterface()
Instantiate an IPA interface.
Definition ipa_module.cpp:456
libcamera::Loggable
Base class to support log message extensions.
Definition log.h:105
libcamera::PipelineHandler
Create and manage cameras based on a set of media devices.
Definition pipeline_handler.h:36
ipa_interface.h
Image Processing Algorithm interface.
ipa_module_info.h
Image Processing Algorithm module information.
log.h
Logging infrastructure.
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17
pipeline_handler.h
Create pipelines and cameras from a set of media devices.
libcamera::IPAModuleInfo
Information of an IPA module.
Definition ipa_module_info.h:16