Loading...
Searching...
No Matches
ipa_module.h
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* Image Processing Algorithm module
*/
#pragma once
#include <stdint.h>
#include <string>
#include <vector>
#include <libcamera/base/log.h>
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
#include "libcamera/internal/pipeline_handler.h"
namespace libcamera {
class IPAModule : public Loggable
{
public:
explicit IPAModule(const std::string &libPath);
~IPAModule();
bool isValid() const;
const struct IPAModuleInfo &info() const;
const std::vector<uint8_t> &signature() const;
const std::string &path() const;
bool load();
IPAInterface *createInterface();
bool match(PipelineHandler *pipe,
uint32_t minVersion, uint32_t maxVersion) const;
protected:
std::string logPrefix() const override;
private:
int loadIPAModuleInfo();
struct IPAModuleInfo info_;
std::vector<uint8_t> signature_;
std::string libPath_;
bool valid_;
bool loaded_;
void *dlHandle_;
typedef IPAInterface *(*IPAIntfFactory)(void);
IPAIntfFactory ipaCreate_;
};
} /* 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:92
libcamera::PipelineHandler
Create and manage cameras based on a set of media devices.
Definition pipeline_handler.h:34
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