mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 17:05:08 +03:00
ipa: Add a common interface for algorithm objects
In order to instantiate and use algorithms (AWB, AGC, etc.) there is a need for a common class to define mandatory methods. Instead of reinventing the wheel, reuse what Raspberry Pi has done and adapt to the minimum requirements expected. Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
b2cc8a2f57
commit
d5168b503a
3 changed files with 66 additions and 1 deletions
39
src/ipa/libipa/algorithm.cpp
Normal file
39
src/ipa/libipa/algorithm.cpp
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021, Ideas On Board
|
||||||
|
*
|
||||||
|
* algorithm.cpp - ISP control algorithms
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "algorithm.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \file algorithm.h
|
||||||
|
* \brief Algorithm common 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 {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \class Algorithm
|
||||||
|
* \brief The base class for all IPA algorithms
|
||||||
|
*
|
||||||
|
* The Algorithm class defines a standard interface for IPA algorithms. By
|
||||||
|
* abstracting algorithms, it makes possible the implementation of generic code
|
||||||
|
* to manage algorithms regardless of their specific type.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Algorithm::~Algorithm() = default;
|
||||||
|
|
||||||
|
} /* namespace ipa */
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
24
src/ipa/libipa/algorithm.h
Normal file
24
src/ipa/libipa/algorithm.h
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/* 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__ */
|
|
@ -1,13 +1,15 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
libipa_headers = files([
|
libipa_headers = files([
|
||||||
|
'algorithm.h',
|
||||||
])
|
])
|
||||||
|
|
||||||
libipa_sources = files([
|
libipa_sources = files([
|
||||||
|
'algorithm.cpp',
|
||||||
])
|
])
|
||||||
|
|
||||||
libipa_includes = include_directories('..')
|
libipa_includes = include_directories('..')
|
||||||
|
|
||||||
libipa = static_library('ipa', libipa_sources,
|
libipa = static_library('ipa', [libipa_sources, libipa_headers],
|
||||||
include_directories : ipa_includes,
|
include_directories : ipa_includes,
|
||||||
dependencies : libcamera_dep)
|
dependencies : libcamera_dep)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue