ipa: move libipa::Algorithm to ipa/ipu3/algorithms
The abstract Algorithm class was originally placed in libipa as an attempt define a generic algorithm container. This was a little optimistic and pushed a bit far too early. Move the Algorithm class into the IPU3 which is the only user of the class, as we adapt it to support modular algorithm components for the IPU3. Not documenting the namespace may cause issues with Doxygen in libipa. The file libipa.cpp is thus created as an empty file for now, but we can leverage it in the future to add more global libipa documentation, and possibly code too. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
3558334561
commit
a47a6906a2
9 changed files with 63 additions and 42 deletions
|
@ -2,7 +2,7 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2021, Ideas On Board
|
* Copyright (C) 2021, Ideas On Board
|
||||||
*
|
*
|
||||||
* algorithm.cpp - ISP control algorithms
|
* algorithm.cpp - IPU3 control algorithm interface
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "algorithm.h"
|
#include "algorithm.h"
|
||||||
|
@ -14,26 +14,17 @@
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
||||||
/**
|
namespace ipa::ipu3 {
|
||||||
* \brief The IPA namespace
|
|
||||||
*
|
|
||||||
* The IPA namespace groups all types specific to IPA modules. It serves as the
|
|
||||||
* top-level namespace for the IPA library libipa, and also contains
|
|
||||||
* module-specific namespaces for IPA modules.
|
|
||||||
*/
|
|
||||||
namespace ipa {
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class Algorithm
|
* \class Algorithm
|
||||||
* \brief The base class for all IPA algorithms
|
* \brief The base class for all IPU3 algorithms
|
||||||
*
|
*
|
||||||
* The Algorithm class defines a standard interface for IPA algorithms. By
|
* The Algorithm class defines a standard interface for IPA algorithms. By
|
||||||
* abstracting algorithms, it makes possible the implementation of generic code
|
* abstracting algorithms, it makes possible the implementation of generic code
|
||||||
* to manage algorithms regardless of their specific type.
|
* to manage algorithms regardless of their specific type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Algorithm::~Algorithm() = default;
|
} /* namespace ipa::ipu3 */
|
||||||
|
|
||||||
} /* namespace ipa */
|
|
||||||
|
|
||||||
} /* namespace libcamera */
|
} /* namespace libcamera */
|
24
src/ipa/ipu3/algorithms/algorithm.h
Normal file
24
src/ipa/ipu3/algorithms/algorithm.h
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021, Ideas On Board
|
||||||
|
*
|
||||||
|
* algorithm.h - IPU3 control algorithm interface
|
||||||
|
*/
|
||||||
|
#ifndef __LIBCAMERA_IPA_IPU3_ALGORITHM_H__
|
||||||
|
#define __LIBCAMERA_IPA_IPU3_ALGORITHM_H__
|
||||||
|
|
||||||
|
namespace libcamera {
|
||||||
|
|
||||||
|
namespace ipa::ipu3 {
|
||||||
|
|
||||||
|
class Algorithm
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~Algorithm() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
} /* namespace ipa::ipu3 */
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
||||||
|
|
||||||
|
#endif /* __LIBCAMERA_IPA_IPU3_ALGORITHM_H__ */
|
5
src/ipa/ipu3/algorithms/meson.build
Normal file
5
src/ipa/ipu3/algorithms/meson.build
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
ipu3_ipa_algorithms = files([
|
||||||
|
'algorithm.cpp',
|
||||||
|
])
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#include <libcamera/geometry.h>
|
#include <libcamera/geometry.h>
|
||||||
|
|
||||||
#include "libipa/algorithm.h"
|
#include "algorithms/algorithm.h"
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#include <libcamera/geometry.h>
|
#include <libcamera/geometry.h>
|
||||||
|
|
||||||
#include "libipa/algorithm.h"
|
#include "algorithms/algorithm.h"
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
subdir('algorithms')
|
||||||
|
|
||||||
ipa_name = 'ipa_ipu3'
|
ipa_name = 'ipa_ipu3'
|
||||||
|
|
||||||
ipu3_ipa_sources = files([
|
ipu3_ipa_sources = files([
|
||||||
|
@ -8,6 +10,8 @@ ipu3_ipa_sources = files([
|
||||||
'ipu3_awb.cpp',
|
'ipu3_awb.cpp',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
ipu3_ipa_sources += ipu3_ipa_algorithms
|
||||||
|
|
||||||
mod = shared_module(ipa_name,
|
mod = shared_module(ipa_name,
|
||||||
[ipu3_ipa_sources, libcamera_generated_ipa_headers],
|
[ipu3_ipa_sources, libcamera_generated_ipa_headers],
|
||||||
name_prefix : '',
|
name_prefix : '',
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
||||||
/*
|
|
||||||
* Copyright (C) 2021, Ideas On Board
|
|
||||||
*
|
|
||||||
* algorithm.h - ISP control algorithm interface
|
|
||||||
*/
|
|
||||||
#ifndef __LIBCAMERA_IPA_LIBIPA_ALGORITHM_H__
|
|
||||||
#define __LIBCAMERA_IPA_LIBIPA_ALGORITHM_H__
|
|
||||||
|
|
||||||
namespace libcamera {
|
|
||||||
|
|
||||||
namespace ipa {
|
|
||||||
|
|
||||||
class Algorithm
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual ~Algorithm();
|
|
||||||
};
|
|
||||||
|
|
||||||
} /* namespace ipa */
|
|
||||||
|
|
||||||
} /* namespace libcamera */
|
|
||||||
|
|
||||||
#endif /* __LIBCAMERA_IPA_LIBIPA_ALGORITHM_H__ */
|
|
22
src/ipa/libipa/libipa.cpp
Normal file
22
src/ipa/libipa/libipa.cpp
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021, Ideas On Board
|
||||||
|
*
|
||||||
|
* libipa.cpp - libipa interface
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace libcamera {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief The IPA namespace
|
||||||
|
*
|
||||||
|
* The IPA namespace groups all types specific to IPA modules. It serves as the
|
||||||
|
* top-level namespace for the IPA library libipa, and also contains
|
||||||
|
* module-specific namespaces for IPA modules.
|
||||||
|
*/
|
||||||
|
namespace ipa {
|
||||||
|
|
||||||
|
} /* namespace ipa */
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
libipa_headers = files([
|
libipa_headers = files([
|
||||||
'algorithm.h',
|
|
||||||
'camera_sensor_helper.h',
|
'camera_sensor_helper.h',
|
||||||
'histogram.h'
|
'histogram.h'
|
||||||
])
|
])
|
||||||
|
|
||||||
libipa_sources = files([
|
libipa_sources = files([
|
||||||
'algorithm.cpp',
|
|
||||||
'camera_sensor_helper.cpp',
|
'camera_sensor_helper.cpp',
|
||||||
'histogram.cpp'
|
'histogram.cpp',
|
||||||
|
'libipa.cpp',
|
||||||
])
|
])
|
||||||
|
|
||||||
libipa_includes = include_directories('..')
|
libipa_includes = include_directories('..')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue