ipa: libipa: Introduce Algorithm class template
The algorithms are using the same function names with specialized parameters. Instead of duplicating code, introduce a libipa Algorithm class which implements a base class with template parameters in libipa, and use it in each IPA. As we now won't need an algorithm class for each IPA, move the documentation to libipa, and make it agnostic of the IPA used. While at it, fix the IPU3::Algorithm::Awb documentation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
b6fa52fc5b
commit
fdf1426694
6 changed files with 67 additions and 32 deletions
38
src/ipa/libipa/algorithm.h
Normal file
38
src/ipa/libipa/algorithm.h
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2021, Ideas On Board
|
||||
*
|
||||
* algorithm.h - ISP control algorithm interface
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
namespace ipa {
|
||||
|
||||
template<typename Context, typename Config, typename Params, typename Stats>
|
||||
class Algorithm
|
||||
{
|
||||
public:
|
||||
virtual ~Algorithm() {}
|
||||
|
||||
virtual int configure([[maybe_unused]] Context &context,
|
||||
[[maybe_unused]] const Config &configInfo)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void prepare([[maybe_unused]] Context &context,
|
||||
[[maybe_unused]] Params *params)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void process([[maybe_unused]] Context &context,
|
||||
[[maybe_unused]] const Stats *stats)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace ipa */
|
||||
|
||||
} /* namespace libcamera */
|
Loading…
Add table
Add a link
Reference in a new issue