pipeline: ipa: raspberrypi: Refactor and move the Raspberry Pi code
Split the Raspberry Pi pipeline handler and IPA source code into common
and VC4/BCM2835 specific file structures.
For the pipeline handler, the common code files now live in
src/libcamera/pipeline/rpi/common/
and the VC4-specific files in src/libcamera/pipeline/rpi/vc4/.
For the IPA, the common code files now live in
src/ipa/rpi/{cam_helper,controller}/
and the vc4 specific files in src/ipa/rpi/vc4/. With this change, the
camera tuning files are now installed under share/libcamera/ipa/rpi/vc4/.
To build the pipeline and IPA, the meson configuration options have now
changed from "raspberrypi" to "rpi/vc4":
meson setup build -Dipas=rpi/vc4 -Dpipelines=rpi/vc4
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
46aefed208
commit
726e9274ea
@@ -1,68 +0,0 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
ipa_name = 'ipa_rpi'
|
||||
|
||||
rpi_ipa_deps = [
|
||||
libcamera_private,
|
||||
libatomic,
|
||||
]
|
||||
|
||||
rpi_ipa_includes = [
|
||||
ipa_includes,
|
||||
libipa_includes,
|
||||
include_directories('controller')
|
||||
]
|
||||
|
||||
rpi_ipa_sources = files([
|
||||
'raspberrypi.cpp',
|
||||
'md_parser_smia.cpp',
|
||||
'cam_helper.cpp',
|
||||
'cam_helper_ov5647.cpp',
|
||||
'cam_helper_imx219.cpp',
|
||||
'cam_helper_imx290.cpp',
|
||||
'cam_helper_imx296.cpp',
|
||||
'cam_helper_imx477.cpp',
|
||||
'cam_helper_imx519.cpp',
|
||||
'cam_helper_imx708.cpp',
|
||||
'cam_helper_ov9281.cpp',
|
||||
'controller/controller.cpp',
|
||||
'controller/histogram.cpp',
|
||||
'controller/algorithm.cpp',
|
||||
'controller/rpi/af.cpp',
|
||||
'controller/rpi/alsc.cpp',
|
||||
'controller/rpi/awb.cpp',
|
||||
'controller/rpi/sharpen.cpp',
|
||||
'controller/rpi/black_level.cpp',
|
||||
'controller/rpi/geq.cpp',
|
||||
'controller/rpi/noise.cpp',
|
||||
'controller/rpi/lux.cpp',
|
||||
'controller/rpi/agc.cpp',
|
||||
'controller/rpi/dpc.cpp',
|
||||
'controller/rpi/ccm.cpp',
|
||||
'controller/rpi/contrast.cpp',
|
||||
'controller/rpi/sdn.cpp',
|
||||
'controller/pwl.cpp',
|
||||
'controller/device_status.cpp',
|
||||
])
|
||||
|
||||
mod = shared_module(ipa_name,
|
||||
[rpi_ipa_sources, libcamera_generated_ipa_headers],
|
||||
name_prefix : '',
|
||||
include_directories : rpi_ipa_includes,
|
||||
dependencies : rpi_ipa_deps,
|
||||
link_with : libipa,
|
||||
install : true,
|
||||
install_dir : ipa_install_dir)
|
||||
|
||||
if ipa_sign_module
|
||||
custom_target(ipa_name + '.so.sign',
|
||||
input : mod,
|
||||
output : ipa_name + '.so.sign',
|
||||
command : [ipa_sign, ipa_priv_key, '@INPUT@', '@OUTPUT@'],
|
||||
install : false,
|
||||
build_by_default : true)
|
||||
endif
|
||||
|
||||
subdir('data')
|
||||
|
||||
ipa_names += ipa_name
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <libcamera/base/span.h>
|
||||
#include <libcamera/base/utils.h>
|
||||
|
||||
#include "camera_mode.h"
|
||||
#include "controller/camera_mode.h"
|
||||
#include "controller/controller.h"
|
||||
#include "controller/metadata.h"
|
||||
#include "md_parser.h"
|
||||
26
src/ipa/rpi/cam_helper/meson.build
Normal file
26
src/ipa/rpi/cam_helper/meson.build
Normal file
@@ -0,0 +1,26 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
rpi_ipa_cam_helper_sources = files([
|
||||
'cam_helper.cpp',
|
||||
'cam_helper_ov5647.cpp',
|
||||
'cam_helper_imx219.cpp',
|
||||
'cam_helper_imx290.cpp',
|
||||
'cam_helper_imx296.cpp',
|
||||
'cam_helper_imx477.cpp',
|
||||
'cam_helper_imx519.cpp',
|
||||
'cam_helper_imx708.cpp',
|
||||
'cam_helper_ov9281.cpp',
|
||||
'md_parser_smia.cpp',
|
||||
])
|
||||
|
||||
rpi_ipa_cam_helper_includes = [
|
||||
include_directories('..'),
|
||||
]
|
||||
|
||||
rpi_ipa_cam_helper_deps = [
|
||||
libcamera_private,
|
||||
]
|
||||
|
||||
rpi_ipa_cam_helper_lib = static_library('rpi_ipa_cam_helper', rpi_ipa_cam_helper_sources,
|
||||
include_directories : rpi_ipa_cam_helper_includes,
|
||||
dependencies : rpi_ipa_cam_helper_deps)
|
||||
29
src/ipa/rpi/controller/meson.build
Normal file
29
src/ipa/rpi/controller/meson.build
Normal file
@@ -0,0 +1,29 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
rpi_ipa_controller_sources = files([
|
||||
'algorithm.cpp',
|
||||
'controller.cpp',
|
||||
'device_status.cpp',
|
||||
'histogram.cpp',
|
||||
'pwl.cpp',
|
||||
'rpi/af.cpp',
|
||||
'rpi/agc.cpp',
|
||||
'rpi/alsc.cpp',
|
||||
'rpi/awb.cpp',
|
||||
'rpi/black_level.cpp',
|
||||
'rpi/ccm.cpp',
|
||||
'rpi/contrast.cpp',
|
||||
'rpi/dpc.cpp',
|
||||
'rpi/geq.cpp',
|
||||
'rpi/lux.cpp',
|
||||
'rpi/noise.cpp',
|
||||
'rpi/sdn.cpp',
|
||||
'rpi/sharpen.cpp',
|
||||
])
|
||||
|
||||
rpi_ipa_controller_deps = [
|
||||
libcamera_private,
|
||||
]
|
||||
|
||||
rpi_ipa_controller_lib = static_library('rpi_ipa_controller', rpi_ipa_controller_sources,
|
||||
dependencies : rpi_ipa_controller_deps)
|
||||
13
src/ipa/rpi/meson.build
Normal file
13
src/ipa/rpi/meson.build
Normal file
@@ -0,0 +1,13 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
subdir('cam_helper')
|
||||
subdir('controller')
|
||||
|
||||
foreach pipeline : pipelines
|
||||
pipeline = pipeline.split('/')
|
||||
if pipeline.length() < 2 or pipeline[0] != 'rpi'
|
||||
continue
|
||||
endif
|
||||
|
||||
subdir(pipeline[1])
|
||||
endforeach
|
||||
@@ -23,4 +23,4 @@ conf_files = files([
|
||||
])
|
||||
|
||||
install_data(conf_files,
|
||||
install_dir : ipa_data_dir / 'raspberrypi')
|
||||
install_dir : ipa_data_dir / 'rpi' / 'vc4')
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user