libcamera: ipa_interface: add header
Define an IPAInterface class which will contain an IPA implementation. The methods that the IPAInterface exposes form the interface to the IPA implementation, hence the name. IPA module shared objects will implement this class. This also means that IPA module shared objects must be implemented in C++, so remove the C test IPA module. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
629e9301c5
commit
46ae1775b0
7 changed files with 51 additions and 9 deletions
22
include/libcamera/ipa/ipa_interface.h
Normal file
22
include/libcamera/ipa/ipa_interface.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2019, Google Inc.
|
||||||
|
*
|
||||||
|
* ipa_interface.h - Image Processing Algorithm interface
|
||||||
|
*/
|
||||||
|
#ifndef __LIBCAMERA_IPA_INTERFACE_H__
|
||||||
|
#define __LIBCAMERA_IPA_INTERFACE_H__
|
||||||
|
|
||||||
|
namespace libcamera {
|
||||||
|
|
||||||
|
class IPAInterface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~IPAInterface() {}
|
||||||
|
|
||||||
|
virtual int init() = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
||||||
|
|
||||||
|
#endif /* __LIBCAMERA_IPA_INTERFACE_H__ */
|
|
@ -5,6 +5,7 @@ libcamera_api = files([
|
||||||
'event_dispatcher.h',
|
'event_dispatcher.h',
|
||||||
'event_notifier.h',
|
'event_notifier.h',
|
||||||
'geometry.h',
|
'geometry.h',
|
||||||
|
'ipa/ipa_interface.h',
|
||||||
'ipa/ipa_module_info.h',
|
'ipa/ipa_module_info.h',
|
||||||
'object.h',
|
'object.h',
|
||||||
'request.h',
|
'request.h',
|
||||||
|
|
27
src/libcamera/ipa_interface.cpp
Normal file
27
src/libcamera/ipa_interface.cpp
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2019, Google Inc.
|
||||||
|
*
|
||||||
|
* ipa_interface.cpp - Image Processing Algorithm interface
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <libcamera/ipa/ipa_interface.h>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file ipa_interface.h
|
||||||
|
* \brief Image Processing Algorithm interface
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace libcamera {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class IPAInterface
|
||||||
|
* \brief Interface for IPA implementation
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \fn IPAInterface::init()
|
||||||
|
* \brief Initialise the IPAInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
|
@ -10,6 +10,7 @@ libcamera_sources = files([
|
||||||
'event_notifier.cpp',
|
'event_notifier.cpp',
|
||||||
'formats.cpp',
|
'formats.cpp',
|
||||||
'geometry.cpp',
|
'geometry.cpp',
|
||||||
|
'ipa_interface.cpp',
|
||||||
'ipa_module.cpp',
|
'ipa_module.cpp',
|
||||||
'log.cpp',
|
'log.cpp',
|
||||||
'media_device.cpp',
|
'media_device.cpp',
|
||||||
|
|
|
@ -60,8 +60,6 @@ protected:
|
||||||
9001,
|
9001,
|
||||||
};
|
};
|
||||||
|
|
||||||
count += runTest("test/ipa/ipa-dummy-c.so", testInfo);
|
|
||||||
|
|
||||||
count += runTest("test/ipa/ipa-dummy-cpp.so", testInfo);
|
count += runTest("test/ipa/ipa-dummy-cpp.so", testInfo);
|
||||||
|
|
||||||
if (count < 0)
|
if (count < 0)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
ipa_modules_sources = [
|
ipa_modules_sources = [
|
||||||
['ipa-dummy-c', 'shared_test.c'],
|
|
||||||
['ipa-dummy-cpp', 'shared_test.cpp'],
|
['ipa-dummy-cpp', 'shared_test.cpp'],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#include <libcamera/ipa/ipa_module_info.h>
|
|
||||||
|
|
||||||
const struct IPAModuleInfo ipaModuleInfo = {
|
|
||||||
.name = "It's over nine thousand!",
|
|
||||||
.version = 9001,
|
|
||||||
};
|
|
Loading…
Add table
Add a link
Reference in a new issue