This release brings 158 commits with substantial development on the SoftISP
components. This brings in GPU acceleration, allowing us to get higher
throughput for cameras using this pipeline. Further development to improve the
image quality is ongoing now that we can perform more processing in realtime.
The simple pipeline handler now supports exposing the Raw streams directly
allowing us to enable the SoftISP by default without removing access to the
camera formats.
Kernel headers have been updated to v6.18, supporting the new V4L2 ISP kernel
interface which allows us to continue improvements to hardware ISP pipelines as
we add new features.
Logging has been improved to better detect when to enable or disable color
output and can be controlled through the environment variable
LIBCAMERA_LOG_COLOR.
A new control is added for LensShadingCorrectionEnable to allow runtime control
over the LSC components where supported.
The gstreamer pipeline now has raw support added to the libcamerasrc
stream-role property allowing raw streams to be configured and accessed.
An exciting new AWB algorithm using Neural Networks, has been added to the
Raspberry Pi IPA following extensive development and training performed by the
Raspberry Pi Camera Team.
And finally, the Documentation now includes a support matrix which will help
identify the current support and enablement for platforms and sensors.
Contributors:
36 Bryan O'Donoghue <bryan.odonoghue@linaro.org>
26 Milan Zamazal <mzamazal@redhat.com>
23 Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
20 Jacopo Mondi <jacopo.mondi@ideasonboard.com>
15 Stefan Klug <stefan.klug@ideasonboard.com>
8 Robert Mader <robert.mader@collabora.com>
5 Hans de Goede <hdegoede@redhat.com>
4 Daniel Scally <dan.scally@ideasonboard.com>
4 Peter Bailey <peter.bailey@raspberrypi.com>
3 Naushir Patuck <naush@raspberrypi.com>
2 Andrei Gansari <andrei.gansari@nxp.com>
2 Hans de Goede <johannes.goede@oss.qualcomm.com>
2 Jai Luthra <jai.luthra@ideasonboard.com>
2 Kieran Bingham <kieran.bingham@ideasonboard.com>
1 Julien Vuillaumier <julien.vuillaumier@nxp.com>
1 Khem Raj <raj.khem@gmail.com>
1 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1 Michael Olbrich <m.olbrich@pengutronix.de>
1 Paul Elder <paul.elder@ideasonboard.com>
1 Vasiliy Doylov <nekocwd@mainlining.org>
158 commits, 170 files changed, 7410 insertions(+), 2325 deletions(-)
Integration overview:
ABI:
The abi-compliance checker reports 100% compatibility in this release. But it's
a complete lie... so we're moving to v0.7.0 and increasing the SONAME for this
release.
$ ./utils/abi-compat.sh
Validating ABI compatibility between v0.6.0 and v0.7.0
Preparing, please wait ...
Comparing ABIs ...
Comparing APIs ...
Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 3
Total source compatibility problems: 0, warnings: 0
Report: compat_reports/libcamera/v0.6.0_to_v0.7.0/compat_report.html
The warnings reported are diagnosed as low severity but relate to a change of
the structure size of the public API Request object, which will require a
recompile of any users.
bugs:
- libcamera: simple: Move colour space logging after adjustment
- Fixes: 5a33bc10e9 ("libcamera: software_isp: Assign colour spaces in configurations")
- utils: gen-shader-headers: Fix subproject build
- Fixes: 19371dee41 ("utils: gen-shader-headers: Add a utility to generate headers from shaders")
- ipa: simple: awb: Fix ColourGains reported
- Fixes: a0b97475b1 ("ipa: simple: Report the ColourGains in metadata")
- apps: cam: Do not override Request::controls()
- Fixes: 568865a6c1 ("cam: Use script parser to set controls")
- gstreamer: Be prepared when queueing request
- Fixes: 06bd05bece ("gstreamer: Use dedicated lock for request queues")
- v4l2: v4l2_camera_proxy: Fix for getting default FrameDurationLimits
- Fixes: 4e9be7d11b ("ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls")
- ipa: mali-c55: Retain Camera::controls() after ipa->configure()
- Fixes: fe989ee514 ("ipa: mali-c55: Add Mali-C55 ISP IPA module")
- ipa: ipu3: Retain Camera::controls() after ipa->configure()
- Fixes: 87353f2bba ("ipa: ipu3: Derive ipu3::algorithms::Agc from AgcMeanLuminance")
- libcamera: v4l2_subdevice: Remove unnecessary variable
- Fixes: 5d2aad02e8 ("libcamera: add model() for retrieving model name in V4L2Subdevice")
- libcamera: simple: Fix black level offsets in AWB
- Fixes: 4e13c6f55b ("Honor black level in AWB")
- apps: qcam: Disable -Wsfinae-incomplete
- Link: https://qt-project.atlassian.net/browse/QTBUG-143470
- libcamera: base: utils: Fix namespace of `operator<<` for `Duration`
- Fixes: 5055ca747c ("libcamera: utils: Add helper class for std::chrono::duration")
core:
- libcamera: media_pipeline: Add accessor for MediaPipeline list of entities
- libcamera: controls: Small style fixes
- libcamera: base: Wrap <regex.h>
- libcamera: device_enumerator: Support regex to match entity names
- libcamera: media_device: Get entity by regexp
- libcamera: V4L2Subdevice: Get device by regexp
- utils: gen-shader-headers: Add a utility to generate headers from shaders
- meson: Automatically generate glsl_shaders.h from specified shader programs
- include: linux: drm_fourcc.h: Update to v6.18
- include: linux: intel-ipu3.h: Update to v6.18
- include: linux: media-bus-format.h: Update to v6.18
- include: linux: v4l2-controls.h: Update to v6.18
- include: linux: videodev2.h: Update to v6.18
- include: linux: README: Update to Linux v6.18
- utils: gen-shader-headers: Fix subproject build
- libcamera: device_enumerator_udev: Disable copy/move
- libcamera: device_enumerator_udev: Handle duplicate devices
- include: linux: Add stddef.h
- include: linux: Add v4l2-isp.h
- libcamera: request: Create control list with Camera info map
- libcamera: request: Move metadata_ to Private
- libcamera: request: Make metadata_ a class instance
- libcamera: request: Make controls_ a class instance
- libcamera: camera: Ensure a request's controls are valid
- libcamera: camera_manager: CameraManager::version(): Add `threadsafe` ref
- libcamera: controls: Simplify SFINAE template parameter
- libcamera: base: log: Add `LIBCAMERA_LOG_COLOR` env var
- libcamera: control_serializer: Remove unnecessary allocation
- libcamera: base: event_dispatcher_poll: Dispatch `POLLPRI` first
- meson: Do not force libc++ when using clang
- treewide: Remove `libcamera::LOG(...)` occurrences
- libcamera: base: log: Do not instantiate disabled `LogMessage`s
- libcamera: base: log: Do not check severity before printing
- libcamera: base: log: Remove `LogInvalid` check
- libcamera: base: log: Inline `LOG()` into `ASSERT()`
- libcamera: base: utils: join(): Don't use `const_iterator` directly
- libcamera: v4l2_subdevice: Remove unnecessary variable
- libcamera: v4l2_subdevice: Avoid reconstructing the `std::regex` object
- libcamera: v4l2_subdevice: Avoid unnecessary copy
- libcamera: control_ids: Introduce LensShadingCorrectionEnable
- libcamera: yaml_parser: Fix uninitialized variable warning
- libcamera: base: utils: Simplify `operator<<` for `Duration`
- libcamera: base: utils: Fix namespace of `operator<<` for `Duration`
pipeline:
- pipeline: imx8-isi: Integrating MediaPipeline class
- libcamera: simple: Move colour space logging after adjustment
- libcamera: simple: Exclude raw configurations from output conversions
- libcamera: simple: Handle processed and raw formats separately
- libcamera: simple: Validate raw stream configurations
- libcamera: simple: Don't enforce conversion with an added raw stream
- libcamera: simple: Set the number of software ISP streams to 2
- libcamera: simple: Require metadata only when software ISP is used
- libcamera: simple: Make raw streams working
- pipeline: rpi: Rename Stream::prepareBuffers to Stream::allocateBuffers
- pipeline: rpi: Rework internal buffer allocations
- libcamera: simple: Enable SoftISP for imx7-csi
- libcamera: pipeline: virtual: Don't use span iterator as pointer
- libcamera: simple: Fix black level offsets in AWB
softisp:
- libcamera: shaders: Move GL shader programs to src/libcamera/assets/shader
- libcamera: swstats_cpu: Update statsProcessFn() / processLine0() documentation
- libcamera: swstats_cpu: Drop patternSize_ documentation
- libcamera: swstats_cpu: Move header to libcamera/internal/software_isp
- libcamera: software_isp: Move benchmark code to its own class
- libcamera: swstats_cpu: Add processFrame() method
- libcamera: software_isp: Move useful items from DebayerCpu to Debayer base class
- libcamera: software_isp: Move Bayer params init from DebayerCpu to Debayer
- libcamera: software_isp: Move param select code to Debayer base class
- libcamera: software_isp: Move DMA Sync code to Debayer base class
- libcamera: software_isp: Make output DMA sync contingent
- libcamera: software_isp: Move isStandardBayerOrder to base class
- libcamera: software_isp: debayer: Introduce a start() / stop() methods to the debayer object
- libcamera: software_isp: debayer: Make the debayer_ object of type class Debayer not DebayerCpu
- libcamera: software_isp: lut: Make CCM available in debayer params
- libcamera: software_isp: blacklevel: Make black level available in debayer params
- libcamera: software_isp: lut: Make gamma from lut.cpp available in debayer params
- libcamera: software_isp: lut: Make contrast available in debayer params
- libcamera: software_isp: debayer: Latch contrastExp not contrast to debayer parameters
- libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access
- libcamera: software_isp: egl: Add a eGL base helper class
- libcamera: shaders: Rename bayer_8 to bayer_unpacked
- libcamera: shaders: Use highp not mediump for float precision
- libcamera: shaders: Extend debayer shaders to apply CCM gains
- libcamera: shaders: Extend bayer shaders to support swapping R and B on output
- libcamera: shaders: Add support for black level compensation
- libcamera: shaders: Add support for Gamma
- libcamera: shaders: Add support for contrast
- libcamera: shaders: Fix input sampling when width != stride
- libcamera: software_isp: Add member variables to track selected input/output pixelFormat
- libcamera: software_isp: Add a Size_ member variable to pass to eGL later
- libcamera: software_isp: debayer_egl: Add an eGL Debayer class
- libcamera: software_isp: debayer_cpu: Make getInputConfig and getOutputConfig static
- libcamera: software_isp: GPU support for unpacked 10/12-bit formats
- libcamera: software_isp: debayer_egl: Make DebayerEGL an environment option
- libcamera: software_isp: lut: Skip calculation lookup tables if gpuIspEnabled is true
- libcamera: software_isp: lut: Change default Gamma to 1.0/2.2
- libcamera: software_isp: Switch on default CCM at 65k
- libcamera: software_isp: debayer_egl: Make gpuisp default softisp mode
- libcamera: software_isp: Add a gpuisp todo list
- Revert "libcamera: software_isp: gbm: Add a GBM helper class for GPU surface access"
- egl: Remove unused functions
- egl: Remove bpp variable
- egl: Remove duplicated logging of EGL version
- egl: Print GLES version
- egl: Use the Mesa surfaceless platform instead of GBM
- egl: Add workaround for Mesa <= 22.2
apps:
- gstreamer: Add raw support to libcamerasrc stream-role property
- apps: cam: Do not override Request::controls()
- apps: lc-compliance: Commit camera configuration last
- qcam: viewfinder_gl: Set no-op Bayer shader values
- gstreamer: Be prepared when queueing request
- v4l2: v4l2_camera_proxy: Fix for getting default FrameDurationLimits
- apps: qcam: Disable -Wsfinae-incomplete
ipa:
- ipa: simple: awb: Fix ColourGains reported
- ipa: rpi: remove executable bits from data files
- ipa: mali-c55: Update header file and adjust IPA
- ipa: libipa: Introduce V4L2Params
- ipa: mali-c55: Introduce MaliC55Params
- ipa: simple: fix minimal analog gain init
- ipa: simple: agc: Make sure activeState.agc expo/again are always initialized
- ipa: simple: Add a flag to indicate gpuIspEnabled
- ipa: mali-c55: Retain Camera::controls() after ipa->configure()
- ipa: ipu3: Retain Camera::controls() after ipa->configure()
- ipa: rpi: controller: awb: Separate Bayesian AWB into AwbBayes
- ipa: rpi: controller: awb: Add Neural Network AWB
- ipa: rpi: controller: Ignore algorithms that are not enabled
- ipa: rpi: pisp: vc4: Update tuning files for new AWB
- libcamera: ipa: simple: Remove an unused include from awb.cpp
- libcamera: ipa: simple: Unwrap IPAFrameContext::ccm
- libcamera: ipa: simple: Generalize tracking matrix changes
- libcamera: ipa: simple: Rename "ccm" identifiers not specific to CCM
- libcamera: ipa: simple: Introduce a general correction matrix
- libcamera: ipa: simple: Initialise the general correction matrix
- libcamera: ipa: simple: Separate saturation from CCM
- libcamera: ipa: simple: Move contrast settings to adjust.cpp
- libcamera: ipa: simple: Make gamma adjustable
- libcamera: ipa: simple: Apply gain matrix in awb
- libcamera: ipa: simple: Use float type for adjustment controls
- libcamera: ipa: simple: Use symbolic constants for adjust defaults
- libcamera: ipa: simple: Set contrast metadata unconditionally
- libcamera: ipa: simple: Remove Lut algorithm
- libcamera: ipa: simple: Disable Ccm algorithm by default again
- ipa: rkisp1: lsc: Drop unused member variable
- ipa: rkisp1: lsc: Drop unused function declaration
- ipa: rkisp1: lsc: Replace assert with ASSERT
- ipa: rkisp1: lsc: Rename res to positions
- ipa: rkisp1: lsc: Rename res to ret
- ipa: rkisp1: lsc: Rename res to samples
- ipa: rksip1: lsc: Move function definitions out of class
- ipa: rkisp1: lsc: Move local types into anonymous namespace
- ipa: rkisp1: lsc: Handle quantization locally
- ipa: libipa: interpolator: Drop key quantization
- ipa: rkisp1: lsc: Pass sampling positions into samplePolynomial
- ipa: rkisp1: lsc: Pass crop rectangle as parameter
- ipa: rkisp1: lsc: Resample polynomial lens shading tables at configure time
- ipa: rkisp1: Implement LensShadingCorrectionEnable control
- ipa: rpi: Fix printing of `utils::Duration`
documentation:
- Documentation: Add ISP feature support matrix
- Documentation: Add camera sensor support table
- Documentation: guides: pipeline-handler: Refresh
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
314 lines
11 KiB
Meson
314 lines
11 KiB
Meson
# SPDX-License-Identifier: CC0-1.0
|
|
|
|
project('libcamera', 'c', 'cpp',
|
|
meson_version : '>= 1.0.1',
|
|
version : '0.7.0',
|
|
default_options : [
|
|
'werror=true',
|
|
'warning_level=2',
|
|
'cpp_std=c++17',
|
|
],
|
|
license : 'LGPL 2.1+')
|
|
|
|
# Generate version information. The libcamera_git_version variable contains the
|
|
# full version with build metadata (patch count and SHA1, e.g.
|
|
# 1.2.3+211-c94a24f4), while the libcamera_version variable contains the
|
|
# major.minor.patch (e.g. 1.2.3) only.
|
|
#
|
|
# If the source tree matches the last git version tag, the build metadata
|
|
# (e.g. +211-c94a24f4) is omitted from libcamera_git_version.
|
|
libcamera_git_version = run_command('utils/gen-version.sh',
|
|
meson.project_build_root(),
|
|
meson.project_source_root(),
|
|
check : false).stdout().strip()
|
|
|
|
# If the source tree isn't under git control, set libcamera_git_version to the
|
|
# meson project version.
|
|
if libcamera_git_version == ''
|
|
libcamera_git_version = meson.project_version()
|
|
endif
|
|
|
|
libcamera_version = libcamera_git_version.split('+')[0]
|
|
project_version = meson.project_version().split('+')[0]
|
|
|
|
# A shallow clone, or a clone without a reachable tag equivalent to the
|
|
# meson.project_version() could leave the project in a mis-described state.
|
|
# Produce a warning in this event, and fix to a best effort.
|
|
if libcamera_version != project_version
|
|
warning('The sources and meson.build disagree about the version: '
|
|
+ libcamera_version + ' != ' + project_version)
|
|
|
|
summary({'libcamera git version' : libcamera_git_version,
|
|
'Source version match' : false,
|
|
},
|
|
bool_yn : true, section : 'Versions')
|
|
|
|
# Re-run gen-version.sh to replace the git version (major.minor.patch) with
|
|
# the meson project version. The build metadata provided by git are kept.
|
|
libcamera_git_version = run_command('utils/gen-version.sh',
|
|
meson.project_build_root(),
|
|
meson.project_source_root(),
|
|
project_version,
|
|
check : false).stdout().strip()
|
|
libcamera_version = project_version
|
|
|
|
# Append a marker to show we have modified this version string.
|
|
libcamera_git_version += '-nvm'
|
|
endif
|
|
|
|
# The major and minor libcamera version components are used as the soname.
|
|
# No ABI/API compatibility is guaranteed between releases (x.y).
|
|
#
|
|
# When we declare a stable ABI/API we will provide a 1.0 release and the
|
|
# soversion at that point will be the 'major' release value (x).
|
|
semver = libcamera_version.split('.')
|
|
libcamera_soversion = semver[0] + '.' + semver[1]
|
|
|
|
summary({ 'Sources': libcamera_git_version, }, section : 'Versions')
|
|
|
|
# This script generates the .tarball-version file on a 'meson dist' command.
|
|
meson.add_dist_script('utils/run-dist.sh')
|
|
|
|
# Configure the build environment.
|
|
cc = meson.get_compiler('c')
|
|
cxx = meson.get_compiler('cpp')
|
|
config_h = configuration_data()
|
|
|
|
if cc.has_header_symbol('unistd.h', 'close_range', prefix : '#define _GNU_SOURCE')
|
|
config_h.set('HAVE_CLOSE_RANGE', 1)
|
|
endif
|
|
|
|
if cc.has_header_symbol('fcntl.h', 'F_ADD_SEALS', prefix : '#define _GNU_SOURCE')
|
|
config_h.set('HAVE_FILE_SEALS', 1)
|
|
endif
|
|
|
|
if cc.has_header_symbol('unistd.h', 'issetugid')
|
|
config_h.set('HAVE_ISSETUGID', 1)
|
|
endif
|
|
|
|
if cc.has_header_symbol('locale.h', 'locale_t', prefix : '#define _GNU_SOURCE')
|
|
config_h.set('HAVE_LOCALE_T', 1)
|
|
endif
|
|
|
|
if cc.has_header_symbol('sys/mman.h', 'memfd_create', prefix : '#define _GNU_SOURCE')
|
|
config_h.set('HAVE_MEMFD_CREATE', 1)
|
|
endif
|
|
|
|
ioctl_posix_test = '''
|
|
#include <sys/ioctl.h>
|
|
int ioctl (int, int, ...);
|
|
'''
|
|
|
|
if cc.compiles(ioctl_posix_test)
|
|
config_h.set('HAVE_POSIX_IOCTL', 1)
|
|
endif
|
|
|
|
if cc.has_header_symbol('stdlib.h', 'secure_getenv', prefix : '#define _GNU_SOURCE')
|
|
config_h.set('HAVE_SECURE_GETENV', 1)
|
|
endif
|
|
|
|
common_arguments = [
|
|
'-Wmissing-declarations',
|
|
'-Wshadow',
|
|
'-include', meson.current_build_dir() / 'config.h',
|
|
]
|
|
|
|
c_arguments = []
|
|
cpp_arguments = [
|
|
'-Wnon-virtual-dtor',
|
|
]
|
|
|
|
# \todo Switch to `version` when moving to C++20 as `ciso646` has been removed in C++20.
|
|
if cxx.has_header_symbol('ciso646', '_LIBCPP_VERSION')
|
|
cxx_stdlib = 'libc++'
|
|
elif cxx.has_header_symbol('ciso646', '__GLIBCXX__')
|
|
cxx_stdlib = 'libstdc++'
|
|
else
|
|
error('C++ standard library cannot be detected')
|
|
endif
|
|
|
|
message('Detected C++ standard library: ' + cxx_stdlib)
|
|
|
|
if cc.get_id() == 'clang'
|
|
if cc.version().version_compare('<9')
|
|
error('clang version is too old, libcamera requires 9.0 or newer')
|
|
endif
|
|
|
|
# Turn _FORTIFY_SOURCE by default on. This is needed on clang only as gcc
|
|
# enables it by default. FORTIFY will not work properly with `-O0`, and may
|
|
# result in macro redefinition errors if the user already has a setting for
|
|
# `-D_FORTIFY_SOURCE`. Do not enable FORTIFY in either of those cases.
|
|
if get_option('optimization') != '0'
|
|
fortify = cc.get_define('_FORTIFY_SOURCE')
|
|
if fortify == ''
|
|
message('Adding _FORTIFY_SOURCE')
|
|
common_arguments += [
|
|
'-D_FORTIFY_SOURCE=2',
|
|
]
|
|
endif
|
|
endif
|
|
|
|
cpp_arguments += [
|
|
'-Wextra-semi',
|
|
'-Wthread-safety',
|
|
]
|
|
endif
|
|
|
|
if cc.get_id() == 'gcc'
|
|
if cc.version().version_compare('<9')
|
|
error('gcc version is too old, libcamera requires 9.0 or newer')
|
|
endif
|
|
|
|
# gcc 13 implements the C++23 version of automatic move from local
|
|
# variables in return statements (see
|
|
# https://en.cppreference.com/w/cpp/language/return). As a result, some
|
|
# previously required explicit std::move() in return statements generate
|
|
# warnings. Those moves can't be removed as older compiler versions could
|
|
# use copy constructors instead of move constructors. The easiest fix is to
|
|
# disable the warning. With -Wpessimizing-move enabled, the compiler will
|
|
# still warn of pessimizing moves, only the redundant but not pessimizing
|
|
# moves will be ignored.
|
|
if cc.version().version_compare('>=13')
|
|
cpp_arguments += [
|
|
'-Wno-redundant-move',
|
|
]
|
|
endif
|
|
|
|
# gcc 7.1 introduced processor-specific ABI breakages related to parameter
|
|
# passing on ARM platforms. This generates a large number of messages
|
|
# during compilation. Silence them.
|
|
if host_machine.cpu_family() == 'arm'
|
|
cpp_arguments += [
|
|
'-Wno-psabi',
|
|
]
|
|
endif
|
|
endif
|
|
|
|
# We use C99 designated initializers for arrays as C++ has no equivalent
|
|
# feature. Both gcc and clang support this extension, but recent
|
|
# versions of clang generate a warning that needs to be disabled.
|
|
if cc.has_argument('-Wno-c99-designator')
|
|
common_arguments += [
|
|
'-Wno-c99-designator',
|
|
]
|
|
endif
|
|
|
|
c_arguments += common_arguments
|
|
cpp_arguments += common_arguments
|
|
|
|
add_project_arguments(c_arguments, language : 'c')
|
|
add_project_arguments(cpp_arguments, language : 'cpp')
|
|
add_project_link_arguments(cpp_arguments, language : 'cpp')
|
|
|
|
libcamera_includes = include_directories('include')
|
|
|
|
# Sub-directories fill py_modules with their dependencies.
|
|
py_modules = []
|
|
|
|
# Libraries used by multiple components
|
|
liblttng = dependency('lttng-ust', required : get_option('tracing'))
|
|
|
|
# Pipeline handlers
|
|
#
|
|
wanted_pipelines = get_option('pipelines')
|
|
|
|
arch_arm = ['arm', 'aarch64']
|
|
arch_x86 = ['x86', 'x86_64']
|
|
pipelines_support = {
|
|
'imx8-isi': arch_arm,
|
|
'ipu3': arch_x86,
|
|
'mali-c55': arch_arm,
|
|
'rkisp1': arch_arm,
|
|
'rpi/pisp': arch_arm,
|
|
'rpi/vc4': arch_arm,
|
|
'simple': ['any'],
|
|
'uvcvideo': ['any'],
|
|
'vimc': ['test'],
|
|
'virtual': ['test'],
|
|
}
|
|
|
|
if wanted_pipelines.contains('all')
|
|
pipelines = pipelines_support.keys()
|
|
elif wanted_pipelines.contains('auto')
|
|
host_cpu = host_machine.cpu_family()
|
|
pipelines = []
|
|
foreach pipeline, archs : pipelines_support
|
|
if pipeline in wanted_pipelines or host_cpu in archs or 'any' in archs
|
|
pipelines += pipeline
|
|
endif
|
|
endforeach
|
|
else
|
|
pipelines = wanted_pipelines
|
|
endif
|
|
|
|
# Tests require the vimc pipeline handler, include it automatically when tests
|
|
# are enabled.
|
|
if get_option('test')
|
|
foreach pipeline, archs : pipelines_support
|
|
if 'test' in archs and pipeline not in pipelines
|
|
message('Enabling ' + pipeline + ' pipeline handler for tests')
|
|
pipelines += pipeline
|
|
endif
|
|
endforeach
|
|
endif
|
|
|
|
# Utilities are parsed first to provide support for other components.
|
|
subdir('utils')
|
|
|
|
subdir('include')
|
|
subdir('src')
|
|
|
|
# The documentation and test components are optional and can be disabled
|
|
# through configuration values. They are enabled by default.
|
|
|
|
subdir('Documentation')
|
|
subdir('test')
|
|
|
|
if not meson.is_cross_build()
|
|
kernel_version_req = '>= 5.4.0'
|
|
kernel_version = run_command('uname', '-r', check : true).stdout().strip()
|
|
if not kernel_version.version_compare(kernel_version_req)
|
|
warning('The current running kernel version @0@ is too old to run libcamera.'
|
|
.format(kernel_version))
|
|
warning('If you intend to use libcamera on this machine, please upgrade to a kernel @0@.'
|
|
.format(kernel_version_req))
|
|
endif
|
|
endif
|
|
|
|
# Create a symlink from the build root to the source root. This is used when
|
|
# running libcamera from the build directory to locate resources in the source
|
|
# directory (such as IPA configuration files).
|
|
run_command('ln', '-fsT', meson.project_source_root(), meson.project_build_root() / 'source',
|
|
check : true)
|
|
|
|
configure_file(output : 'config.h', configuration : config_h)
|
|
|
|
# Check for python modules.
|
|
foreach module : py_modules
|
|
result = run_command('python3', '-c' , 'import @0@'.format(module),
|
|
capture : false, check : false)
|
|
if result.returncode() != 0
|
|
error('Python module \'@0@\' not found'.format(module))
|
|
endif
|
|
endforeach
|
|
|
|
## Summarise Configurations
|
|
summary({
|
|
'Enabled pipelines': pipelines,
|
|
'Enabled IPA modules': enabled_ipa_names,
|
|
'Controls files': controls_files_names,
|
|
'Properties files': properties_files_names,
|
|
'Hotplug support': libudev.found(),
|
|
'Tracing support': tracing_enabled,
|
|
'Android support': android_enabled,
|
|
'GStreamer support': gst_enabled,
|
|
'Python bindings': pycamera_enabled,
|
|
'V4L2 emulation support': v4l2_enabled,
|
|
'cam application': cam_enabled,
|
|
'qcam application': qcam_enabled,
|
|
'lc-compliance application': lc_compliance_enabled,
|
|
'Unit tests': test_enabled,
|
|
},
|
|
section : 'Configuration',
|
|
bool_yn : true)
|