Age | Commit message (Collapse) | Author |
|
Bugfixes:
- meson: Ignore -Wredundant-move with gcc-13 and newer
- cam: file_sink: Workaround gcc-13 dangling-reference false positive
- libcamera: Open files with O_CLOEXEC
- meson: Fix git version parsing
- libcamera: camera_manager: Stop exponential explosive calls to createPipelineHandlers
- py: cam: Fix demosaic overflow issue
- libcamera: base: Make the registration of log categories atomic
Core:
- test: controls: control_info_map: Test default constructor
- controls: guard ControlInfoMap against nullptr idmap_
- device_enumerator_udev: Use std::string_view
- formats: Add 14-bits Bayer RAW formats
- device_enumerator_udev: Remove devnum from dependency map
- meson: libcamera: Report IPA signature method
- meson: Align handling of build metadata
- converter: Check converter validity
- Keep using syslog for isolated IPA modules
- utils: ipc: Update parser.py
- utils: checkstyle.py: Don't run commit title checker on staged commits
- framebuffer: Allow inheritance of FrameBuffer
- Remove transform from V4L2SubdeviceFormat
- libcamera: camera_sensor: Add tryFormat()
- camera_sensor: Fix typo in comment
- camera_sensor: Demote flip support message to Debug
- internal: tracepoints: Use correct include directive
- libcamera: camera: Ensure queued requests are invalid
ipa:
- doc: Clarify IPA acronym in its namespace description
- rkisp1: Add tuning files for PinephonePro sensors
- rkisp1: Add tuning files for Google DRU "Scarlet" sensors
- rkisp1: lsc: Fix integer division error
- libipa: Add OV2685 Camera Sensor Helper
- libipa: Add OV5647 Camera Sensor Helper
- raspberrypi: agc: Add "shadows" constraint mode
- raspberrypi: generalise algorithms
- raspberrypi: Fix default frame durations calculation
- raspberrypi: Ensure shutter speed and gain are clipped in the AGC
- raspberrypi: Use the new sensor limits fields in CameraMode
- raspberrypi: Add sensor mode limits to CameraMode
- raspberrypi: Fix crash under LTO
- raspberrypi: imx296: Minor tuning updates
- raspberrypi: agc: Fix overflow in Y value calculation
- raspberrypi: Better heuristics for calculating Unicam timeout
- raspberrypi: Generalise statistics
- raspberrypi: Change Unicam timeout handling
pipeline:
- simple: Validate transform
- imx8-isi: Remove mbusCode from formatsMap_
- imx8-isi: Automatically select media bus code
- imx8-isi: Split Bayer/YUV config generation
- imx8-isi: Break out RAW/YUV format selection
- raspberrypi: Iterate over all Unicam instances in match()
- raspberrypi: Add a Unicam timeout override config options
- raspberrypi: Always use ColorSpace::Raw for raw streams
- raspberrypi: Drop unused code
- ipu3: Drop unused code
apps:
- cam: kms_sink: Drop unique_ptr<> from DRM::AtomicRequest
- cam Return std::optional<> from StreamKeyValueParser::parseRole()
- android: jpeg: Add JEA implementation
ABI Compliance:
* abi-compliance-checker reports 98.6% ABI and 100% API compatibility with
with v0.0.4
Total binary compatibility problems: 1, warnings: 1
Total source compatibility problems: 0, warnings: 0
- First virtual method ~__dt ( ) has been added to this class.
1) The layout of type structure has been shifted by 8 bytes by the added v-table pointer.
2) Size of class has been increased by 8 bytes.
affected symbols: 6 (1.4%)
FrameBuffer::releaseFence ( )
FrameBuffer::setCookie ( uint64_t cookie )
FrameBuffer::cookie ( )
FrameBuffer::planes ( )
FrameBuffer::request ( )
FrameBuffer::metadata ( )
This ABI breakage was introduced by:
4843bfa66dc1 ("libcamera: framebuffer: Allow inheritance of FrameBuffer")
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Starting from 13.1, gcc 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. This is the case when a function returns an object whose type
is a class derived from the class type the function returns:
struct U { };
struct T : U { };
U f()
{
T t;
return t;
}
Up to C++20, the automatic move from local variables selects the move
constructor of class U, which is not the move constructor of the
expression. Overload resolution is then performed a second time, with t
considered as an lvalue. An explicit `std::move(t)` is needed in the
return statement to select the U move constructor.
Starting from C++23, `t` is treated as an xvalue, and the U move
constructor is selected without the need for an explicit `std::move(t)`.
An explicit `std:move()` then generates a redundant-move warning, as in
the valueOrTuple() function in src/py/libcamera/py_helpers.cpp.
Omitting the `std::move()` silences the warning, but selects the copy
constructor of U with older gcc versions and with clang, which
negatively impacts performance.
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.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The previous attempt to fix git version parsing in commit d34cefad1791
("meson: Fix git version parsing") was too naive, and didn't take into
account cases where the libcamera git version contains no or multiple
'+' signs.
Fixing this is more complex than a one-liner change, as meson doesn't
support Python-style slicing of arrays or a length method on strings.
The simplest and most versatile option is to patch the version string in
the gen-version.sh script. Do so, and clarify the comments related to
version handling in meson.build.
Fixes: d34cefad1791 ("meson: Fix git version parsing")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
When extracting the build metadata from the git version, we use the
string strip() method to remove the version prefix. This is incorrect,
as the strip() method takes a set of characters to be removed, not a
literal string. Fix it by splitting the git version string on the '+'
character and keeping the suffix.
Fixes: 02518e598e8f ("meson: Rewrite .replace usage")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The build metadata is split off correctly from the version string
obtained with utils/gen-version.sh, but for the meson project version
this step is not carried out. However, since libcamera uses Semantic
Versioning, it should be possible to add build metadata to the meson
project version. Align the handling of the build metadata to resolve
this mismatch.
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Bugfixes:
* libcamera: yaml_parser: Use C locale
* libcamera: base: utils: Support C libraries lacking locale support
* py: cam.py: Fix duplicate metadata output if more than one stream
* libcamera: camera: Fix validateColorSpaces to choose main colour space
* pipeline: raspberrypi: Fix handling of colour spaces
Core:
* test: Fix/Enable testing with ASan
* test: Remove redundant pipeline tests
* meson: Only build pipeline handlers needed in host architecture
* meson: Add 'all' choice to pipelines option
* utils: checkstyle.py: Add commit title checker
* libcamera: ipa_module: Relax ipaModuleInfo symbol size check
* pipeline: Support configuration file paths
ipa:
* camera_sensor: Improve h/v flip handling
* camera_sensor: Add AR0521 Sensor support
* camera_sensor: Add OV4689 Sensor support
* camera_sensor: Add support for OmniVision OV8858
* raspberrypi: Support Autofocus with PDAF
* raspberrypi: Support for the Sony IMX708 sensor
* rkisp1: Raise maximum analogue gain
pipeline:
* raspberrypi: Support parameters from a configuration file
* raspberrypi: Add a parameter to disable startup drop frames
* libcamera: rkisp1: Add support for Transform
apps:
* gstreamer: Add bayer8 support to libcamerasrc
* qcam: Show string representation of pixel format
ABI Compliance:
* abi-compliance-checker reports 100% ABI and API compatibility with
with v0.0.3
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The supported pipelines are listed in three places: the
meson_options.txt file, the defined array when a user selects
-Dpipelines="all", and arrays defined when the default
-Dpipelines="auto" is selected.
This can be hard to maintain and error prone.
Rework the definition of pipeline selection to a single table which
specifies the architecture(s) that the pipeline handler supports and
iterate it to handle the special cases for 'all', 'auto' and 'test'.
The current behaviour such that 'all' takes precedence over 'auto' is
maintained, and 'test' is now extended such that additional test
pipeline handlers can easily be introduced.
The existing implementation defines the i.MX8-ISI and RKISP1 pipeline
handlers as only supported by 'aarch64'. This conversion changes the
behaviour such that those pipeline handlers are now supported on both
'arm' and 'aarch64' as each of those platforms could support a 32-bit
ARM build.
Suggested-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Not all C libraries include support for locale objects (locale_t) and
the strto*_l() family of functions. A notable example is uClibc that can
be compiled with a hardcoded "C" locale. Compilation then fails as the
newlocale(), freelocale() and strtod_l() functions are not defined.
Fix the compilation breakage by checking for the availability of the
locale_t type, and fall back to strtod() when the type isn't available.
This may not lead to the correct result if support for locale objects
isn't available and the locale isn't hardcoded to "C", but that is such
a corner case that we will likely never encounter it.
Fixes: e8ae254970cf ("libcamera: yaml_parser: Use C locale")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
|
|
Add an 'all' choice to the pipelines option, for building all pipelines.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
|
|
By default all pipeline handlers are built, regardless on whether these
are needed in the host architecture or not. It makes more sense to build
only the pipeline handlers that will be used for the given architecture.
Let's do that by default now, but still allow to build the other
pipeline handlers if needed, by using the `pipelines` meson option. For
example, on a x86-64 platform:
$ meson build
...
Configuration
Enabled pipelines : ipu3
uvcvideo
Enabled IPA modules : ipu3
...
$ meson build -Dpipelines="ipu3,raspberrypi,rkisp1" -Dtest=true
...
Configuration
Enabled pipelines : ipu3
raspberrypi
rkisp1
vimc
Enabled IPA modules : ipu3
raspberrypi
rkisp1
vimc
...
Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Key bug fixes:
* Segfault in the ContolInfo() constructor for an empty V4L2 menu
Bug: https://bugs.libcamera.org/show_bug.cgi?id=167
Fix: libcamera: v4l2_device: Workaround faulty control menus
This resolves and prevents crashes that have occured in Pipewire when
users connect poorly implemented UVC devices.
ABI Compliance:
abi-compliance-checker reports 100% ABI and API compatibility with with
v0.0.2, however 81e7689bb168 ("libcamera: stream: Turn StreamRole into
scoped enumeration") modifies an enum into a class enum. This may need
minor updates to applications, and didn't appear to be picked up by
abi-compliance-checker.
- See https://git.libcamera.org/libcamera/libcamera.git/commit/?id=81e7689bb168a for more details.
Highlights:
Core:
* Fix tracing when built as a subproject
* Avoid double map lookups in framebuffer_allocator
* Workaround faulty control menus
* controls: Change LensPosition units to dioptres
* camera_sensor: Add IMX519 sensor properties
* Documentation: contributing: Add commit message guidelines
* Declare generic converter interface
utils:
* Add libtuning
* Add initial libtuning script support for rkisp1 and raspberrypi.
* checkstyle.py: Check new header file on new and renamed meson.build files
ipa:
* Move IPA sensor controls validation to CameraSensor (IPU3/RKISP1)
rkisp1:
* Support FrameDurationLimits control for FrameRate management
* Support raw capture (IPA, configuration, and runtime)
* Add support for manual gain and exposure
* Fix stream size validation
* Add additional default values to controls
imx8-isi:
* Enumerate supported stream formats
* Set SensorTimestamp metadata
Raspberry Pi:
* Remove generic "pause" mechanism from Algorithm
- Remove enum BuffferMask from the mojom interface
- Fix digital gain calculations for manual mode
- Fix bug in IPA frame drop logic
- imx477: Update tuning file for the latest camera modules
- Add a "scientific" tuning for the IMX477
Apps:
- cam: kms: Avoid 'unused-parameter' warnings
- cam: Support parsing array controls in capture scripts
- gstreamer: Improve control id lookups
- lc-compliance: simple_capture: Free Requests properly
python:
- Support controls that use an array of Rectangles
- Expose the Request Sequence Number in Python Bindings
test:
- Validate CameraSensor Ancillary Devices (focusLens)
- controls: control_info: Test default def() values
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
This release contains all the work merged to libcamera over the last 5
weeks, including the following summary highlights:
Highlights:
Core:
* New pipeline handler for the IMX ISI
* Fixed memory leak in the logging infrastructure
* Fixed meson support for 0.56
* Additional Thread Safety annotations added throughout
* Add a release method to pipeline handlers to support
freeing resources when a camera is released, but not
deleted.
* Group test applications under src/apps
* Make libdl optional to support Android builds
Application layers:
* Added DNG File output to cam
* Fixes for building against Android
* gstreamer framerate control and negotiation
IPA:
* Support setting metadata directly from (libipa) algorithms
* Set AGC and AWB metadata for both RKISP1 and IPU3.
* Support for enum serialization and Flags
* Support multiple lens shading tables for different colour
temperatures on RKISP1/i.MX8MP.
Raspberry Pi IPA:
* Full line length control
* Better HBLANK synchronisation and full line length control
* Support ov9281 as ov9281_mono
* Update colour temperature whenever manual gains change
abi-compliance-checker tells me that this release is 100% abi compatible
with v0.0.1.
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Meson introduces a .replace() method in version 0.58.0. However we aim
to restrict ourselves to 0.56 meson features, as released by Debian
stable.
The recent introduction of release management infrastructure makes use
of the .replace() method to fix up the version string when there is a
mis-match between the release version and any (lack) of tags in the git
version description. This breaks when built on systems with only meson
0.56.
Refactor this to use a concatenation of the project version and a
stripped git version to regenerate the full source version string that
will be reported by libcamera.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
This patch release commences the package release procedures for the
project.
Initial releases will include a bump to the patch (0.0.x) version
number, as well as a corresponding increment to the soname.
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The libcamera project is not yet ready to declare ABI nor API stability,
but it will benefit the community to be able to provide more regular
release cycles to determine 'versioned' points of history.
Ideally, these releases will be made at any ABI breakage, but can be
made at arbitary time based points along the way.
To support releases which may not be ABI stable, declare the soversion
of both the libcamera and libcamera-base library to be dependant upon
both the major minor and patch component of the project version.
As part of this, introduce a new 'Versions' summary section to highlight
the different version components that may become apparent within any
given build.
Bumping versions may leave dangling libcamera.so.* symlinks in build
directories. This will confuse Doxygen which will print during its
directory scanning phase a warning that the symlink can't be read. As we
don't need Doxygen to follow symlinks, disable it with EXCLUDE_SYMLINKS.
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The comment for supporting the custom script on 'make dist' contains a
typo. Fix it.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
Usage of find_library() to find dependencies that libcamera needs to
compile against can lead to the library being found even if the
corresponding headers are not installed. This will then result in a
compilation failure. Switch to dependency() for libdw, libunwind and
lttng-ust to fix this, all three libraries come with a pkgconfig file
that is usually installed by the distribution package that contains the
library headers.
Reported-by: Christian Rauch <Rauch.Christian@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
"ipa_modules" stores the value of the ipas meson build option. IPAs are
enabled if and only if there is an enabled pipeline for an IPA listed in
"ipa_modules" array. It is basically the intersection of pipelines and
ipa_modules array.
In order to correctly report which IPAs get enabled, let's create a new
array storing this intersection.
Cc: Quentin Schulz <foss+libcamera@0leil.net>
Reported-by: Daniel Semkowicz <dse@thaumatec.com>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
|
|
It's not safe to assume `-include config.h` works, since this depends on
the functionality of the compiler that the cwd when running the compiler
is searched first.
When libcamera is included as a Meson subproject, the cwd of the
compiler is the cwd of the main project, not of libcamera's build dir,
and thus cannot be found. Instead, pass the include filename as a path
based on the current build dir.
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Add libcamera Python bindings. pybind11 is used to generate the C++ <->
Python layer.
We use pybind11 'smart_holder' version to avoid issues with private
destructors and shared_ptr. There is also an alternative solution here:
https://github.com/pybind/pybind11/pull/2067
Only a subset of libcamera classes are exposed. Implementing and testing
the wrapper classes is challenging, and as such only classes that I have
needed have been added so far.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add 'check: true/false' to all run_command() calls as suggested in
https://github.com/mesonbuild/meson/issues/9300 to get rid of meson
warning "You should add the boolean check kwarg to the run_command
call."
This makes meson fail if the executed command fails, which makes sense.
[Kieran: Ignore failures on utils/genversion.sh]
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
meson.source_root() and meson.build_root() are deprecated. Use
meson.project_source_root() and meson.project_build_root() instead.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Ubuntu 22.04 LTS has been released with meson 0.61.2, and it is easy to
install a recent version of meson with python-pip, so let's update the
required meson version to get rid of the Android compilation
limitation.
Additionally, going to meson 0.55 gives the ability to have patch files
for git-wraps which is useful for Python bindings.
0.56 brings meson.project_source_root() and meson.project_build_root(),
allowing us to get rid of the deprecated meson.source_root() and
meson.build_root().
So, let's update the required meson version to 0.56.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
gcc 7 has reached end of life and isn't used as a default compiler by
any of the major distributions. It has also been dropped from buildroot.
Drop its support in libcamera.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
Building the libcamera Android layer currently makes use of features
from meson 0.55. The core libcamera framework in the default configuration
without android enabled uses the 'summary' feature available in 0.53, and
is the lowest supportable meson version if the Android HAL is excluded.
Ubuntu 20.04 LTS currently provides meson 0.53 and represents an
acceptable minimum version to support. Platforms utilising the Android
component will have full control over their build environment and can
ensure that they provide a more recent version of meson.
Reduce the supported meson version for the project to 0.53 to facilitate
building on more distributions without having to manually update the
meson package.
Meson will output a warning that features not available in 0.53 are used
if the Android HAL is enabled. This is considered as an acceptable
middleground to improve the experience on the latest Ubuntu LTS, until
22.04 LTS is released and provides a newer meson version.
Signed-off-by: Christian Rauch <Rauch.Christian@gmx.de>
[Kieran: Add comment about the android meson requirements]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Clang compiler is able to do a thread safety analysis with
annotations [1]. This introduces the thread safety annotation
macros and also enable the analysis by adding -Wthread-safety
if a clang compiler is used.
[1] https://clang.llvm.org/docs/ThreadSafetyAnalysis.html.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The meson option summary currently does not report if the support
for tracing is enabled or not. Add it.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
When distributions build and package libcamera libraries, they may not
necessarily run the build in the upstream source tree. In these cases, the git
SHA1 versioning information will be lost.
This change addresses that problem by requiring package managers to run
'meson dist' to create a tarball of the source files and build from there.
On runing 'meson dist', the utils/run-dist.sh script will create a
.tarball-version file in the release tarball with the version string generated
from the existing utils/gen-version.sh script.
The utils/gen-version.sh script has been updated to check for the presence of
this .tarball-version file and read the version string from it instead of
creating one.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The gen-version.sh script expects to be called from a git repo, and sets its
src_root variable accordingly. This may not always be the case if it is built
from a tarball source - full support for which is in a future commit.
The MESON_SOURCE_ROOT environnement variable does not get set when called from
the meson vcs_tag() function, but does when called from the run_command()
function, so that cannot be used either.
Instead, explicitly pass the meson source root to the gen-version.sh script.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Create a new class to abstract generation and access to call stack
backtraces. The current implementation depends on the glibc backtrace()
implementation and is copied from the logger. Future development will
bring support for libunwind, transparently for the users of the class.
The logger backtrace implementation is dropped, replaced by usage of the
new Backtrace class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
In preparation for using the AGC through the new algorithm interfaces,
convert the existing code to use the new function types.
Now that the process call is rewritten, re-enable the compiler flag to
warn when a function declaration hides virtual functions from a base class
(-Woverloaded-virtual).
We never use converged_ so remove its declaration. The controls may not
need to be updated at each call, but it should be decided on the context
side and not by a specific call by using a lock status in the Agc
structure for instance.
As the params_ local variable is not useful anymore, remove it here
too.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Introduce three functions in the Algorithm class to manage algorithms:
- configure which is called when IPA is configured only
- prepare called on EventFillParams event at each frame when the request
is queued
- process called on EventStatReady event at each frame completion when
the statistics have been generated.
The existing AGC implementation already has a function named process(),
though it has different arguments. Adding the new virtual process()
interface causes a compiler warning due to the AGC implementation
overloading a virtual function, even though the overload can be resolved
correctly.
Temporarily disable the warning in this commit to maintain bisection
until the AGC is converted to the new interface.
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
__builtin_FILE and __builtin_LINE are first defined in clang 9. With
clang of any version less than that we have the following compilation
errors:
../../include/libcamera/base/log.h:94:27: error: use of undeclared identifier '__builtin_FILE'
const char *fileName = __builtin_FILE(),
^
../../include/libcamera/base/log.h:95:24: error: use of undeclared identifier '__builtin_LINE'
unsigned int line = __builtin_LINE()) const;
^
../../include/libcamera/base/log.h:99:26: error: use of undeclared identifier '__builtin_FILE'
const char *fileName = __builtin_FILE(),
^
../../include/libcamera/base/log.h:100:23: error: use of undeclared identifier '__builtin_LINE'
unsigned int line = __builtin_LINE());
Enforce clang version of at least 9 in the main meson file.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The pkg-config file for the main libcamera.so is generated
at the top level meson.build.
Move this to the actual core libcamera build structure to be
consistent and keep it next to the library construction.
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Android provides neither secure_getenv() nor issetugid(). Enable
compilation on that platform by using a plain getenv(), as that seems to
be the best we can do.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Boolean options in the summary are printed as 'True' or 'False' by
default. Enable the bool_yn option, which prints them as 'YES' or 'NO',
in green and red respectively. This makes the summary more readable.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
|
|
On gcc versions older than 9, the file system library, used by the
Android camera HAL configuration file parser, is implemented in a
separate static library. Furthermore, on gcc 7, it's provided in the
std::experimental namespace. This breaks compilation of the HAL on gcc
7, and linking on gcc 8.
Fix the compilation issue by conditionally including
<experimental/filesystem> and creating a namespace alias in std, and the
link issue by linking to libstdc++fs on gcc versions older than 9.
The inclusion of <experimental/filesystem> is a bit of a hack, and when
we'll start using the file system library in another compilation unit,
we should then move all this to an internal helper to abstract the
compiler version.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
There can be multiple IPAs per pipeline-handler or platform.
They can live in-tree or externally linked. It is up to the vendor
whether to use in-tree IPA for a platform or provide it externally.
In the case of IPAs being external, building in-tree IPAs might be
futile hence, provide a clear and explicit mechanism to choose whether
to build the in-tree IPA for the platform or not.
By default, all in-tree IPAs are built when a matching Pipeline handler
is also enabled.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Since meson v0.49.0, join_paths() is equivalent to '/' hence,
drop and replace it with '/' short-hand in meson files.
This commit does not introduce any functional changes.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a compliance tool to ease testing of cameras. In contrast to the
unit-tests under test/ that aims to test the internal components of
libcamera the compliance tool aims to test application use-cases and to
some extent the public API.
This change adds the boilerplate code of a simple framework for the
creation of tests. The tests aim both to demonstrate the tool and to
catch real problems. The tests added are:
- Test that if one queues exactly N requests to a camera exactly N
requests are eventually completed.
- Test that a configured camera can be started and stopped multiple
times in an attempt to exercise cleanup code paths otherwise not
often tested with 'cam' for example.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
|
|
Add the application and adaptation layers being built to the meson
summary. The summary now prints
libcamera 0.0.0
Configuration
Enabled pipelines: ipu3
raspberrypi
rkisp1
simple
uvcvideo
vimc
Android support: True
GStreamer support: True
V4L2 emulation support: True
cam application: True
qcam application: True
Unit tests: True
Subprojects
libyuv: YES
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
|
|
The addition of the new IPA IPC mechanism compiles pipeline-specific
headers to define the interface between the pipeline and the IPA.
This was optimised in 08ce394465b5 ("meson: ipa, proxy: Only build
proxies for enabled pipelines") to only build for enabled pipelines,
however the tests directly use the VIMC pipeline handler, and require
it to be built.
Create a local variable to store the requested pipelines from the user
configuration and extend the enabled pipelines to ensure that VIMC is
always enabled if the tests are also enabled
Fixes: 08ce394465b5 ("meson: ipa, proxy: Only build proxies for enabled pipelines")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Tested-by: Sebastian Fricke<sebastian.fricke@posteo.net>
|
|
Android HAL adaptation layer may need image processing, for
example, scaling and format conversion. Libyuv is a general image
processing. This adds libyuv to subprojects, so that it is forked
locally and can be used with Android HAL implementation code.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Now that Debian backports have been updated to meson v0.56, all major
distributions provide meson >= v0.53 in their latest LTS version. We can
replace the manual message()-based configuration summary with the
summary() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Utilise the subdir_done() functionality as is used with other optional
components to simplify the top level meson file.
Suggested-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Implement tracing infrastructure in libcamera. It takes .tp files, as
required by lttng, and generates a tracepoint header and C file, as lttng
requires. meson is updated accordingly to get it to compile with the
rest of libcamera. Update the documentation accordingly.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Shadowing variables can lead to unexpected bugs where a code path
utilises a variable that may not have been intended by the developer,
leading to hard to find bugs.
Enable warnings for shadowed variables as defined at:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wshadow
As an effect of utilising -Werror, this will cause variable or type
shadowing to become a build-time error.
Suggested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The option, -Wextra-semi, helps developers to find unnecessary
semicolons. This option is available with clang.
Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
I get the warnings related to psabi with:
gcc 9.3.0 "arm-buildroot-linux-gnueabihf-g++.br_real (Buildroot 2020.08-24-gc5c5f1fa46) 9.3.0"
Remove the check for gcc-9, so that -Wno-psabi is used on all gcc
versions over 7.1.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@iki.fi>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
With this change, meson will complain specifically about missing
python3 and missing python3-yaml. As specified by meson
documentation: https://mesonbuild.com/Python-module.html,
this change requires meson v0.51.
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|