libcamera: ipa: add dummy IPA implementation
Add a dummy IPA module. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
45
src/ipa/ipa_dummy.cpp
Normal file
45
src/ipa/ipa_dummy.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2019, Google Inc.
|
||||
*
|
||||
* ipa_dummy.cpp - Dummy Image Processing Algorithm module
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <libcamera/ipa/ipa_interface.h>
|
||||
#include <libcamera/ipa/ipa_module_info.h>
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class IPADummy : public IPAInterface
|
||||
{
|
||||
public:
|
||||
int init();
|
||||
};
|
||||
|
||||
int IPADummy::init()
|
||||
{
|
||||
std::cout << "initializing dummy IPA!" << std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* External IPA module interface
|
||||
*/
|
||||
|
||||
extern "C" {
|
||||
const struct IPAModuleInfo ipaModuleInfo = {
|
||||
IPA_MODULE_API_VERSION,
|
||||
0,
|
||||
"PipelineHandlerVimc",
|
||||
"Dummy IPA for Vimc",
|
||||
};
|
||||
|
||||
IPAInterface *ipaCreate()
|
||||
{
|
||||
return new IPADummy();
|
||||
}
|
||||
};
|
||||
|
||||
}; /* namespace libcamera */
|
||||
@@ -1,2 +1,15 @@
|
||||
ipa_dummy_sources = files([
|
||||
'ipa_dummy.cpp',
|
||||
])
|
||||
|
||||
ipa_install_dir = join_paths(get_option('libdir'), 'libcamera')
|
||||
|
||||
ipa_dummy = shared_library('ipa_dummy',
|
||||
ipa_dummy_sources,
|
||||
name_prefix : '',
|
||||
include_directories : libcamera_includes,
|
||||
install : true,
|
||||
install_dir : ipa_install_dir)
|
||||
|
||||
config_h.set('IPA_MODULE_DIR',
|
||||
'"' + join_paths(get_option('prefix'), get_option('libdir'), 'libcamera') + '"')
|
||||
'"' + join_paths(get_option('prefix'), ipa_install_dir) + '"')
|
||||
|
||||
Reference in New Issue
Block a user