mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 17:05:08 +03:00
ipa: rkisp1: Use the Algorithm class
Now that libipa offers a templated class for Algorithm, use it in RkISP1. 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>
This commit is contained in:
parent
fdf1426694
commit
55c07ed4db
4 changed files with 40 additions and 1 deletions
26
src/ipa/rkisp1/algorithms/algorithm.h
Normal file
26
src/ipa/rkisp1/algorithms/algorithm.h
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2021, Ideas On Board
|
||||||
|
*
|
||||||
|
* algorithm.h - RkISP1 control algorithm interface
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <linux/rkisp1-config.h>
|
||||||
|
|
||||||
|
#include <libcamera/ipa/rkisp1_ipa_interface.h>
|
||||||
|
|
||||||
|
#include <libipa/algorithm.h>
|
||||||
|
|
||||||
|
#include "ipa_context.h"
|
||||||
|
|
||||||
|
namespace libcamera {
|
||||||
|
|
||||||
|
namespace ipa::rkisp1 {
|
||||||
|
|
||||||
|
using Algorithm = libcamera::ipa::Algorithm<IPAContext, IPACameraSensorInfo, rkisp1_params_cfg, rkisp1_stat_buffer>;
|
||||||
|
|
||||||
|
} /* namespace ipa::rkisp1 */
|
||||||
|
|
||||||
|
} /* namespace libcamera */
|
4
src/ipa/rkisp1/algorithms/meson.build
Normal file
4
src/ipa/rkisp1/algorithms/meson.build
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
rkisp1_ipa_algorithms = files([
|
||||||
|
])
|
|
@ -1,5 +1,7 @@
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
subdir('algorithms')
|
||||||
|
|
||||||
ipa_name = 'ipa_rkisp1'
|
ipa_name = 'ipa_rkisp1'
|
||||||
|
|
||||||
rkisp1_ipa_sources = files([
|
rkisp1_ipa_sources = files([
|
||||||
|
@ -7,6 +9,8 @@ rkisp1_ipa_sources = files([
|
||||||
'rkisp1.cpp',
|
'rkisp1.cpp',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
rkisp1_ipa_sources += rkisp1_ipa_algorithms
|
||||||
|
|
||||||
mod = shared_module(ipa_name,
|
mod = shared_module(ipa_name,
|
||||||
[rkisp1_ipa_sources, libcamera_generated_ipa_headers],
|
[rkisp1_ipa_sources, libcamera_generated_ipa_headers],
|
||||||
name_prefix : '',
|
name_prefix : '',
|
||||||
|
|
|
@ -25,9 +25,11 @@
|
||||||
|
|
||||||
#include <libcamera/internal/mapped_framebuffer.h>
|
#include <libcamera/internal/mapped_framebuffer.h>
|
||||||
|
|
||||||
#include "ipa_context.h"
|
#include "algorithms/algorithm.h"
|
||||||
#include "libipa/camera_sensor_helper.h"
|
#include "libipa/camera_sensor_helper.h"
|
||||||
|
|
||||||
|
#include "ipa_context.h"
|
||||||
|
|
||||||
namespace libcamera {
|
namespace libcamera {
|
||||||
|
|
||||||
LOG_DEFINE_CATEGORY(IPARkISP1)
|
LOG_DEFINE_CATEGORY(IPARkISP1)
|
||||||
|
@ -82,6 +84,9 @@ private:
|
||||||
|
|
||||||
/* Local parameter storage */
|
/* Local parameter storage */
|
||||||
struct IPAContext context_;
|
struct IPAContext context_;
|
||||||
|
|
||||||
|
/* Maintain the algorithms used by the IPA */
|
||||||
|
std::list<std::unique_ptr<ipa::rkisp1::Algorithm>> algorithms_;
|
||||||
};
|
};
|
||||||
|
|
||||||
int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision)
|
int IPARkISP1::init(const IPASettings &settings, unsigned int hwRevision)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue