summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-02-27libcamera: utils: Add to_underlying() helper functionLaurent Pinchart
C++23 has a std::to_underlying() helper function that converts an enumeration value to its underlying type. Add a compatible implementation to the libcamera::utils namespace. 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> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2024-02-23ipa: rkisp1: Support the i.MX8MP ISP versionPaul Elder
Handle the RKISP1_V_IMX8MP version in the rkisp1 IPA. This enables basic support of the i.MX8MP, excluding the processing blocks specific to the new ISP version. Those will be supported later. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-02-23include: linux: Add RKISP1_V_IMX8MP versionPaul Elder
Patches have been posted to the linux-media@vger.kernel.org mailing list to add i.MX8MP support to the rkisp1 driver ([1]). As no changes are expected to the userspace API in future versions of the series, add the RKISP1_V_IMX8MP version manually to the rkisp1-config.h header already. Once the patches get merged in the kernel, the changes will trickle down to libcamera with the next kernel headers update. [1] https://lore.kernel.org/linux-media/20240216095458.2919694-1-paul.elder@ideasonboard.com/ Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-02-23ipa: rkisp1: Fix histogram weights configurationLaurent Pinchart
The histogram weights are initialized to hardcoded 1's for each histogram grid cell. The code uses the wrong variable for the grid size, resulting in some weights having a 0 value. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-02-23ipa: rkisp1: Store hardware parameters in IPA contextLaurent Pinchart
Versions of the ISP differ in the processing blocks they include, as well as in the implementation of some of those blocks. In particular, they have different numbers of histogram bins oe AE statistics cells. The algorithms take these differences into account by checking the ISP version reported by the driver. These checks are currently scattered in multiple places. Centralize them in the IPARkISP1::init() function, and store the version-dependent hardware parameters in the IPA context, accessible by all algorithms. While at it, drop the IPASessionConfiguration::hw member that stores the revision number, unused by the algorithms. It can be added back laer to the IPAHwSettings structure if needed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-02-23ipa: rkisp1: agc: Wrap variable length C arrays in spansLaurent Pinchart
The RkISP1 statistics structure contains multiple arrays whose length varies depending on the hardware revision. Accessing those arrays is error-prone, wrap them in spans at the top level to reduce risks of out-of-bound accesses. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2024-02-23pipeline: rpi: vc4: Use an unpacked format if no packed one is availableDavid Plowman
When validating a stream, and no valid packed pixel format can be found, see if an unpacked format can be used instead. This is particularly helpful for 8 (and 16) bit raw formats, where asking for a packed format would previously have failed. Now the configuration will be adjusted to give you a format (in fact, the only format) that will work. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-02-15utils: mojom: Fix build error caused by the mojom tool updateNaushir Patuck
The update to the mojom tool in commit d17de86904f0 causes build errors with gcc 12.2 release builds. One such error is: In file included from src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:18: In static member function ‘static libcamera::ipa::RPi::ProcessParams libcamera::IPADataSerializer<libcamera::ipa::RPi::ProcessParams>::deserialize(std::vector<unsigned char>::const_iterator, std::vector<unsigned char>::const_iterator, libcamera::ControlSerializer*)’, inlined from ‘void IPAProxyRPiWorker::readyRead()’ at src/libcamera/proxy/worker/raspberrypi_ipa_proxy_worker.cpp:302:70: include/libcamera/ipa/raspberrypi_ipa_serializer.h:1172:32: error: ‘*(uint32_t*)((char*)&ret + offsetof(libcamera::ipa::RPi::ProcessParams, libcamera::ipa::RPi::ProcessParams::buffers.libcamera::ipa::RPi::BufferIds::bayer))’ may be used uninitialized [-Werror=maybe-uninitialized] 1172 | return ret; The failure is caused by the new auto-generated IPA interface not initialising POD types to a default value. This is because the updated mojom library uses a new mojom.ValueKind class to represent POD types, whereas the interface generator script uses the mojom.Kind class, which is correct for the older mojom library. Fix this breakage by switching the interface generator script to use mojom.ValueKind to test for POD types. Fixes: d17de86904f0 ("utils: ipc: Update mojo") Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-02-02gstreamer: Map 10/12/14/16 bayer formats supportsNicolas Dufresne
These formats are now defined in upstream GStreamer main branch, so it is now safe to use their names. Note that libcamera only supports little endian variants of these formats. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-02-02gstreamer: Map R8/R16 pixel formatNicolas Dufresne
This enables monochrome support in libcamerasrc. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-02-02doc: gstreamer: Add missing queuesNicolas Dufresne
As libcamerasrc reports some latency, a queue is needed in order to store the data in case the buffers has been produced slightly ahead of our reported latency. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-01-25libcamera: object: Add and use thread-bound assertionLaurent Pinchart
Several functions in libcamera classes are marked as thread-bound, restricting the contexts in which those functions can be called. There is no infrastructure to enforce these restrictions, causing difficult to debug race conditions when they are not met by callers. As a first step to solve this, add an assertThreadBound() protected function to the Object class to test if the calling thread context is valid, and use it in member functions of Object subclasses marked as thread-bound. This replaces manual tests in a few locations. The thread-bound member functions of classes that do not inherit from Object are not checked, and neither are the functions of classes marked as thread-bound at the class level. These issue should be addressed in the future. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25libcamera: object: Document and ensure Object deletion constraintsLaurent Pinchart
Object instances are meant to be deleted from the thread they are bound to, and this requirement is documented. There are however exceptions to the rule, as threads may be stopped and restarted, with objects bound to them not being deleted and recreated for every stop/restart cycle. Bound objects may therefore need to be deleted after the thread has stopped, making it impossible to use Object::deleteLater(). Document the lifetime requirements more precisely, and enforce them with an assertion. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: timer-thread: Destroy Object from correct thread contextLaurent Pinchart
The TimeoutHandler used in the test is destroyed from the main thread, which is invalid for a thread-bound object bound to a different thread. Fix it by destroying it with deleteLater(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: timer-thread: Move timer start from wrong thread to separate testLaurent Pinchart
Starting a timer from the wrong thread is expected to fail, and we test this in the timer-thread unit test. This is however not something that a caller is allowed to do, and libcamera will get assertion failures to catch this invalid usage. The unit test will then fail. To prepare for this, split the unit test in two, with a test that is expected by meson to succeed, and one that is expected to fail. The assertion will then cause an expected failure, making the test suite succeed. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: signal-threads: Destroy Object from correct thread contextLaurent Pinchart
The SignalReceiver used in the test is destroyed from the main thread, which is invalid for a thread-bound object bound to a different thread. Fix it by destroying it with deleteLater(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: message: Destroy Object from correct thread contextLaurent Pinchart
The MessageReceiver and RecursiveMessageReceiver used in the test are destroyed from the main thread, which is invalid for a thread-bound object bound to a different thread. Fix it by destroying them with deleteLater(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: message: Remove incorrect slow receiver testLaurent Pinchart
The slow receiver test verifies there's no race condition between concurrent message delivery and object deletion. This is not a valid use case in the first place, as objects are not allowed to be deleted from a different thread than the one they are bound to. Remove the incorrect test. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: event-thread: Destroy Object from correct thread contextLaurent Pinchart
The EventHandler used in the test is destroyed from the main thread, which is invalid for a thread-bound object bound to a different thread. Fix it by destroying it with deleteLater(). Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25libcamera: thread: Ensure deferred deletion of all objects before stoppingLaurent Pinchart
Objects can be scheduled for deletion with Object::deleteLater(), which queues a deferred deletion to the thread's event loop. As the deleteLater() function is meant to be called from a different thread, this may race with thread termination, and deferred deletions queued just before calling Thread::exit() may not be processed by the event loop. Make sure they get processed when finishing the thread, before stopping. This eliminates the race condition that occurs when calling Object::deleteLater() followed by Thread::exit() from the same thread. Calling deleteLater() from neither the thread the object is bound to or the thread calling Thread::exit() is still inherently racy. The change fixes a failure in the object-delete unit test. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25test: object-delete: Test deferred delete just before thread stopsLaurent Pinchart
The Object::deleteLater() function is expected to not race with stopping the thread the object is bound to. Add a test for this. The test currently fails, demonstrating a bug in libcamera. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25libcamera: signal: Replace object.h inclusion with forward declatationLaurent Pinchart
The signal.h header doesn't need to include object.h. Replace it with a forward declaration, and instead include object.h in source files that require it. It can speed up compilation a little bit, but more importantly avoids unintended dependencies from the Signal class to the Object class to be added later as the compiler will catch them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-25libcamera: object: Fix thread-bound reference in documentationLaurent Pinchart
The Object::message() function is documented as thread-bound without using the correct \threadbound reference. Fix it to ensure it gets included in the thread safety context list. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
2024-01-24apps: common: dng_writer: Add a default case for switch-case on a moduloPaul Elder
Clearly all cases in the switch are already satisfied, but some compilers fail to realize this and spit out an error: Compiler version: gcc 11.2.0 "aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2021.11) 11.2.0" ../../src/apps/common/dng_writer.cpp: In function ‘void thumbScanlineIPU3(const FormatInfo&, void*, const void*, unsigned int, unsigned int)’: ../../src/apps/common/dng_writer.cpp:277:55: error: ‘val4’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 277 | uint8_t value = (val1 + val2 + val3 + val4) >> 10; | ^~~~ ../../src/apps/common/dng_writer.cpp:277:48: error: ‘val3’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 277 | uint8_t value = (val1 + val2 + val3 + val4) >> 10; | ^~~~ ../../src/apps/common/dng_writer.cpp:277:41: error: ‘val2’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 277 | uint8_t value = (val1 + val2 + val3 + val4) >> 10; | ^~~~ ../../src/apps/common/dng_writer.cpp:277:34: error: ‘val1’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 277 | uint8_t value = (val1 + val2 + val3 + val4) >> 10; | ^~~~ Add a default case for the switch-case on a modulo to silence this. Bug: https://bugs.libcamera.org/show_bug.cgi?id=207 Signed-off-by: Paul Elder <paul.elder@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>
2024-01-23libcamera: v4l2_subdevice: Explain sort order of formatInfoMapKieran Bingham
The sort order used in the table isn't obvious. Reference the source of linux/media-bus-format.h at the top of the table for reference for future updates. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23libcamera: bayer_format: Add Y12 to bayerToFormatKieran Bingham
Support for Mono 12-bit formats were added to the mbusCodeToBayer table without supplying the corresponding entry for converting the other way. Add the relevant entry to the bayerToFormat table. Fixes: ec6309571654 ("libcamera: bayer_format: Add unpacked mono 12-bit format to the conversion table") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23libcamera: formats: Fix sort ordering of R10_CSI2PKieran Bingham
Move formats::R10_CSI2P to be grouped with the formats::R10 counterpart and keep the section of format declarations sorted in increasing bit depth. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23libcamera: formats: Add 16-bit mono formatNaushir Patuck
Add the relevant definitions for a 16-bit mono pixel and media-bus format. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23libcamera: Remove empty formats.cLaurent Pinchart
Commit e0a51061bc69 ("libcamera: formats: Add 14-bits Bayer RAW formats") added an empty formats.c file by mistake (and we failed to catch it during review). Delete it. Fixes: e0a51061bc69 ("libcamera: formats: Add 14-bits Bayer RAW formats") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23pipeline: rpi: Always initialize the embedded buffer in tryRunPipelineElias Naur
Vc4CameraData::findMatchBuffers() may return successfully with a null embedded buffer, in which case the embedded buffer id would be left uninitialized. Without this change, libcamera v0.2.0 usually crashes for me with an assertion error: ipa_base.cpp:397 assertion "it != buffers_.end()" failed in prepareIsp() Signed-off-by: Elias Naur <mail@eliasnaur.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-01-23test: gstreamer: Use env instead of registry editNicolas Dufresne
Instead of editing the registry, use gst_env variable provided by the plugin and already used as part of the devenv shell. This reduces the complexity of the C++ test code. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23gstreamer: Add meson devenv supportNicolas Dufresne
This change to the build system will prepend the plugin build directory to GST_PLUGIN_PATH environment. This makes the built plugin visible to GStreamer inside meson devenv enabling uninstalled testing. In order to avoid polluting the user registry, the GST_REGISTRY environment is also set. Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-23utils: ipc: extract-docs: Fix escape characters in regexPaul Elder
Newer versions of python now generate a SyntaxWarning (SyntaxError in the future [1]) for invalid escape sequences. Fix this, as there were invalid escape sequences in the regexes: "libcamera/utils/ipc/./extract-docs.py:13: SyntaxWarning: invalid escape sequence '\/'" [1] https://docs.python.org/3.12/library/re.html Reported-by: Nicolas Dufresne <nicolas@ndufresne.ca> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-01-22Documentation: Update Qt documentation links to Qt 6Neal Gompa
The documentation is effectively the same, but we should be pointing to the actively supported and used Qt version. Signed-off-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-01-22libcamera: base: signal: Update Qt documentation link to Qt 6Neal Gompa
The documentation is effectively the same, but we should be pointing to the actively supported and used Qt version. Signed-off-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2024-01-17libcamera: v4l2_subdevice: Enable streams API when supportedLaurent Pinchart
The streams API needs to be enabled explictly by setting a subdev client capability. Do so unconditionally for subdevs that expose streams support. We don't need any kernel version check to use the VIDIOC_SUBDEV_S_CLIENT_CAP ioctl, as it is guaranteed to be supported by kernels that support streams. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-17include: linux: Update kernel headers to version v6.7Laurent Pinchart
Update kernel headers to v6.7 using utils/update-kernel-headers.sh and re-instating libcamera local modifications. The V4L2_SUBDEV_CAP_MPLEXED flag has been renamed to V4L2_SUBDEV_CAP_STREAMS in the upstream streams API. Adapt the code base accordingly. The flag's numerical value hasn't changed, there is no ABI breakage introduced by the API update. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-12libipa: camera_sensor_helper: Mark createInstance() with overrideLaurent Pinchart
The CameraSensorHelperFactory::createInstance() function overrides a virtual function from CameraSensorHelperFactoryBase. The function declaration doesn't mark it with the override keyword. This could cause issues in the future if the base class' function changes, as the compiler will not issue any warning in that case. Fix it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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>
2024-01-09utils: ipc: Update mojoLaurent Pinchart
Update mojo from commit 9be4263648d7d1a04bb78be75df53f56449a5e3a "Updating trunk VERSION from 6225.0 to 6226.0" from the Chromium repository. The update-mojo.sh script was used for this update. Bug: https://bugs.libcamera.org/show_bug.cgi?id=206 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: ipc: generate.py: Disable attributes checkerLaurent Pinchart
The attributes checker ensures that .mojom files don't contain unknown attributes. These check fail with the custom 'skipSerdes' and 'async' libcamera attributes. Ideally the list of supported attributes should be extended, but that can't easily be done without modifying the mojo sources that we try to keep identical to the upstream version to make updates easier. Disable the attributes checker completely for now to fix this issue. While at it, fix an indentation issue reported by checkstyle.py. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: ipc: generate.py: Add bindings directory to Python pathLaurent Pinchart
Newer mojo versions import a 'checks' module located in the bindings directory. In preparation for a mojo update, add the directory to the Python path make the import work. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: update-mojo.sh: Commit the mojo updateLaurent Pinchart
Commit the mojo update with a standardized commit message. As mojo is imported as-is without local modifications, this simplifies usage of the update script. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: update-mojo.sh: Reject a dirty libcamera treeLaurent Pinchart
If the libcamera tree is dirty committing the result of the mojo update will be messy. Bail out in that case. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: update-mojo.sh: Change to the libcamera source directoryLaurent Pinchart
Instead of prefixing all paths to IPC files with ${ipc_dir}, change to the libcamera sources root directory and use relative file paths. This simplifies the update script. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: update-mojo.sh: Exit immediately on errorLaurent Pinchart
If an error occurs there's no point in ignoring it silently and continuing. Exit immediately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09utils: update-mojo.sh: Properly remove old sourcesLaurent Pinchart
The update-mojo.sh script starts by removing all sources before copying the new files from chromium. A bug in the 'rm' command makes the removal a no-op: the glob pattern is quoted, which attempts to remove a file name '*' in the tools directory, not all files in the directory. Fix it by removing the whole utils/ipc/mojo/ directory. While at it, also remove the utils/ipc/tools/ directory that contains imported sources. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09libcamera: geometry: Correct doxygen reference to classesDaniel Scally
The classes Rectangle, Size and SizeRange are referenced with \struct in the doxygen comments in geometry.cpp. Correct the reference to \class to better reflect their definition. Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09hooks: pre-push: Disable interpretation of escape sequencesKieran Bingham
The pre-push hook validates the commit messages utilising 'echo' to send the captured data from the git commit through grep. Commit messages may occasionally contain strings that could appear to be escape sequences such as doxygen style references to \struct. The '\' 'c' escape sequence can be interpreted to supress all further output [0] which then breaks the processing and string matching. Unfortunatley for us, doxygen's class reference constructed in the same form as \struct can be interpreted as the escape sequence to supress further output. [0] https://www.gnu.org/software/bash/manual/bash.html#Bash-Builtins Update the pre-push hook to explicitly disable escape sequence interpretation using the '-E' flag. This is not available on the posix-compliant shell 'dash', so also switch to bash explicitly to prevent potential failures. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2024-01-09ipa: rpi: vc4: data: Update tuning files for HDRDavid Plowman
All the Raspberry Pi official camera tuning files are updated for HDR. As stated previously, there is no mechanism in the hardware for combining images so all this does is enable multi-channel AGC to produce short and long exposure frames. It will be up to the application to deal with them. The changes are identical in every tuning file. 1. The existing AGC tuning is duplicated twice so that we have 3 AGC channels. 2. The first is left alone (the default AGC channel), the second is tweaked to under-expose significantly (ev -3) and the final one is tweaked to over-exposure slightly (ev +0.5) 3. Control parameters are provided to the "rpi.hdr" algorithm to associate these AGC channels correctly with the HDR modes. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>