forked from raspberrypi/libcamera
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]>
- Loading branch information
Showing
121 changed files
with
172 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
ipa_name = 'ipa_rpi_vc4' | ||
|
||
vc4_ipa_deps = [ | ||
libcamera_private, | ||
libatomic, | ||
] | ||
|
||
vc4_ipa_libs = [ | ||
rpi_ipa_cam_helper_lib, | ||
rpi_ipa_controller_lib | ||
] | ||
|
||
vc4_ipa_includes = [ | ||
ipa_includes, | ||
libipa_includes, | ||
] | ||
|
||
vc4_ipa_sources = files([ | ||
'raspberrypi.cpp', | ||
]) | ||
|
||
vc4_ipa_includes += include_directories('..') | ||
|
||
mod = shared_module(ipa_name, | ||
[vc4_ipa_sources, libcamera_generated_ipa_headers], | ||
name_prefix : '', | ||
include_directories : vc4_ipa_includes, | ||
dependencies : vc4_ipa_deps, | ||
link_with : libipa, | ||
link_whole : vc4_ipa_libs, | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
libcamera_sources += files([ | ||
'delayed_controls.cpp', | ||
'rpi_stream.cpp', | ||
]) |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
subdir('common') | ||
|
||
foreach pipeline : pipelines | ||
pipeline = pipeline.split('/') | ||
if pipeline.length() < 2 or pipeline[0] != 'rpi' | ||
continue | ||
endif | ||
|
||
subdir(pipeline[1]) | ||
endforeach |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions
2
...ibcamera/pipeline/raspberrypi/meson.build → src/libcamera/pipeline/rpi/vc4/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
libcamera_sources += files([ | ||
'delayed_controls.cpp', | ||
'dma_heaps.cpp', | ||
'raspberrypi.cpp', | ||
'rpi_stream.cpp', | ||
]) | ||
|
||
subdir('data') |
Oops, something went wrong.