Implement a class to wrap around an IPA module shared object. For now, just load a struct IPAModuleInfo with symbol name ipaModuleInfo from an IPA module .so shared object. Also provide a public header file including the struct IPAModuleInfo, structured such that both C and C++ IPA modules are supported. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
37 lines
623 B
C++
37 lines
623 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2019, Google Inc.
|
|
*
|
|
* ipa_module.h - Image Processing Algorithm module
|
|
*/
|
|
#ifndef __LIBCAMERA_IPA_MODULE_H__
|
|
#define __LIBCAMERA_IPA_MODULE_H__
|
|
|
|
#include <string>
|
|
|
|
#include <libcamera/ipa/ipa_module_info.h>
|
|
|
|
namespace libcamera {
|
|
|
|
class IPAModule
|
|
{
|
|
public:
|
|
explicit IPAModule(const std::string &libPath);
|
|
|
|
bool isValid() const;
|
|
|
|
const struct IPAModuleInfo &info() const;
|
|
|
|
private:
|
|
struct IPAModuleInfo info_;
|
|
|
|
std::string libPath_;
|
|
bool valid_;
|
|
|
|
int loadIPAModuleInfo();
|
|
};
|
|
|
|
} /* namespace libcamera */
|
|
|
|
#endif /* __LIBCAMERA_IPA_MODULE_H__ */
|