summaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)Author
2024-09-24libcamera v0.3.2v0.3.2Kieran Bingham
abi-compliance-checker reports 100% binary and source compatibility, so this release does not change the SONAME. Binary compatibility: 100% Source compatibility: 100% Total binary compatibility problems: 0, warnings: 0 Total source compatibility problems: 0, warnings: 0 bugs: The following commits in this release relate to either a bug fix or improvement to existing commit. - meson: Enable simple pipeline handler on all platforms by default - Fixes: 06e0d8508e5c ("libcamera: pipeline: simple: Enable intel-ipu6 with Soft ISP") - libcamera: udev: Catch udev notification errors - Bug: https://bugs.libcamera.org/show_bug.cgi?id=230 - libcamera: Drop remaining file names from header comment blocks - Fixes: 829acb3ab0b1 ("libcamera: Drop file name from header comment blocks in templates") - Documentation: Fix link to introduction on mainpage.dox - Fixes: 860a3e30319c ("Documentation: Rework docs.rst into introduction.rst") - Documentation: Fix links from API references to guides - Fixes: e93886178106 ("Documentation: Improve doxygen main page") - pipeline: uvcvideo: Implement acquireDevice() + releaseDevice() - Bug: https://bugs.libcamera.org/show_bug.cgi?id=168 And the following updates have been made in this release, grouped by category: core: - libcamera: Avoid variable-length arrays - meson: Enable simple pipeline handler on all platforms by default - libcamera: base: Add MemFd helper class - libcamera: base: memfd: Handle uClibc compatibility with function wrapper - libcamera: shared_mem_object: Prevent memfd from shrinking or growing - libcamera: simple: Log a missing sensor in a better way - libcamera: ipa_proxy: Unify configurationFile argument name - libcamera: ipa_proxy: Report a missing configuration as a warning - libcamera: Remove spaces at end of lines - meson: Drop gcc 8 support - utils: checkstyle.py: Warn when no valid Signed-off-by line is found - libcamera: Drop path prefix from Doxygen file directive - libcamera: Make all internal headers visible to Doxygen - libcamera: Unify Doxygen file directive prefix for formats.h - libcamera: Mark internal parts of public classes with \internal - libcamera: Hide *::Private classes with __DOXYGEN_PUBLIC__ - libcamera: Split public and internal source arrays - libcamera: Add version.h to public headers - libcamera: Drop libcamera_generated_ipa_headers from sources - libcamera: Move IPA headers to the libcamera_private dependency - libcamera: Consolidate all IPA headers in libcamera_ipa_headers - libcamera: Add missing headers to libcamera_internal_headers - libcamera: Consolidate tracepoint header in libcamera_internal_headers - libcamera: Don't add libcamera_public_headers to libcamera_public_sources - utils: checkstyle.py: Add author property to Commit class - utils: checkstyle.py: Validate SoB trailer against author - utils: checkstyle.py: Fix trailer parsing for commits with changelogs - libcamera: ipa_manager: Remove singleton requirement - libcamera: udev: Catch udev notification errors - libcamera: Add missing <stdint.h> include to base/file.h - libcamera: Add missing <stdint.h> include to internal/yaml_parser.h - libcamera: Fix header grouping - libcamera: formats: Adding Support for Y12P - utils: checkstyle.py: Rework commit message parsing - utils: checkstyle.py: Skip title and trailers checkers for pre-commit - utils: checkstyle.py: Add __repr__ method to Commit class - libcamera: simple: Fix a typo in a doc string - libcamera: camera: Hide Camera::create() from the public API - meson: Store controls and properties YAML files in variables - meson: Fix mismatch in controls and properties generated file names - libcamera: Drop remaining file names from header comment blocks - meson: Move all code generation scripts to utils/codegen/ - meson: utils: Provide environment for Python scripts - utils: codegen: gen-header.sh: Generate libcamera.h based on meson.build - utils: codegen: gen-controls.py: Convert to jinja2 templates - utils: codegen: gen-controls.py: Move helper classes to separate file - libcamera: controls: Improve formatting of control descriptions in YAML - libcamera: pipeline_handler: Fix unlocking media devices too early - libcamera: pipeline_handler: Call releaseDevice() before unlocking media devices - libcamera: controls: Fix example for ExposureValue - utils: update-kernel-headers: Support relative path to kernel git tree - include: linux: Update headers for rkisp1 extensible parameters - libcamera: camera: Use invokeMethod() for pipe_->acquire() and pipe_->release() - libcamera: uvcvideo: Fix includes - libcamera: v4l2: Remove unused includes - libcamera: v4l2: Fix an include placement - libcamera: v4l2: Fix indirect include - libcamera: libcamera: Remove unused includes - libcamera: libcamera: Add missing includes - libcamera: libcamera: Formatting improvements - libcamera: includes: Add missing includes - libcamera: includes: Remove unused includes - libcamera: includes: Formatting improvements - utils: checkstyle: Add a python formatter - utils: checkstyle: Remove style checker for python pep8 - libcamera: utils: Add ScopeExitActions class - libcamera: v4l2_videodevice: Improve readability - libcamera: media_object: Add MediaPad string representations - libcamera: media_object: Add MediaLink string representations - libcamera: media_device: Use MediaLink string helper - libcamera: yaml-parser: Add additional tests - libcamera: yaml-parser: Add failing test for unexpected behavior - libcamera: yaml-parser: Differentiate between empty and empty string - Document additional environmental variables pipeline: - libcamera: software_isp: Remove file seal TODO item - libcamera: software_isp: Replace malloc() with std::vector<> - pipeline: rkisp1: Use the extensible parameters format - pipeline_handler: Add acquireDevice() function to mirror releaseDevice() - pipeline: uvcvideo: Implement acquireDevice() + releaseDevice() - libcamera: ipu3: Remove unused includes - libcamera: ipu3: Replace wrong include - libcamera: ipu3: Formatting improvements - libcamera: rkisp1: Remove unused includes - libcamera: rkisp1: Formatting improvements - pipeline: rkisp1: Use ScopeExitActions to simplify error handling in start - libcamera: pipeline: simple: Fix typos in match routing comment - pipeline: simple: Remove media member variable - libcamera: pipeline: simple: Use MediaLink string helper - libcamera: debayer_cpu: Sync DMABUFs ipa: - ipa: libipa: camera_sensor_helper: Reference blackLevel() in documentation - ipa: libipa: Add missing CameraSensorHelper fn label in docs - ipa: rkisp1: Pass parameters buffer format to IPA module - ipa: rkisp1: Pass parameters buffer size to pipeline handler - ipa: rkisp1: Add ISP parameters abstraction class - ipa: rkisp1: Use the new ISP parameters abstraction - ipa: rkisp1: params: Add companding blocks - ipa: rkisp1: Add compand feature flag to ipa context - ipa: rkisp1: blc: Add support for BLS in compand - libcamera: libipa: Remove unused includes - libcamera: ipa: Remove unused includes - utils: ipc: Include <string> in generated headers where needed - libcamera: ipa: Drop unneded includes from ipa_interface.h - ipa: rpi: agc: Ignore stable region when exposure/gain set manually - ipa: rpi: Adding IMX283 support - libcamera: libipa: camera_sensor: Add IMX283 black level - ipa: libipa: Add generic Interpolator class - ipa: rkisp1: Use generic Interpolator class - ipa: rkisp1: Remove MatrixInterpolator - ipa: rkisp1: Use interpolator in lsc - ipa: rkisp1: Move loader functions into helper class - ipa: libipa: Add lsc polynomial class - ipa: rkisp1: Add sensor info to context - ipa: rkisp1: Add polynomial LSC loader - libcamera: libipa: camera_sensor: Add Sony IMX214 sensor properties apps: - gstreamer: Fix width and height range handling - apps: qcam: Disable -Wextra-semi - gstreamer: Fix missing "greater than" symbol in author string - py: cam: Convert to PyQt6 - py: gen-py-controls: Use Control class - py: gen-py-controls: Convert to jinja2 templates - v4l2: Support setting frame rate in the V4L2 Adaptation layer - qcam: Decrease minimum width of selector dialog - qcam: Drop Qt version checks - qcam: viewfinder_qt: Draw the letterbox background black - qcam: viewfinder_gl: Fix binding of vertex buffer and shader program - qcam: viewfinder_gl: Drop duplicate glClearColor() - qcam: viewfinder_gl: Render image centered in letterbox documentation: - Documentation: Add Thread safety page - Documentation: Split doxygen_input in public and internal inputs - Documentation: Split public/private documentation - Documentation: Improve doxygen main page - Documentation: Add documentation-contents.rst - Documentation: Alphabetise the Documentation toctree - Documentation: Synchronise camera stack details - Documentation: Breakout docs.rst - Documentation: Remove libcamera architecture from introduction.rst - Documentation: Rework docs.rst into introduction.rst - Documentation: Rework index.rst - Documentation: Add internal-api-html placeholder - Documentation: Reformat documentation_contents.rst - Documentation: Rename "API" section to "API Reference" - Documentation: Drop local table of contents from introduction - Documentation: Rename "Documentation" section to "Introduction" - Documentation: Fix link to introduction on mainpage.dox - Documentation: Fix links from API references to guides tuning: - utils: tuning: rkisp1: Clean up tuner construction - utils: tuning: Change Tuner.add() to accept a list of modules test: - tests: Add a missing iostream include - test: ipa: libipa: Add tets for Interpolator Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-08-15meson: Store controls and properties YAML files in variablesLaurent Pinchart
When generating control headers, the YAML files to be used are determined dynamically based on the selected pipeline handlers. As part of this process, the build system populates an array of meson File objects used as an input for the control headers generation custom target, as well as an array of file names (as strings). The file names array is later used to generate the control source files for the libcamera core, as well as the source code for controls support in the Python bindings. Both of the source code generators manually turn the array of file names into File objects. This duplicates code and reduces readability. A third similar implementation has also been proposed to generate control support sources in the GStreamer element, making the issue worse. To simplify this, store File objects instead of file names in the controls_files array. As the meson configuration summary doesn't support File objects, create a separate controls_files_names to store the file names for that sole purpose. The exact same process occurs for properties, address them the same way. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
2024-08-05meson: Drop gcc 8 supportLaurent Pinchart
The libcamera CI has retired gcc 8 testing with the end of life of Debian Buster at the end of June 2024. As gcc 8 isn't tested anymore, we can't guarantee it will keep building libcamera correctly. Drop its support. If anyone still has a compelling use case for gcc 8 support for libcamera, we will investigate how to restore it in CI. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-07-31meson: Enable simple pipeline handler on all platforms by defaultLaurent Pinchart
The simple pipeline handler is enabled by default on arm platforms only, as it used to support arm SoCs only. Now that support for the IPU6 has been added to the pipeline handler, it should be enabled on x86 platforms as well. Fix it. Fixes: 06e0d8508e5c ("libcamera: pipeline: simple: Enable intel-ipu6 with Soft ISP") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2024-07-25libcamera v0.3.1v0.3.1Kieran Bingham
The abi-compliance checker reports 100% binary and source compatibility, so this release does not change the SONAME. Binary compatibility: 100% Source compatibility: 100% Total binary compatibility problems: 0, warnings: 0 Total source compatibility problems: 0, warnings: 0 The following commits in this release relate to either a bug fix or improvement to existing commit. - ipa: rpi: Make monoSensor() accessor const - Fixes: 2031e2f29014 ("ipa: rpi: Add accessor function for monoSensor_") - libcamera: dma_buf_allocator: Create memfd with CLOEXEC - Fixes: ea4baaacc325 ("libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf") - libcamera: dma_buf_allocator: Work around lack of memfd_create() in uClibc - Fixes: ea4baaacc325 ("libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf") - libcamera: dma_buf_allocator: Work around lack of file seals in uClibc - Fixes: ea4baaacc325 ("libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf") - test: ipa: rkisp1: utils: Fix floating and fixed point conversion test - Fixes: 9d152e9c66c1 ("ipa: rkisp1: Add a helper to convert floating-point to fixed-point") - ipa: rkisp1: Fix algorithm controls vanish after configure - Fixes: 4c5152843a2a ("ipa: rkisp1: Derive rkisp1::algorithms::Agc from AgcMeanLuminance") - pipeline: rpi: Don't validate configuration in generateConfiguration() - Bug: https://github.com/raspberrypi/libcamera/issues/138 - ipa: rkisp1: agc: Fix initialization without metering modes - Fixes: 35233938ee5d ("ipa: rkisp1: agc: Read histogram weights from tuning file") - v4l2: v4l2_compat: Fix redirect from `__open(at)64_2()` - Fixes: 1023107b6405 ("v4l2: v4l2_compat: Intercept open64, openat64, and mmap64") - ipa: rkisp1: blc: Drop [[maybe_unused]] attribute - Fixes: 50c28e135100 ("ipa: rkisp1: blc: Query black levels from camera sensor helper") - ipa: rkisp1: ccm: Fix ccm metadata output - Fixes: cbfdfa42cacc ("ipa: rkisp1: algorithms: Add crosstalk algorithm") - gstreamer: pool: Replace GstAtomicQueue with deque and mutex - Bug: https://bugs.libcamera.org/show_bug.cgi?id=201 - gstreamer: allocator: Ensure camera manager stay alive - Bug: https://bugs.libcamera.org/show_bug.cgi?id=211 And the following updates have been made in this release, grouped by category: core: - treewide: Query list of cameras just once - libcamera: yaml_parser: Avoid double lookup in `operator[]` - utils: checkstyle.py: Refactor IncludeChecker - utils: checkstyle.py: Extend IncludeChecker to cover math.h - utils: checkstyle.py: Add a check for hex values - utils: checkstyle.py: Show location of coding style issue within line - update-kernel-headers: Add linux/udmabuf.h to headers to sync - include: linux: Update kernel headers to version v6.10-rc1 - libcamera: v4l2_subdevice: Update to the new kernel routing API - libcamera: Rename DmaHeap class to DmaBufAllocator - libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf - libcamera: dma_buf_allocator: Create memfd with CLOEXEC - libcamera: dma_buf_allocator: Work around lack of memfd_create() in uClibc - libcamera: dma_buf_allocator: Work around lack of file seals in uClibc - libcamera: Add gamma control id - clang-format: Make Qt includes matching case sensitive - meson: Group libipa and libipa_includes in a dependency object - libcamera: controls: Add missing period at end of Gamma description - libcamera: yaml_parser: Make default value templated in `get()` - libcamera: yaml_parser: Drop std::enable_if_t guards for get() function - libcamera: yaml_parser: Delegate YamlObject::get() to helper structure - libcamera: yaml_parser: Add support for float types - libcamera: base: log: Declare log categories when defining them - meson: Enable warnings to flag missing declarations - libcamera: Fix maybe-uninitialized error - converter: converter_v4l2_m2m: Rectify streams sanity check - converter: converter_v4l2_m2m: Rename private Stream class - libcamera: converter: Replace usage of stream index by Stream pointer - libcamera: base: utils: Implement hex() for 8-bit and 16-bit values - libcamera: v4l2_videodevice: Use bufferType_ in [get|try|set]Format() - utils: gen-version: Use posix compliant date ----------------------------------------------------------------------------- ipa: - ipa: rpi: Make monoSensor() accessor const - ipa: rkisp1: Add a helper to convert floating-point to fixed-point - ipa: rpi: Disable StatsOutputEnable control by default - ipa: rkisp1: Fix algorithm controls vanish after configure - ipa: rkisp1: Add GammaOutCorrection algorithm - ipa: libipa: Add Vector class - ipa: libipa: Copy pwl from rpi, and clean it up to match libcamera - ipa: rpi: controller: Use libipa's Pwl class - ipa: rkisp1: goc: Fix typographical issues in documentation. - ipa: rkisp1: goc: Drop incorrect [[maybe_unused]] - ipa: rkisp1: goc: Use copydoc - ipa: rkisp1: goc: Mark default gamma table as static constexpr - ipa: rkisp1: goc: Avoid use of auto for short type - libcamera: libipa: camera_sensor: Define AR0521 helper functions inline - ipa: rkisp1: cproc: Use anonymous namespace to limit symbol visibility - ipa: rkisp1: cproc: Merge identical functions - ipa: rkisp1: cproc: Drop incorrect [[maybe_unused]] - ipa: rkisp1: agc: Read histogram weights from tuning file - ipa: rkisp1: agc: Plumb mode-selection and frame duration controls - ipa: libipa: vector: Specialize YamlObject getter - ipa: libipa: vector: Drop readYaml() function - ipa: libipa: pwl: Suffix \param with direction - ipa: libipa: pwl: Make the empty() function inline - ipa: libipa: pwl: Add a size() function - ipa: libipa: pwl: Add a constructor that moves a Point vector - ipa: libipa: pwl: Specialize YamlObject getter - ipa: libipa: Add Matrix class - ipa: libipa: Add MatrixInterpolator class - ipa: rkisp1: algorithms: Add crosstalk algorithm - ipa: libipa: vector: Add matrix-vector multiplication - ipa: rkisp1: agc: Fix initialization without metering modes - ipa: libipa: agc_mean_luminance: Fix enumerator names - ipa: libipa: agc_mean_luminance: Include missing header - ipa: rkisp1: Document all AGC parameters in IPAActiveState - ipa: rkisp1: Document all AGC parameters in IPAFrameContext - ipa: rkisp1: agc: Make size argument to computeHistogramPredivider const - ipa: rkisp1: agc: Don't update histogram parameters unnecessarily - ipa: rkisp1: agc: Simplify predivider calculation - ipa: rkisp1: agc: Use mode from frame context to calculate new EV - ipa: rkisp1: agc: Rename maxShutterSpeed to maxFrameDuration - ipa: rkisp1: agc: Correctly clamp maximum shutter speed - ipa: rkisp1: agc: Move AeEnable control to the AGC algorithm - ipa: rpi: controller: Replace Pwl::readYaml() with YamlObject::get() - ipa: libipa: pwl: Drop readYaml() function - ipa: rkisp1: agc: Rename frame context update variable to updateMetering - ipa: libipa: matrix: Fix incorrect symbol namespace - ipa: ipa_interface: Declare ipaCreate() in libcamera namespace - ipa: rpi: Define local functions in anonymous namespace - ipa: libipa: Add black levels to camera sensor helper - ipa: rkisp1: Move camHelper into IPAContext - ipa: rkisp1: blc: Query black levels from camera sensor helper - ipa: rkisp1: blc: Report sensor black levels in metadata - ipa: rkisp1: data: Update tuning files for imx219 and imx258 - ipa: rkisp1: Move ov4689 and ov5640 black levels into sensor helpers - ipa: rkisp1: blc: Drop [[maybe_unused]] attribute - ipa: rkisp1: Install all tuning files - libipa: camera_sensor_helper: Add OV5675 black level - ipa: rkisp1: awb: Clamp gains to machine limits - ipa: rkisp1: awb: Unconditionally fill metadata - ipa: rkisp1: ccm: Fix ccm metadata output - ipa: rkisp1: ccm: Ensure metadata contains valid ccm - libcamera: libipa: camera_sensor: Add onsemi AR0144 sensor properties - ipa rkisp1: Remove temperatureK from FrameContext ----------------------------------------------------------------------------- apps: - android: camera_capabilities: Fix GCC 14 warning - v4l2: v4l2_compat: Fix redirect from `__open(at)64_2()` - v4l2: v4l2_compat: Move `open*()` flag check into function - py: libcamera: Move function declarations to common header - v4l2: v4l2_compat: Include missing headers - v4l2: v4l2_compat: Selectively disable -Wmissing-declarations - apps: Define local functions in anonymous namespace - apps: common: dng_writer: Workaround for "Unknown tag 33421" error - apps: common: dng_writer: Support RAW16 formats - apps: common: dng_writer: Rename packing functions - apps: common: dng_writer: Add thumbnail scanline function for Raw - apps: common: dng_writer: Support RAW10 and RAW12 format - apps: common: dng_writer: Fix thumbnail generation on BE machines - apps: common: dng_writer: Fix RAW10 and RAW12 packing on BE machines - qcam: viewfinder_qt: Maintain aspect ratio - apps: qcam: Port to Qt 6 - gstreamer: pool: Replace GstAtomicQueue with deque and mutex - gstreamer: allocator: Ensure camera manager stay alive - v4l2: v4l2_compat: Fix ioctl() prototype with musl C library - gst: Add child proxy support to libcamerasrc - gst: Document libcamerasrc multi stream usage ----------------------------------------------------------------------------- test: - test: ipa: rkisp1-utils: Fix capitalization of hex numbers - test: camera: Increase timeout for vimc capture tests - test: fence: Turn class member variable into local variable - test: fence: Fix race condition - test: fence: Increase timeout for fence test - test: v4l2_videodevice: Increase timeout for vimc capture tests - test: ipa: rkisp1-utils: Fix coding style for template arguments - test: ipa: rkisp1: utils: Fix floating and fixed point conversion test - test: ipc: unixsocket: Define local function in anonymous namespace - test: gstreamer: Include missing sanitizer/asan_interface.h header - test: utils: Extend utils::hex() test to 8-bit and 16-bit values - test: gstreamer: Test memory lifetime ----------------------------------------------------------------------------- pipeline: - libcamera: software_isp: Use a specific integer type for black level - libcamera: software_isp: Honor black level in AWB - libcamera: software_isp: Move color mappings out of debayering - libcamera: software_isp: Remove DebayerParams::kGain10 - libcamera: software_isp: Remove TODO about internal representation - pipeline: vimc: Don't hardcode scaling factor with recent kernels - libcamera: software_isp: Allow using dma-buffers from /dev/udmabuf - libcamera: software_isp: Fix includes ordering in simple.cpp - pipeline: rkisp1: cproc: Fix default value handling - pipeline: rpi: Don't validate configuration in generateConfiguration() - libcamera: debayer_cpu: Add 32bits/aligned output formats - libcamera: software_isp: Drop unnecessary sanity check - libcamera: pipeline: simple: Enable intel-ipu6 with Soft ISP - libcamera: pipeline: simple: Enable Soft ISP for TI CSI-RX ----------------------------------------------------------------------------- tuning: - utils: raspberrypi: ctt: Adapt tuning tool for both VC4 and PiSP - utils: raspberrypi: ctt: Added CAC support to the CTT - utils: raspberrypi: ctt: Changed CTT handling of VC4 and PiSP - utils: raspberrypi: ctt: Update tuning tool for HDR - utils: raspberrypi: ctt: Add option to convert between vc4/pisp targets - utils: raspberrypi: ctt: Add a maximum gain parameter for LSC - utils: libtuning: modules: Add skeletal AGC module - utils: tuning: rkisp1: Add skeletal AGC to the rkisp1 tuning script - utils: libtuning: Correct GBRG Image parsing - libtuning: Backport improvements in MacBeth search reliability - libtuning: Fix reference image - libtuning: Copy files from raspberrypi - libtuning: Copy visualize_macbeth_chart from raspberry pi - utils: tuning: Add requirements file and update readme - libtuning: Fix imports - libtuning: Migrate prints to python logging framework - libtuning: Fix visualize_macbeth_chart() - libtuning: Improve filename parsing - libtuning: Implement a minimal yaml parser - libtuning: Reactivate macbeth locator - libtuning: Be a bit more verbose - libtuning: lsc: rkisp1: Clip lsc values to valid range - libtuning: Use the color member of the Image class - libtuning: Remove need for Cam object from ccm - libtuning: modules: Add initial CCM module - libtuning: Handle cases, where no lsc tuning images are present - libtuning: Only warn if processing returns None - libtuning: Add static module - tuning: rkisp1: Add some static modules - libtuning: lsc: rkisp1: Do not calculate ratios to green - libtuning: lsc: Prevent negative values - libtuning: agc: rkisp1: Increase y-target Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-07-25v4l2: v4l2_compat: Fix ioctl() prototype with musl C libraryLaurent Pinchart
The musl C library, as well as the POSIX standard, define the ioctl() function's request argument as an int. glibc and uclibc, on the other hand, define it as an unsigned long. This difference between the function prototype and the implementation in the V4L2 adaptation layer causes a compilation error with musl. Fix it by detecting the function prototype and declaring the libcamera ioctl() handler accordingly. 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> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-07-24apps: qcam: Port to Qt 6Neal Gompa
Open source Qt 5 has been effectively end of life since the release of Qt 6, and Qt 6 has current LTS releases now. This change ports qcam to Qt 6.2 and drops some of the baggage related to Qt 5 that is no longer applicable. Signed-off-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Eric Curtin <ecurtin@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-26meson: Enable warnings to flag missing declarationsLaurent Pinchart
A recently introduced typo resulted in a function definition not matching its declaration. As the problem occurred in libipa, and IPA modules are loaded dynamically and are linked with lazy symbol resolution, the problem wasn't caught at build time. To try and catch future similar issues, enable the -Wmissing-declarations warning. Suggested-by: Barnabás Pőcze <pobrn@protonmail.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-06-05libcamera: dma_buf_allocator: Work around lack of file seals in uClibcLaurent Pinchart
uClibc doesn't provide the macros defining parameters for the file sealing API. Define them manually as a work around. Fixes: ea4baaacc325 ("libcamera: DmaBufAllocator: Support allocating from /dev/udmabuf") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2024-05-19libcamera v0.3.0v0.3.0Kieran Bingham
abi-compliance checker reports 99.7% binary compatibility and 99.9% source compatibility between v0.2.0 and v0.3.0. The SONAME has been updated accordingly and applications must be relinked against this version of libcamera. Total binary compatibility problems: 2, warnings: 0 Total source compatibility problems: 2, warnings: 0 Specifically, the symbol - ControlList::merge(struct ControlList const& source ) has been replaced with the new symbol: - ControlList::merge ( struct ControlList const& source, enum ControlList::MergePolicy policy ) The following commits in this release relate to either a bug fix or improvement to existing commit. - utils: ipc: extract-docs: Fix escape characters in regex - Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca> - libcamera: Remove empty formats.c - Fixes: e0a51061bc69 ("libcamera: formats: Add 14-bits Bayer RAW formats") - libcamera: bayer_format: Add Y12 to bayerToFormat - Fixes: ec6309571654 ("libcamera: bayer_format: Add unpacked mono 12-bit format to the conversion table") - apps: common: dng_writer: Add a default case for switch-case on a modulo - Bug: https://bugs.libcamera.org/show_bug.cgi?id=207 - utils: mojom: Fix build error caused by the mojom tool update - Fixes: d17de86904f0 ("utils: ipc: Update mojo") - libcamera: formats: Fix planes bounds check - Fixes: e83727a194b5 ("libcamera: PixelFormatInfo: Add functions stride and frameSize") - utils: ipu3: Fix return value check on file output - Fixes: 23ac77dc4a09 ("utils: ipu3: Add IPU3 raw capture unpack utility") - ipa: libipa: histogram: Fix documentation of constructor - Fixes: 1dc01bc9e6c3 ("ipa: libipa: histogram: Add transform parameter to constructor") - gstreamer: Fix string memory leak - Fixes: fc9783acc6083a ("gstreamer: Provide colorimetry <> ColorSpace mappings") - gstreamer: Use copied camera name - Fixes: 58feb69f852289 ("gst: libcamerasrc: Implement selection and acquisition") core: - include: linux: Update kernel headers to version v6.7 - libcamera: v4l2_subdevice: Enable streams API when supported - libcamera: base: signal: Update Qt documentation link to Qt 6 - Documentation: Update Qt documentation links to Qt 6 - test: gstreamer: Use env instead of registry edit - libcamera: Remove empty formats.c - libcamera: formats: Add 16-bit mono format - libcamera: formats: Fix sort ordering of R10_CSI2P - libcamera: bayer_format: Add Y12 to bayerToFormat - libcamera: v4l2_subdevice: Explain sort order of formatInfoMap - libcamera: object: Fix thread-bound reference in documentation - libcamera: signal: Replace object.h inclusion with forward declatation - test: object-delete: Test deferred delete just before thread stops - libcamera: thread: Ensure deferred deletion of all objects before stopping - test: event-thread: Destroy Object from correct thread context - test: message: Remove incorrect slow receiver test - test: message: Destroy Object from correct thread context - test: signal-threads: Destroy Object from correct thread context - test: timer-thread: Move timer start from wrong thread to separate test - test: timer-thread: Destroy Object from correct thread context - libcamera: object: Document and ensure Object deletion constraints - libcamera: object: Add and use thread-bound assertion - utils: mojom: Fix build error caused by the mojom tool update - include: linux: Add RKISP1_V_IMX8MP version - libcamera: utils: Add to_underlying() helper function - libcamera: Use utils::to_underlying() - libcamera: formats: Fix typos in PixelFormatInfo documentation - utils: checkstyle.py: Don't presume python3 location - utils: checkstyle.py: Update LogCategoryChecker regexp - utils: rkisp1: gen-csc-table.py: Don't presume python3 location - libcamera: formats: Fix planes bounds check - utils: ipu3: Fix return value check on file output - README.rst: Report py dependencies - meson_options: Autodetect pycamera support - libcamera: controls: Fix typo on thermal - guides: pipeline-handler: Fix controlInfo_ initialization - libcamera: v4l2_subdevice: Add 14-bit Bayer formats - utils: checkstyle.py: Add Co-developed-by to known_trailers - utils: checkstyle.py: Fix known_trailers sort order - libcamera: framebuffer_allocator: Move from argument in constructor - libcamera: framebuffer_allocator: Use default destructor - libcamera: framebuffer_allocator: Remove entry if allocation fails - libcamera: controls: Add policy parameter to ControlList::merge() - libcamera: v4l2_subdevice: Rename V4L2SubdeviceFormatInfo - libcamera: v4l2_subdevice: Add code member to MediaBusFormatInfo - libcamera: v4l2_subdevice: Expose media bus format info as internal API - libcamera: v4l2_subdevice: Extend MediaBusFormatInfo with metadata formats - libcamera: v4l2_subdevice: Drop V4L2SubdeviceFormat::bitsPerPixel() - libcamera: v4l2_subdevice: Rename V4L2SubdeviceFormat::mbus_code to code - libcamera: v4l2_subdevice: Add stream support to get/set functions - libcamera: v4l2_subdevice: Replace Routing::toString() with operator<<() - libcamera: v4l2_subdevice: Add V4L2Subdevice::Route structure - libcamera: camera_sensor: Move related classes to subdirectory - libcamera: camera_sensor: Drop updateControlInfo() function - libcamera: camera_sensor: Reorder functions - libcamera: camera_sensor: Test for read-only HBLANK with READ_ONLY flag - libcamera: camera_sensor: Expose the Bayer order - checkstyle: Work around bug in difflib - utils: tuning: readme: Improve names of dependency packages - libcamera: internal: Move dma_heaps.[h, cpp] to common directories - libcamera: dma_heaps: extend DmaHeap class to support system heap - libcamera: internal: Move SharedMemObject class to a common directory - libcamera: shared_mem_object: Rename SIZE constant to `size' - libcamera: shared_mem_object: Reorganize the code and document the SharedMemObject class - libcamera: software_isp: Add SwStatsCpu class - libcamera: software_isp: Add Debayer base class - libcamera: software_isp: Add DebayerCpu class - libcamera: Introduce SoftwareIsp - libcamera: swstats_cpu: Add support for 8, 10 and 12 bpp unpacked bayer input - libcamera: debayer_cpu: Add support for 8, 10 and 12 bpp unpacked bayer input - libcamera: debayer_cpu: Add BGR888 output support - libcamera: Add "Software ISP benchmarking" documentation - libcamera: software_isp: Apply black level compensation - Documentation: coding-style: Clean up header guard style - utils: checkstyle.py: Use r'' strings for regular expressions - utils: checkstyle.py: Drop period at end of Doxygen one liners - libcamera: device_enumerator: Fix spell error - libcamera: Fix output spelling error - libcamera: utils: Avoid infinite recursion with strtod() - libcamera: shared_mem_object: Fix compilation with uClibc - meson: Deprecate bitwise operations between different enumeration type - Revert "meson: Deprecate bitwise operations between different enumeration type" - test: Don't add current build directory to include path - libcamera: controls: Generate enum value-name maps - libcamera: Drop file name from header comment blocks - libcamera: Drop file name from header comment blocks in templates - libcamera: Drop remaining file name from header comment blocks - test: gstreamer: Simplify single stream test - Documentation: Add option to treat Doxygen warnings as errors - libcamera: camera_manager: Add environment variable to order pipelines match - include: linux: Add RGB48 formats - libcamera: formats: Add RGB48 formats - include: linux: Add PiSP specific image and config buffer formats - libcamera: formats: Add PiSP specific image and config buffer formats - libcamera: v4l2_subdevice: Add missing MEDIA_BUS_FMT_xxxx16_1X16 info pipeline: - pipeline: rpi: Always initialize the embedded buffer in tryRunPipeline - pipeline: rpi: vc4: Use an unpacked format if no packed one is available - pipeline: simple: Add support for MediaTek MT8365 platforms - libcamera: pipeline: Add Mali-C55 ISP pipeline - libcamera: pipeline: simple: fix size adjustment in validate() - libcamera: pipeline: simple: Rename converterBuffers_ and related vars - libcamera: pipeline: simple: Enable use of Soft ISP and Soft IPA - ipu3: Use posix basename - pipeline: rpi: Avoid duplicating size range for the same pixel format - libcamera: pipeline: Rename pipelines to a shorter name - libcamera: pipeline: Add a get factory by name helper ipa: - libipa: camera_sensor_helper: Mark createInstance() with override - utils: ipc: extract-docs: Fix escape characters in regex - ipa: rkisp1: agc: Wrap variable length C arrays in spans - ipa: rkisp1: Store hardware parameters in IPA context - ipa: rkisp1: Fix histogram weights configuration - ipa: rkisp1: Support the i.MX8MP ISP version - ipa: rpi: cam_helper: Extend embedded data parsing to RAW14 modes - utils: ipc: Fix event functions with no parameters - utils: ipc: Fix async main interface functions with no parameters - libcamera: ipa: Add Soft IPA - libcamera: libipa: camera_sensor: Add Sony IMX283 sensor properties - libcamera: libipa: camera_sensor: Add Sony IMX335 sensor properties - libcamera: libipa: camera_sensor: Add Sony IMX415 sensor properties - ipa: libipa: Allow creation of empty Histogram - ipa: libipa: Add ExposureModeHelper - ipa: libipa: Add AgcMeanLuminance base class - ipa: ipu3: Derive ipu3::algorithms::Agc from AgcMeanLuminance - ipa: ipu3: Remove bespoke AGC functions from IPU3 - ipa: rkisp1: Derive rkisp1::algorithms::Agc from AgcMeanLuminance - ipa: rkisp1: Remove bespoke Agc functions - ipa: libipa: histogram: Add transform parameter to constructor - ipa: rpi: Fix for incorrectly reported max shutter speed - ipa: rkisp1: agc: Fix histogram construction - ipa: libipa: histogram: Fix documentation of constructor - ipa: rpi: Add HDR support - ipa: rpi: Add accessor function for monoSensor_ apps: - gstreamer: Add meson devenv support - apps: common: dng_writer: Add a default case for switch-case on a modulo - doc: gstreamer: Add missing queues - gstreamer: Map R8/R16 pixel format - gstreamer: Map 10/12/14/16 bayer formats supports - cam: capture_script: Make parseRectangles work for non-array - apps: lc-compliance: Check that requests complete successfully - apps: lc-compliance: Fix typo in comment - apps: lc-compliance: Re-organize source directory - android: camera_device: Save capture settings unconditionally - v4l2: Unset _TIME_BITS in addition to _FILE_OFFSET_BITS - v4l2: meson: Keep defines sorted alphabetically - apps: cam: Add support for PPM output format - android: camera_device: Always clear descriptors_ in stop() - apps: cam: Fix C++20 deprecation warning - apps: qcam: Use standard key sequence for quit action - gstreamer: Fix string memory leak - gstreamer: Use copied camera name Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-05-07Revert "meson: Deprecate bitwise operations between different enumeration type"Laurent Pinchart
Enabling -Wdeprecated-enum-enum-conversion by default turned out to be a too hasty decision. It causes compilation failures with Qt headers prior to Qt v5.15.8. As the previous LTS versions of Debian and Ubuntu ship older Qt versions, those errors cause real inconvenience to users. This reverts commit bf4695266bfca8cc21bcf10a3281e874ebce0d27. The original goal of avoiding C++20 compilation regressions is still handled through a test in CI. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-05-03meson: Deprecate bitwise operations between different enumeration typeLaurent Pinchart
C++20 deprecates bitwise operations between different enumeration types. This is a bad practice even in C++17, so enable the deprecation warning. Doing so ensures no such operations will be added. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-05-03libcamera: shared_mem_object: Fix compilation with uClibcLaurent Pinchart
uClibc doesn't provide a memfd_create() implementation. Fix it by using a direct syscall when the function isn't available. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-03-26libcamera: pipeline: Add Mali-C55 ISP pipelineJacopo Mondi
Add a pipeline handler for the Mali-C55 ISP. The pipeline doesn't currently support an IPA and does not run any 3a algorithm but only handles the media graph topology and formats/sizes configuration Co-developed-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Acked-by: Nayden Kanchev <nayden.kanchev@arm.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09libcamera v0.2.0v0.2.0Kieran Bingham
ABI Compliance: abi-compliance-checker reports 94.6% binary compatibilty and 97.6% source compatibility between 0.1.0 and 0.2.0. The SONAME has been updated accordingly and applications must be relinked against this version of libcamera. - Binary compatibility: 94.6% - Source compatibility: 97.6% - Total binary compatibility problems: 5, warnings: 2 - Total source compatibility problems: 3, warnings: 3 The key ABI/API differences here are: - AeFlicker The control "SceneFlicker" has been removed and replaced by AeFlickerMode, AeFlickerDetected and AeFlickerPeriod. - struct CameraConfiguration Field transform has been removed from the middle position of this structural type. Field orientation has been added at the middle position of this structural type. Field sensorConfig has been added at the middle position of this structural type. Size of this type has been changed from 40 bytes to 96 bytes. Bugs: The following bugs are resolved with this release: https://bugs.libcamera.org: - Bug 91 - libcamerasrc is missing EOS handling - Bug 199 - Install error on Ubuntu for Orange Pi 5 - Bug 205 - ipa_proxy_worker.cpp fails to compile if an interface function has two arguments of SharedFD type - Bug 206 - Fails to build with Python 3.12 https://github.com/raspberrypi/libcamera/issues: - Assertion '!this->empty()' failed in libcamera::utils::Duration - libcamera-tools 0.0.5-1 #64 Integration overview: core: - utils: checkstyle.py: Treat Malformed trailers as a CommitIssue - utils: checkstyle.py: Initialise staged trailers - utils: checkstyle.py: Derive Amendment from Commit - utils: checkstyle.py: Check trailers for Amendment commits - libcamera: controls: Add controls for AEC/AGC flicker avoidance - libcamera: yaml: Increase the YAML parser limit - utils: checkstyle.py: Extract title and trailers with one command - meson: Correctly locate libc++ - Documentation: theme: Fix compilation with Sphinx >= 7.0.0 - libcamera: Remove duplicated SortIncludes in `.clang-format` - libcamera: stream: Document stride will be 0 for compressed formats - README.rst: Drop recommendation to install meson using pip3 - meson: Don't set _FORTIFY_SOURCE for ChromeOS - meson: Simplify check for _FORTIFY_SOURCE - libcamera: formats: Fix typo in YV444 V4L2PixelFormat listing - Documentation: Introduce Camera Sensor Model - libcamera: camera: Introduce SensorConfiguration - libcamera: camera_sensor: Support SensorConfiguration - libcamera: converter: A few fixes to ConverterFactoryBase documentation - libcamera: converter: drop unnecessary #include directive - utils: update-kernel-headers: Support git worktrees - libcamera: camera_sensor: Cache rotationTransform_ - libcamera: camera: Introduce Orientation - Documentation: Add figures to document Orientation - libcamera: properties: Make 'Rotation' the mounting rotation - libcamera: transform: Add functions to convert Orientation - libcamera: transform: Invert operator*() operands - libcamera: transform: Add operations with Orientation - test: Add unit test for Transform and Orientation - libcamera: Use CameraConfiguration::orientation - libcamera: camera_sensor: Cache mounting orientation instead of transform - libcamera: transform: Fold transformToOrientation() in its only caller - libcamera: transform: Make the transformFromOrientation() function static - libcamera: controls: Add controls for HDR - libcamera: camera_sensor: Only access V4L_CID_HBLANK if existing - Documentation: Add code of conduct - Documentation: code-of-conduct: Convert to reStructuredText - Documentation: code-of-conduct: Add license information - Documentation: code-of-conduct: Add contact information - Documentation: contributing: Integrate the code of conduct - README.rst: Use code directive for all code examples - Documentation: Fix list indentation - controls: Add vendor control/property support to generation scripts - controls: Update argument handling for controls generation scripts - build: controls: Rework how controls and properties are generated - libcamera: control: Add vendor control id range reservation - libcamera: controls: Use vendor tags for draft controls and properties - documentation: Document vendor specific controls and properties handling - README.rst: Drop indirect dependencies on Qt5 packages - README.rst: Document dependencies for the Python bindings - meson_options: Sort options alphabetically - meson: Tag all installed files - test: log: log_process: Log an error when failing due to incorrect message - test: log: log_process: Fix uninitialized variable on process exit failure - test: log: log_process: Improve debugging on process exit failures - test: log: log_process: Increase process exit timeout - test: ipc: unixsocket: Increase process exit timeout - test: gstreamer: Remove videoconvert element from pipeline - README.rst: Add missing libgtest-dev dependency for lc-compliance - meson: Replace hack with usage of '@BASENAME@' - libcamera: camera: Fix unused variable compiler warning - Documentation: camera-sensor-model: Support Sphinx < 2.0 - libcamera: camera_sensor: Add OV64A40 sensor properties - utils: ipc: Fix deserialization of multiple fd parameters - libcamera: device_enumerator: ensure deviceNode is not empty - utils: ipc: mojom_libcamera_generator.py: Fix Python warning - libcamera: framebuffer_allocator: Remove unnecessary `clear()` - hooks: pre-push: Disable interpretation of escape sequences - libcamera: geometry: Correct doxygen reference to classes - utils: update-mojo.sh: Properly remove old sources - utils: update-mojo.sh: Exit immediately on error - utils: update-mojo.sh: Change to the libcamera source directory - utils: update-mojo.sh: Reject a dirty libcamera tree - utils: update-mojo.sh: Commit the mojo update - utils: ipc: generate.py: Add bindings directory to Python path - utils: ipc: generate.py: Disable attributes checker - utils: ipc: Update mojo pipeline: - libcamera: rpi: pipeline_base: Remove populateSensorFormats() - libcamera: rpi: pipeline_base: Move findBestFormat to CameraData - libcamera: rpi: pipeline_base: Cache sensor format - pipeline: rpi: Don't call toV4L2DeviceFormat() from validate() - pipeline: rpi: Increase buffer import count to 32 - pipeline: rpi: Remove additional external dma buf handling logic - pipeline: rpi: Rename RPi::Stream::setExternalBuffer() - pipeline: rpi: Simplify buffer id generation - pipeline: rpi: Reset the frame lengths queue during configure - libcamera: rpi: Handle SensorConfiguration - libcamera: rpi: Allow platformValidate() to adjust format strides - libcamera: rpi: Fix wrong comment indentation - libcamera: rpi: Make isRaw/isYuv/isRgb static functions - libcamera: rpi: Cache rawStreams and outStreams - libcamera: rpi: Add some helpers to PipelineHandlerBase - libcamera: rpi: Simplify validate() and configure() for RAW streams - libcamera: rpi: Change default stream formats - libcamera: rpi: Simplify validate() and configure() for YUV/RGB streams - pipeline: rpi: Add RequiresMmap flag to RPi::Stream - pipeline: rpi: Add Recurrent and Needs32bitConv flags to RPi::Stream - pipeline: rpi: Add SharedMemObject class - pipeline: rpi: Add SW downscale status to RPi::Stream - pipeline: rpi: Move flip handling validation code - pipeline: rpi: Make color space members in RPiCameraConfiguration public - pipeline: rpi: vc4: Allocate more embedded data buffers - pipeline: rpi: Remove unused variable - pipeline: rpi: vc4: Fix drop frame bug when no ISP streams are configured - pipeline: rpi: Add some useful logging messages - libcamera: pipeline: Fix c++20 compile warning - pipeline: rpi: Respect provided stride ipa: - ipa: rpi: common: Handle AEC/AGC flicker controls - utils: raspberrypi: ctt: Improved color matrix fitting - ipa: rpi: vc4: data: Updated color matrices for RPi Cameras - utils: raspberrypi: ctt: Code tidying - ipa: rpi: Fix the reporting of Focus FoMs - ipa: rpi: imx290: Hide one frame on startup - ipa: rpi: agc: Fetch AWB status in process method, not prepare - ipa: rpi: agc: Filter exposures before dealing with digital gain - ipa: rpi: agc: Split AgcStatus into AgcStatus and AgcPrepareStatus - ipa: rpi: vc4: Make the StatisticsPtr construction clearer - ipa: rpi: histogram: Add interBinMean() - ipa: rpi: agc: Reorganise code for multi-channel AGC - ipa: rpi: agc: Implementation of multi-channel AGC - ipa: rpi: agc: Add AgcChannelConstraint class - ipa: rpi: agc: Use channel constraints in the AGC algorithm - ipa: rpi: Fix segfault when parsing invalid json file - ipa: rpi: Fix frame count logic when running algorithms - ipa: rpi: Avoid skipping IPAs on the first frame after the drop frames - ipa: rpi: Add IpaBase::platformStart() member function - mojom: pipeline: ipa: rpi: Add fields for PiSP objects - ipa: rpi: Add try_lock() to RPiController::Metadata - ipa: rpi: Add statsInline to the Controller hardware description - ipa: rpi: Add PiSP definitions to the Controller hardware description - ipa: rpi: Prepare ALSC for PiSP support - ipa: rpi: Prepare AWB for PiSP support - ipa: rpi: Add new algorithms for PiSP - build: ipa: Fix bug in building multiple IPA interfaces with the same mojom file - ipa: rpi: agc: Add an AGC stable region - ipa: rpi: contrast: Allow adaptive contrast enhancement to be disabled - ipa: rpi: denoise: Support different denoise configurations - ipa: rpi: agc: Avoid overwriting caller's statistics pointer - ipa: rpi: agc: When AGC channels are changed, start with the 1st channel - ipa: rpi: hdr: Add the ability to alter the LSC table - ipa: rpi: alsc: Do not re-read the alsc.status metadata - ipa: rpi: agc: Allow AGC channels to avoid using "fast desaturation" - ipa: rpi: vc4: Move denoise control handling into the VC4 derived IPA - ipa: rpi: agc: Fetch AWB status in the prepare method - ipa: rpi: agc: Make AGC controls affect all channels - ipa: rpi: alsc: Do not allow zero colour ratio statistics - ipa: rpi: agc: Fix bug where AeLocked was never getting set - ipa: rpi: cac: Minor code improvements and tidying - ipa: rpi: Add hardware line rate constraints - ipa: rpi: Allow the mean of an empty histogram interval - ipa: rpi: black_level: Add an initialValues method - ipa: rpi: awb: Add an initialValues method - utils: raspberrypi: ctt: Improve the Macbeth Chart search reliability - build: controls: Add Raspberry Pi vendor specific controls - ipa: vc4: Implement the StatsOutputEnable vendor control - ipa: rpi: Provide a Camera Helper for the OV64A40 - libipa: camera_sensor_helper: Add OV64A40 helper - ipa: rpi: vc4: Add OV64A40 tuning files - ipa: rpi: Implement HDR control - ipa: rpi: vc4: data: Update tuning files for HDR apps: - android: camera_device: Fix requestedStream handling - py: Add the SensorConfiguration class - py: gen-py-controls: Remove SceneFlicker workaround - apps: qcam: Add support for RGB565 - py: libcamera: Define and use Orientation - apps: cam: Add option to set stream orientation - py: cam: Add option to set stream orientation - gstreamer: Implement element EOS handling - gstreamer: Fix unused variable error - test: gstreamer: Fix indentation in comments - gstreamer: Move negotiation logic to separate function - gstreamer: Add GstLibcameraSrcState::clearRequests method - gstreamer: Implement renegotiation - lc-compliance: Set minimum version for gtest dependency - gstreamer: Support for pre-1.16 GstEvent - apps: lc-compliance: Fix source file ordering in meson.build Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-12-07meson: Tag all installed filesLaurent Pinchart
Meson uses tags to sort installed files in categories, and makes it possible to install a subset of the files using the '--tags' argument to 'meson install'. This is typically used by distributions to split the runtime, development and documentation files into separate packages. By default, meson tries to guess the correct tag for installed files, but can't always do so properly. Mark the install targets that meson can't guess with the correct install_tag. As the feature has been introduced in meson 0.60, bump the minimum meson version. The latest LTS release of all major distributions that libcamera currently targets ship a recent enough meson version. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
2023-11-29build: controls: Rework how controls and properties are generatedNaushir Patuck
Add support for using separate YAML files for controls and properties generation. The mapping of vendor/pipeline handler to control file is done through the controls_map variable in include/libcamera/meson.build. This simplifies management of vendor control definitions and avoids possible merge conflicts when changing the control_ids.yaml file for core and draft controls. With this change, libcamera and draft controls and properties files are designated the 'libcamera' vendor tag. In this change, we also rename control_ids.yaml -> control_ids_core.yaml and property_ids.yaml -> property_ids_core.yaml to designate these as core libcamera controls. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-09-21meson: Simplify check for _FORTIFY_SOURCELaurent Pinchart
Use the compiler.get_define() function to get the value of _FORTIFY_SOURCE instead of iterating over the cpp_args. This simplies the code, but also guarantees to return the actual value of _FORTIFY_SOURCE, even if defined through other means than through the meson cpp_args. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: George Burgess IV <gbiv@google.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
2023-09-19meson: Don't set _FORTIFY_SOURCE for ChromeOSGeorge Burgess IV
ChromeOS is moving to a platform default of `_FORTIFY_SOURCE=3`, and this definition conflicts with that: <command line>:4:9: error: '_FORTIFY_SOURCE' macro redefined [-Werror,-Wmacro-redefined] Rather than adding logic to keep up with their local configuration, it seems best to leave setting _FORTIFY_SOURCE on ChromeOS up to ChromeOS. Signed-off-by: George Burgess IV <gbiv@google.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>
2023-07-28meson: Correctly locate libc++Laurent Pinchart
The meson find_library() function takes a library name without the "lib" prefix. Its usage to find lic++ is thus not correct, and meson warns about it: WARNING: find_library('libc++') starting in "lib" only works by accident and is not portable Fix it by dropping the "lib" prefix. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-07-16libcamera v0.1.0v0.1.0Kieran Bingham
ABI Compliance: abi-compliance-checker reports 99% binary compatibility and 81.4% source compatibilty between version 0.0.5 and 0.1. - Binary compatibility: 99% - Source compatibility: 81.4% - Total binary compatibility problems: 4, warnings: 2 - Total source compatibility problems: 165, warnings: 7 Now that we have funtional ABI validation, the soname has been updated from libcamera.so.0.0.5 to libcamera.so.0.1. Future releases will now maintain the same soname until an ABI breakage is detected to reduce the repackaging and rebuilding of other components that may use libcamera. The abi-compatibility report can now be generated with the new utility './utils/abi-compat.sh'. Key differences here are due to preventing the installation of internal and private headers in the packaging process, and most of this API compatibility should not be visible to applications with the exception of: - Camera::generateConfiguration ( StreamRoles const& roles ) The StreamRoles type definition has been removed. This is now handled as a Span<StreamRole> to prevent unnecessary allocations and copies. - CameraManager::addCamera ( std::shared_ptr<struct Camera> camera, std::vector<unsigned long>const& devnums ) - CameraManager::get ( dev_t devnum ) - CameraManager::removeCamera ( std::shared_ptr<struct Camera> camera ) These functions of the CameraManager were for use exclusively by the V4L2 adaptation layer, and not intended for use by applications. This has now been reworked to use the new SystemDevices and the redundant functions removed. The ABI/API breakages have been introduced by: 5ca0c9276f28 ("libcamera: CameraManager: Remove ::get(dev_t)") 26a4b83d1b94 ("libcamera: Remove `StreamRoles` alias") 63966ae587d7 ("libcamera: base: Do not install private headers") Core: - libcamera: v4l2_videodevice: Use O_CLOEXEC when exporting DMA buffers - libcamera: ipa_manager: Allow IPA loading in nested subdirs - meson: Fix usage of overwritten pipeline variable - subprojects: Drop leftovers of pybind11 - camera_sensor: ipa: core: Add CFA pattern to IPACameraSensorInfo - libcamera: controls: Define a default lens position behaviour - libcamera: internal: request: convert to pragma once - libcamera: camera_manager: Move private implementation to internal - libcamera: camera_manager: Move {add,remove}Camera to internal - libcamera: properties: Provide a Devices camera property - libcamera: pipeline: Register device numbers with camera - libcamera: camera_sensor: Adjust properties::Rotation - libcamera: meson: Allow PH to change libcamera_deps - libcamera: base: Move thread_annotations to private - libcamera: base: Do not install private headers - utils: ABI Compatibility checker - meson: Use x.y soname versioning - libcamera: camera: Take span of StreamRole instead of vector - libcamera: Remove `StreamRoles` alias - utils: ipu3-capture.sh: Fix the script to work with recent media-ctl versions - Documentation: Add predefined macros from config.h to Doxyfile - utils: checkstyle: Add __repr__ method to CommitFile class - utils: checkstyle: Support running checkers selectively - utils: checkstyle: Don't include commit ID in commit title - utils: checkstyle: Add trailers checker - tests: gstreamer: Test cameras' enumeration from GstDeviceProvider - meson: Fix space around colon issues - libcamera: Add option to configure udev support - libcamera: CameraManager: Remove ::get(dev_t) - tests: gstreamer: Fix compiler error with gcc 8.4.0 ipa: - meson: ipa: Add mapping for pipeline handler to mojom interface file - libcamera: ipa: Remove character restriction on the IPA name - ipa: meson: Allow nested IPA directory structures - ipa: raspberrypi: Introduce IpaBase class - ipa: raspberrypi: agc: Move weights out of AGC - ipa: rkisp1: agc: drop hard-coded analogue gain range - libipa: camera_sensor_helper: Add IMX327 helper - pipeline: rpi: ipa_base: Parse config files after platformRegister() - libcamera: camera_sensor: Add Sony IMX327 sensor properties - ipa: rpi: imx296: Small refinements to the IMX296 mono sensor tuning - ipa: rpi: Handle controls for mono variant sensors - libcamera: controls: Drop reference to IPA in controls documentation - libipa: camera_sensor_helper: Restore alphabetical order - ipa: ipu3: agc: Drop hard-codec analogue gain max - ipa: rkisp1: agc: Restore minimum analogue gain limit - pipeline: ipa: rpi: Return lens controls from ipa->configure() - ipa: rpi: Set lens position to hyperfocal on startup - ipa: rpi: tunings: Add missing short and long exposure profiles - ipa: rpi: agc: Use std::string instead of char arrays - ipa: rpi: agc: Gracefully handle missing agc modes - ipa: rpi: agc: Do not switch to a default if a mode is unavailable - ipa: rpi: imx708: Fix mode switch drop frame count - ipa: rpi: imx296_mono: Disable all colour shading pipeline: - libcamera: pipeline: simple: Add support for ST's DCMIPP - pipeline: meson: Allow nested pipeline handler directory structures - pipeline: ipa: raspberrypi: Refactor and move the Raspberry Pi code - pipeline: raspberrypi: rpi_stream: Set invalid buffer to id == 0 - pipeline: ipa: raspberrypi: Restructure the IPA mojom interface - pipeline: raspberrypi: Make RPi::Stream::name() return const std::string & - pipeline: raspberrypi: Introduce PipelineHandlerBase class - pipeline: raspberrypi: Add stream flags to RPi::Stream - libcamera: rkisp1: Generate config using main path - libcamera: rkisp1: Crop on ISP before downscaling - libcamera: rkisp1: Assign sizes to roles - libcamera: rkisp1: Fix enumeration of RAW formats - pipeline: rpi: Do not return an error from pipeline config file handling - libcamera: pipeline: simple: Support TI CSI-RX - pipeline: rpi: Account for Bayer packing when validating format apps: - apps: qcam: Remove redundant check - v4l2: Move the v4l2 compat layer to libexec/libcamera - android: mm: generic: use GRALLOC_HARDWARE_MODULE_ID - android: mm: Stub libhardware for build tests - py: Fix CameraManager.version property - py: Move ColorSpace and Transform classes to separate files - py: Use exceptions instead of returning error codes - py: unittests.py: Add weakref helpers and use del - py: Move to mainline pybind11 version - py: Fix code formatting - py: unittests.py: Fix type checker warnings - gstreamer: Add enable_auto_focus option to the GStreamer plugin - gstreamer: Drop libcamera_private dependency - apps: Add ipa-verify application - v4l2: v4l2_camera_proxy: Prevent ioctl sign-extensions - v4l2: Use SystemDevices properties to identify cameras Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-07-07libcamera: Add option to configure udev supportLaurent Pinchart
libcamera uses udev to support hotplug (and unplug) detection. This is an optional feature, which gets selected automatically if udev is available. Users may however want to build libcamera without hotplug detection, even if udev is available on the system. Add a new feature option to control udev support. The default value is auto, which retains the existing behaviour. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-07-07meson: Fix space around colon issuesLaurent Pinchart
The meson style, which libcamera follows, recommends a space before colons in function parameters. Fix the style violations through the project. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2023-07-05Documentation: Add predefined macros from config.h to DoxyfileLaurent Pinchart
libcamera creates a config.h file with predefined macros, and instructs the compiler to include it implicitly with the -include argument. Doxygen has no support for implicit inclusion of headers, but has a PREDEFINED configuration option for its preprocessor that lists predefined macros. Populate it with the values from the config_h configuration data object that is used for generate the config.h file, to ensure that documentation matches the configuration options libcamera has been built with. Bump the minimum meson version to 0.57 to use cfg_data.keys(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-07-04meson: Use x.y soname versioningKieran Bingham
Now that we identify ABI breakages, provide incremental releases which can support backwards compatible linkage across release points that have a compatible ABI. Introduction of this commit does not convey that libcamera now has a stable API, but that patch releases with a common minor number (0.minor.patch) may potentially be used by applications without recompilation and linkage against new releases. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2023-05-04pipeline: ipa: raspberrypi: Refactor and move the Raspberry Pi codeNaushir Patuck
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>
2023-05-04ipa: meson: Allow nested IPA directory structuresNaushir Patuck
The current IPA build files require a flat directory structure for the IPAs. Modify the build files to remove this restriction and allow a directory structure such as: src/ipa |- raspberrypi |- common |- cam_helpers |- controller |- vc4 |- rkisp1 |- ipu3 where each subdir (e.g. raspberrypi/common, raspberrypi/cam_helper) has its own meson.build file. Such a directory structure will be introduced for the Raspberry Pi IPA in a future commit. 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>
2023-05-01libcamera v0.0.5v0.0.5Kieran Bingham
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>
2023-05-01meson: Ignore -Wredundant-move with gcc-13 and newerLaurent Pinchart
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>
2023-04-05meson: Really fix git version parsingLaurent Pinchart
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>
2023-03-21meson: Fix git version parsingLaurent Pinchart
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>
2023-03-09meson: Align handling of build metadataMichael Riesch
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>
2023-02-01libcamera v0.0.4v0.0.4Kieran Bingham
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>
2023-01-30meson: Rework automatic pipeline selectionKieran Bingham
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>
2023-01-10libcamera: base: utils: Support C libraries lacking locale supportLaurent Pinchart
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>
2022-12-30meson: Add 'all' choice to pipelines optionPaul Elder
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>
2022-12-24meson: Only build pipeline handlers needed in the host architectureJavier Martinez Canillas
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>
2022-12-20libcamera v0.0.3v0.0.3Kieran Bingham
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>
2022-11-18libcamera v0.0.2v0.0.2Kieran Bingham
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>
2022-10-28meson: Rewrite .replace usageKieran Bingham
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>
2022-10-14libcamera v0.0.1v0.0.1Kieran Bingham
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>
2022-10-13meson: Shared Object version handlingKieran Bingham
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>
2022-10-13meson: Fix typoKieran Bingham
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>
2022-08-16meson: Use dependency() instead of find_library() where possibleLaurent Pinchart
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>
2022-07-26libcamera: Correctly report enabled ipa modulesQuentin Schulz
"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>
2022-07-07meson: Correctly pass the global include to the compilerEli Schwartz
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>
2022-05-10Add Python bindingsTomi Valkeinen
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>
2022-05-10meson: Add 'check: true' for run_command() callsTomi Valkeinen
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>
2022-05-10meson: Use new project_*_root() functionsTomi Valkeinen
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>
2022-05-10meson: Require meson 0.56+Tomi Valkeinen
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>