[libcamera-devel] [PATCH 6/8] libcamera: ipa: add dummy IPA implementation

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue May 28 18:23:28 CEST 2019


Hi Paul,

Thank you for the patch.

On Mon, May 27, 2019 at 06:35:38PM -0400, Paul Elder wrote:
> Add a dummy IPA module.
> 
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
>  src/ipa/ipa_dummy.cpp | 38 ++++++++++++++++++++++++++++++++++++++
>  src/ipa/meson.build   | 10 ++++++++++
>  src/meson.build       |  1 +
>  3 files changed, 49 insertions(+)
>  create mode 100644 src/ipa/ipa_dummy.cpp
>  create mode 100644 src/ipa/meson.build
> 
> diff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp
> new file mode 100644
> index 0000000..e246b58
> --- /dev/null
> +++ b/src/ipa/ipa_dummy.cpp
> @@ -0,0 +1,38 @@

Please add a copyright header.

> +#include <libcamera/ipa/ipa_interface.h>
> +#include <libcamera/ipa/ipa_module_info.h>
> +
> +#include <iostream>

Same comment as before.

> +
> +namespace libcamera {
> +
> +class IPADummy : public IPAInterface
> +{
> +public:
> +	int init();
> +};
> +
> +int IPADummy::init()
> +{
> +	std::cout << "initializing dummy IPA!" << std::endl;
> +	return 0;

We'll need to provide a logging service to the IPA modules, but for now
this is OK.

> +}
> +
> +/*
> + * External IPA module interface
> + */
> +
> +extern "C" {
> +const struct libcamera::IPAModuleInfo ipaModuleInfo = {
> +	1,
> +	0, 1,
> +	"PipelineHandlerVimc",
> +	"Dummy IPA for Vimc",
> +};
> +
> +IPAInterface *ipaCreate()
> +{
> +	return new IPADummy();
> +}
> +};
> +
> +}; /* namespace libcamera */
> diff --git a/src/ipa/meson.build b/src/ipa/meson.build
> new file mode 100644
> index 0000000..1ed29eb
> --- /dev/null
> +++ b/src/ipa/meson.build
> @@ -0,0 +1,10 @@
> +ipa_dummy_sources = files([
> +    'ipa_dummy.cpp',
> +])
> +
> +ipa_dummy = shared_library('ipa_dummy',
> +                           ipa_dummy_sources,
> +                           name_prefix : '',
> +                           include_directories : libcamera_includes,
> +                           install : true,
> +                           install_dir : join_paths(get_option('libdir'), 'libcamera'))
> diff --git a/src/meson.build b/src/meson.build
> index 4e41fd3..628e7a7 100644
> --- a/src/meson.build
> +++ b/src/meson.build
> @@ -1,3 +1,4 @@
>  subdir('libcamera')
> +subdir('ipa')
>  subdir('cam')
>  subdir('qcam')

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list