Age | Commit message (Collapse) | Author |
|
Initialize the CameraData properties with Location and Model.
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>
|
|
When constructing the camera, we parse the available controls on the
video capture device, and map supported controls to libcamera controls,
and initialise the defaults.
The controls are handled during queueRequestDevice for each request and
applied to the device through the capture node.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The VIVID pipeline handler retains state globally of it's controls.
Ensure that when we configure this specific pipeline we set initial
parameters on the device that suit our (specific) needs.
This introduces how controls can be set directly on a device, however
under normal circumstances controls should usually be set from libcamera
controls as part of a request. These are VIVID specific only.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
When a request is given to a pipeline handler, it must parse the request
and identify what actions the pipeline handler should take to enact on hardware.
In the case of the VIVID pipeline handler, we identify the buffer from the only
supported stream, and queue it to the video capture device.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
We can now add buffer management, and connect up our bufferReady signal
to a callback.
Note that we provide the ability to export buffers from our capture
device (data->video_) using the exportBuffers() functionality from the
V4L2VideoDevice which allows a FrameBufferAllocater to obtain buffers
from this device.
When buffers are obtained through the exportFrameBuffers API, they are
orphaned and left unassociated with the device, and must be reimported
at start() time anyway. This allows the same interface to be used
whether internal buffers, or external buffers are used for the stream.
When a buffer completes, we call the buffer completion handler on the
pipeline handler, and because we have only a single stream, we can also
immediately complete the request.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
When the configurations have been generated and validated, they can be
applied to a device.
Vivid supports only a single stream, so it directly obtains the first
StreamConfiguration from the CameraConfiguration.
The VIVID catpure device is a V4L2Video device, so we generate a
V4L2DeviceFormat to apply directly to the capture device node.
Note that we convert the libcamera Format stored in
cfg.pixelFormat to a V4L2PixelFormat using V4L2PixelFormat helper. This
currently defaults to the single-planar formats, and should be extended
to support the Multiplanar configuration from the V4L2Device.
[todo Repair the link between the multiplanar configuration of the
V4L2VideoDevice and the pixel format selection]
Following the call to set the format using the Kernel API, if the format
has been adjusted in any way by the kernel driver, then we have failed
to correctly handle the validation stages, and thus the configure
operation is idendified has having failed.
Finally stream specific data can be directly stored and set as
reflecting the state of the stream.
[NOTE: the cfg.setStream() call here associates the stream to the
StreamConfiguration however that should quite likely be done as part of
the validation process. TBD]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Implement the support for Generating and Validating the streams the
Camera can provide.
Vivid is a simple case with only a single stream.
Test the configurations can be generated and reported with cam -I:
"""
LIBCAMERA_LOG_LEVELS=Pipeline,VIVID:0 ./src/cam/cam -c 1 -I
[232:02:09.633067174] [2882911] INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home//libcamera/build-vivid/src/ipa' to the IPA search path
[232:02:09.633332451] [2882911] WARN IPAManager ipa_manager.cpp:147 No IPA found in '/usr/local/lib/x86_64-linux-gnu/libcamera'
[232:02:09.633373414] [2882911] INFO Camera camera_manager.cpp:283 libcamera v0.0.11+714-d1ebd889-dirty
Using camera vivid
0: 1280x720-BGR888
* Pixelformat: NV21 (320x180)-(3840x2160)/(+0,+0)
- 320x180
- 640x360
- 640x480
- 1280x720
- 1920x1080
- 3840x2160
* Pixelformat: NV12 (320x180)-(3840x2160)/(+0,+0)
- 320x180
- 640x360
- 640x480
- 1280x720
- 1920x1080
- 3840x2160
* Pixelformat: BGRA8888 (320x180)-(3840x2160)/(+0,+0)
- 320x180
- 640x360
- 640x480
- 1280x720
- 1920x1080
- 3840x2160
* Pixelformat: RGBA8888 (320x180)-(3840x2160)/(+0,+0)
- 320x180
- 640x360
- 640x480
- 1280x720
- 1920x1080
- 3840x2160
"""
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Create a VividCameraData inheriting from the CameraData to handle camera
specific data, and use it to create and register the camera with the
CameraManager.
This can now be tested to see that the camera becomes available to
applications:
"""
LIBCAMERA_LOG_LEVELS=Pipeline,VIVID:0 ./src/cam/cam -l
[231:44:49.325333712] [2880028] INFO IPAManager ipa_manager.cpp:136 libcamera is not installed. Adding '/home/libcamera/build-vivid/src/ipa' to the IPA search path
[231:44:49.325428449] [2880028] WARN IPAManager ipa_manager.cpp:147 No IPA found in '/usr/local/lib/x86_64-linux-gnu/libcamera'
[231:44:49.325446253] [2880028] INFO Camera camera_manager.cpp:283 libcamera v0.0.11+713-d175334d-dirty
Available cameras:
1: vivid
"""
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Verify that we can match on our expected device(s).
Use a temporary debug print to check that the pipeline finds
our device:
"""
LIBCAMERA_LOG_LEVELS=Pipeline,VIVID:0 ./src/cam/cam -l
<snipped>
[230:51:10.670503423] [2872877] DEBUG VIVID vivid.cpp:81 Obtained Vivid Device
"""
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
To make sure we always build the Vivid pipeline in this branch,
explicitly add it to the pipelines build targets.
This is not any kind of best practice for pipeline handlers, but is here
to ensure that this pipeline is always compiled on this branch who's
sole purpose is to use and demonstrate the vivid pipeline handler.
|
|
Explicitly disable the unused-parameter warning in this pipeline handler.
Parameters are left unused while they are introduced incrementally, so for
documentation purposes only we disable this warning so that we can compile
each commit independently without breaking the flow of the development
additions.
This is not recommended practice within libcamera, please listen to your
compiler warnings.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Provide all of the skeleton stubs to succesfully compile
and register a new Pipeline Handler for the Vivid test device.
Meson must be reconfigured to ensure that this pipeline handler is
included in the selected pipelines configuration, and after building, we
can test that the PipelineHandler is successfully registered by listing
the cameras on the system with LIBCAMERA_LOG_LEVELS enabled:
"""
LIBCAMERA_LOG_LEVELS=Pipeline:0 ./build-vivid/src/cam/cam -l
[230:30:03.624102821] [2867886] DEBUG Pipeline pipeline_handler.cpp:680 Registered pipeline handler "PipelineHandlerVivid"
Available cameras:
"""
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Consider `pipelines=auto,virtual`. Previously that would select
everything that `auto` would, but not actually enable the `virtual`
pipeline handler because the `pipelines` list was reset.
Bug: https://bugs.libcamera.org/show_bug.cgi?id=247
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The v4l2 compatibility layer does not have external dependencies,
the usual benefits of a feature option do not apply. The main
motivation behind this change is making use of the `auto_features`
meson option that can change all feature options set to "auto"
by default to the desired value.
This can be useful for two reasons: (1) using auto_features=disabled
and then building up the list of features that are desired in the
particular build; (2) using auto_features=enabled to achieve
(usually) more testing and compilation coverage.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
If `FrameBufferAllocator::allocate()` causes the construction to be
aborted, the allocated `GstLibcameraAllocator` will not be
deallocated properly. Use `g_autoptr()` to address this.
`g_steal_pointer()` could only be used in glib 2.68 or later because
earlier it evaluates to a pointer-to-void in C++, which would necessitate
a `static_cast`.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
`FrameBufferAllocator::allocate()` might return a negative error code,
but currently this is handled the same way as success. So instead
of continuing, abort the construction of the allocator object.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
Previously we call Thread::setThreadAffinityInternal in
Thread::startThread. The purpose was to avoid the main workload being
run on incorrect CPUs. This leads to a race condition of setting
`Thread::thread_` in `Thread::start()` and accessing
`Thread::setThreadAffinityInternal` though.
This patch moves the call after the construction of std::thread to avoid
the race condition. The downside is that the first tasks, if any, upon
starting a thread might be run on incorrect CPUs.
Fixes: 4d9db06d6690 ("libcamera: add method to set thread affinity")
Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The error message for missing direction field prints the direction value
(usually 'None') instead of the name of the field 'direction'. Fix this.
Fixes: 39fe4ad96803 ("utils: codegen: controls.py: Parse direction information")
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Many libcamera headers that use standard C integer types do not include
stdint.h. Fix the omission.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Without the change the build fails on upcoming `gcc-15` as:
In file included from ../src/libcamera/dma_buf_allocator.cpp:9:
../include/libcamera/internal/dma_buf_allocator.h:66:19: error: 'uint64_t' has not been declared
66 | void sync(uint64_t step);
| ^~~~~~~~
Signed-off-by: Sergei Trofimovich <slyich@gmail.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>
|
|
__nodiscard was introduced for compatibility with C++14.
In C++17, there is an official attribute: [[nodiscard]].
Moreover, some libc implementations (like bionic) already define the
__nodiscard macro [1].
Since:
- libcamera builds with cpp_std=c++17
- [[nodiscard]] is already used in the android HAL (exif)
We should replace all usage __nodiscard of by [[nodiscard]] for
consistency.
Do the replacement and remove the no longer used compiler.h.
[1] https://android-review.googlesource.com/c/platform/bionic/+/3254860
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Some sensors support producing and transmitting embedded data over a
stream separate from the image stream. Add support for this feature in
the CameraSensor interface, and implement it for the CameraSensorRaw
class. The CameraSensorLegacy uses the default stub implementation, as
the corresponding kernel drivers don't support embedded data.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a new CameraSensorRaw implementation of the CameraSensor interface
tailored to devices that implement the new V4L2 raw camera sensors API.
This new class duplicates code from the CameraSensorLegacy class. The
two classes will be refactored to share code.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
With support for metadata in the streams API, the v4l2_meta_format
structure has been extended with width, height and bytesperline fields.
Support them in the V4L2VideoDevice getFormat() and setFormat()
functions is the video device is meta capture device and if the
pixel format is one of the generic line-based metadata formats.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Support the newly introduced V4L2 media bus formats for metadata. This
includes generic metadata formats, and two sensor-specific embedded data
formats.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add the definition for the generic line based pixelformats.
The formats has been added in upstream Linux by commit
1d9215233958 ("media: uapi: v4l: Add generic 8-bit metadata format
definitions") which got merged in Linux v6.10.
The formats however are not yet available to userspace, as they
have been made only available to the kernel by commit
d69c8429ea80 ("media: uapi: v4l: Don't expose generic metadata formats
to userspace") to let the line-based metadata support stabilize before
allowing applications to use it.
With the forthcoming completion of the line-based metadata upstreaming
manually add the generic line based pixel format to prepare libcamera
to support them.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Update the kernel headers with the definition of two device-specific
line-based metadata formats, and with the definition of the
MEDIA_PAD_FL_INTERNAL and V4L2_SUBDEV_ROUTE_FL_IMMUTABLE flags.
The new definitions will allow to support handling line-based
metadata streams exposed by the sensor driver through an
internal sink pad.
While the changes have not yet been collected in the official
linux-media tree, they're available in the 'metadata' branch of
https://git.linuxtv.org/sailus/media_tree.git, at revision:
f9bbbd9a696d ("media: Documentation: Add binning and sub-sampling
controls")
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a CamHelper::setHwConfig() helper used by the IPA to set the
hardware configuration in use by the pipeline. This will be needed by
the IMX500 camera helper in a future commit to determine if the
metadata buffer is strided.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
This property (dataBufferStrided) indicates if the CSI-2 hardware writes
to the embedded/metadata buffer directly, or if it treats the buffer
like an image buffer and strides the metadata lines.
Unicam writes this buffer strided, while the PiSP Frontend writes to it
directly. This information will be relevant to data parsers in the
helpers where the data is structured in lines.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
These functions erase a key/value pair from the metadata object.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Use an r-value reference in set() and setLocked(), allowing more
efficient metadata handling with std::forward and std::move if needed.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Basic tuning done by David Plowman using a Waveshare SKU 28524
"IMX415-98 IR-CUT Camera" module.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
As another Starvis sensor, it is near identical to imx290/327.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Believed correct based on imx290.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
As DmaSyncer does sync start/end in the c'tor/d'tor, copying a DmaSyncer
instance would trigger sync end earlier than expected. This patch makes
it non-copyable to avoid the issue.
Fixes: 39482d59fe71 ("DmaBufAllocator: Add Dma Buffer synchronization function & helper class")
Signed-off-by: Harvey Yang <chenghaoyang@chromium.org>
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>
|
|
After the initial generation, when a frame is requested,
the test pattern generator rotates the image left by 1 column.
The current approach has two shortcomings:
(1) it allocates a temporary buffer to hold one column;
(2) it swaps two columns at a time.
The test patterns are simple ARGB images, in row-major order,
so doing (2) works against memory prefetching. This can be
addressed by doing the rotation one row at a time as that way
the image is addressed in a purely linear fashion. Doing so also
eliminates the need for a dynamically allocated temporary buffer,
as the required buffer now only needs to hold one sample,
which is 4 bytes in this case.
In an optimized build, this results in about a 2x increase in the
number of frames per second as reported by `cam`. In an unoptimized,
ASAN and UBSAN intrumented build, the difference is even bigger,
which is useful for running lc-compliance in CI in a reasonable time.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
`PixelFormatInfo::planes.size()` always returns 3 since `planes` is
an array, but that is not the number of planes of the pixel format.
Use the `numPlanes()` getter instead.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
There is no reason make copies, these functions return
const lvalue references, access the data through those.
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The abi-compliance-checker reports that there is both ABI and API breakage in
this release.
Binary compatibility: 91.2%
Source compatibility: 98.9%
Total binary compatibility problems: 69, warnings: 0
Total source compatibility problems: 9, warnings: 0
This is not too surprising as this was the reason for the extra delay holding
up this release, and as such this release bumps the SONAME to 0.4 accordingly.
The majority of the ABI breakages are around the public API for Control
handling and definitions, which have caused underlying identifiers to be
changed, and the reuqired storage for controls has increased.
I hope that grouping the expected ABI and API breakages and delaying this
release will allow a longer stability on the 0.4 series but as we are
developing rapidly this can not be guaranteed, though we aim to minimise
disruption to distributions and applications whereever possible.
This release brings in 253 commits, with substantial development on image
control and tuning features for IPA and Pipeline handlers supporting libipa, as
well as integrating libipa support for IPA handling on the ARM Mali-C55 ISP.
A new 'Virtual Pipeline Handler' has been introduced to support more testing in
CI and virtual environments.
Gstreamer has had some interesting development to rework expressing the full
control set from libcamera using auto generation from the full control
descriptors.
A key and notable change in this release too is that the softISP is now moving
towards utilising the libipa implementaitons which will enable future tuning
and image control capabilities, and should also support future development on a
GPU-ISP implementation for GPU-accelerated handling. I do believe this work may
have introduced an oscillation regression in the AEGC which will need to be
investigated and fixed in the near future, but I don't want to hold up
progressing the ABI updates at this stage.
The i.MX8MP can now make full use of the DW100 Dewarp Engine for full rotation
and digital zoom capabilities.
Raspberry Pi systems now have improved support for the OV7251, IMX462, and
IMX327 Sensors, and libipa platforms can now make use of the GalaxyCore gc05a2
and gc08a3 Image sensors.
The following commits in this release relate to either a bug fix or an
improvement to an existing commit.
- ipa: rpi: Use std::abs()
- Reported-by: Maarten Lankhorst <dev@lankhorst.se>
- libcamera: rkisp1: Clamp stream configuration to ISP limit on raw path
- Fixes: 761545407c76 ("pipeline: rkisp1: Filter out sensor sizes not supported by the pipeline")
- libcamera: rkisp1: Rectify SensorConfiguration check
- Fixes: 047d647452c4 ("libcamera: rkisp1: Integrate SensorConfiguration support")
- libcamera: controls: Add missing size to control_type<Point>
- Fixes: 200d535ca85f ("libcamera: controls: Add ControlTypePoint")
- pycamera: Add missing code for ControlTypePoint
- Fixes: 200d535ca85f ("libcamera: controls: Add ControlTypePoint")
- libcamera: software_isp: Clear IPA context on configure and stop
- Fixes: 04d171e6b299 ("libcamera: software_isp: Call Algorithm::queueRequest")
- utils: checkstyle.py: Centralize dependency handling for checkers
- Fixes: 8ffaf376bb53 ("utils: checkstyle: Add a python formatter")
- test: py: Fix log level restore in SimpleTestMethods()
- Fixes: 06cb7130c4fa ("py: Add unittests.py")
- v4l2: v4l2_camera_proxy: Fix VIDIOC_[GS]_PARM support
- Fixes: 5456e02d3f5b ("v4l2: Support setting frame rate in the V4L2 Adaptation layer")
- gstreamer: Remove auto-focus-mode property from device provider
- Fixes: 5a142438b025 ("gstreamer: Add enable_auto_focus option to the GStreamer plugin")
- libcamera: software_isp: Clean up pending requests on stop
- Bug: https://bugs.libcamera.org/show_bug.cgi?id=234
- ipa: rpi: awb: Disable CT search bias for Grey World AWB
- Fixes: ea8fd63d936f ("ipa: rpi: awb: Add a bias to the AWB search")
- meson: Don't unnecessarily fallback to libyuv wrap
- Fixes: eeaa7de21b8c ("libcamera: pipeline: Add test pattern for VirtualPipelineHandler")
- libcamera: Don't copy `StreamConfiguration` when iterating
- Fixes: 4217c9f1aa86 ("libcamera: camera: Zero streams before validate()")
- libcamera: software_isp: Actually apply black level from tuning data
- Fixes: 41e3d61c7451 ("libcamera: software_isp: Clear IPA context on configure and stop")
- gstreamer: keep same transfer with that in negotiated caps
- Bug: https://bugs.libcamera.org/show_bug.cgi?id=150
- pipeline: rkisp1: Fix scope of dewarper stop() exit action
- Fixes: 12b553d691d4 ("libcamera: rkisp1: Plumb the dw100 dewarper as V4L2M2M converter")
- pipeline: rkisp1: Limit sensor size to max resolution
- Fixes: 761545407c76 ("pipeline: rkisp1: Filter out sensor sizes not supported by the pipeline")
And the following updates have been made in this release, grouped by category:
core:
- utils: abi-compat: Disable python build
- utils: abi-compat: sort meson options
- libcamera: controls: Add enum names and values map to ControlId
- libcamera: controls: Add array information to ControlId
- libcamera: v4l2_videodevice: Add getSelection() function
- libcamera: controls: Handle enum values without a cast
- libcamera: Replace usage of lroundf() with std::lround()
- libcamera: Replace last users of math.h
- libcamera: geometry: Clarify Rectangle's top-left corner
- libcamera: geometry: Add two-point Rectangle constructor
- libcamera: controls: Add ControlTypePoint
- libcamera: control_ids_draft: Add face detection controls
- libcamera: android: Add face detection control support
- libcamera: yaml_parser: Take string keys in `std::string_view`
- libcamera: camera: Fix CameraConfiguration spelling error
- libcamera: MappedFrameBuffer: Fix typo in comment formatting
- libcamera: controls: Add missing size to control_type<Point>
- libcamera: tracepoints: Fix copyright year for reproducible builds
- libcamera: controls: Add vendor information to ControlId
- libcamera: converter: Add interface for feature flags
- libcamera: converter: Add interface to support cropping capability
- libcamera: formats: Change bytesPerGroup of RGB565 and RGB565_BE from 3 to 2
- utils: checkstyle.py: Factor out common code to new CheckerBase class
- utils: checkstyle.py: Turn check() into a class method for all checkers
- utils: checkstyle.py: Print issues using __str__
- utils: checkstyle.py: Centralize dependency handling for checkers
- libcamera: camera_sensor: Introduce CameraSensorFactory
- libcamera: camera_sensor: Create abstract base class
- libcamera: camera_sensor: Sort factories by priority
- libcamera: pipeline_handler: Provide cancelRequest
- libcamera: simple: Track requests in conversionQueue_
- libcamera: Rationalize IPA and handlers names
- libcamera: Add debug control space
- libcamera: Add a DebugMetadata helper
- utils: Add script to generate control_ids_debug.yaml
- libcamera: yaml_parser: Use std::from_chars()
- libcamera: add DmaBufAllocator::exportBuffers()
- libcamera: Remove PipelineHandler Fatal check of non-empty MediaDevices
- libcamera: virtual: Add VirtualPipelineHandler
- libcamera: virtual: Add ImageFrameGenerator
- libcamera: virtual: Read config and register cameras based on the config
- meson: Don't unnecessarily fallback to libyuv wrap
- libcamera: Rename "shutter speed" to "exposure time"
- libcamera: camera_sensor_properties: Add sensor control delays
- libcamera: pipelines: Draw control delays from CameraSensor properties
- libcamera: Don't copy `StreamConfiguration` when iterating
- treewide: Avoid some copies in range-based for loops
- libcamera: v4l2_videodevice: Clarify V4L2M2MDevice
- libcamera: Extend u32 control type
- libcamera: Extend u16 control type
- libcamera: add method to set thread affinity
- libcamera: Copy Matrix class from libipa to libcamera
- libcamera: internal: Move Matrix class into libcamera namespace
- libcamera: internal: matrix: Replace vector with array in constructor
- libcamera: internal: Add Matrix class to build
- libcamera: mali-c55: Limit max size to sensor resolution
- libcamera: mali-c55: Limit ISP input size
- libcamera: mali-c55: Init camera properties
- libcamera: mali-c55: Simplify bufferReady()
- libcamera: mali-c55: Remove MaliC55CameraData::mbusCodes()
- libcamera: mali-c55: Add stride and size to rawConfig
- libcamera: v4l2-subdevice: Add Mali C55 media bus formats
- libcamera: bayer_format: Add 20-bit bayer formats
- libcamera: mali-c55: Propagate CSI-2 format to ISP
- libcamera: mali-c55: Correct input/output format representation
- libcamera: mali-c55: Enable links between resizer and video node
- libcamera: mali-c55: Enable usage of scaler
- libcamera: mali-c55: implement support for ScalerCrop
- libcamera: yaml_parser: Output more details when parsing fails
- libcamera: yaml_parser: Include stdlib.h instead of cstdlib
- libcamera: utils: StringSplitter: Inline some trivial methods
- libcamera: utils: StringSplitter: Add `operator==`
- libcamera: stream: Add operator<<(StreamConfiguration)
- libcamera: yaml_parser: Improve efficiency of string empty check
- libcamera: geometry: Add Rectangle::transformedBetween()
- libcamera: converter_v4l2_m2m: Add missing override specifier
- libcamera: converter_v4l2_m2m: Refactor get crop bounds code
- libcamera: converter: Add function to query crop bounds
- libcamera: converter: Add function to check if a stream was configured
- libcamera: converter: Add functions to adjust config
- libcamera: camera: Add a const version of the pipe() function
- libcamera: camera_sensor: Add parameter to limit returned sensor size
- libcamera: camera_sensor_properties: Add ov7251 and ov9281
- libcamera: rpi: Draw sensor delays from CameraSensorProperties
- include: linux: Add mali-c55-config.h
- include: linux: Add Mali-C55 Stats and Params V4L2 format
- libcamera: mali-c55: Acquire and plumb in 3a params and stats
- libcamera: controls: Populate direction field in control definitions
- utils: codegen: controls.py: Parse direction information
- libcamera: controls: Add support for querying direction information
- libcamera: controls: Update the ColourTemperature control to be writable
- utils: gen-debug-controls: Output direction flag
- hooks: pre-push: Verify that co-authors have a SoB line
- gitignore: Add venv directory to gitignore
- CameraManager: Ensure we cleanup on failure
- Add .editorconfig file
- DmaBufAllocator: Add Dma Buffer synchronization function & helper class
apps:
- apps: cam: Print control enum values more nicely
- py: Add bindings for ControlId enum name
- apps: cam: Print control array sizes
- apps: Replace HAVE_DNG with HAVE_TIFF
- apps: cam: Print an error when outputting DNG and DNG support is missing
- pycamera: Add missing code for ControlTypePoint
- apps: cam: Print control vendor information when listing controls
- py: Add bindings for ControlId vendor information
- qcam: Automatically select the camera if only one is available
- gstreamer: Implement caps negotiation for video/x-bayer
- v4l2: v4l2_camera_proxy: Fix VIDIOC_[GS]_PARM support
- gstreamer: Remove auto-focus-mode property from device provider
- gstreamer: Remove auto-focus-mode property from libcamerasrc
- gstreamer: Generate controls from control_ids_*.yaml files
- py: Add bindings for ControlId array information
- qcam: Use pointer when choosing camera
- gstreamer: keep same transfer with that in negotiated caps
- apps: cam: Print control direction information
pipeline:
- libcamera: software_isp: Remove superfluous includes
- libcamera: software_isp: Move BlackLevel to libcamera::ipa::soft
- libcamera: software_isp: Define skeletons for IPA refactoring
- libcamera: software_isp: Let IPASoftSimple inherit Module
- libcamera: software_isp: Make stats frame and buffer aware
- libcamera: software_isp: Remove final dots in debayer.cpp docstrings
- libcamera: software_isp: Track and pass frame ids
- libcamera: software_isp: Create algorithms
- libcamera: software_isp: Call Algorithm::configure
- libcamera: software_isp: Call Algorithm::queueRequest
- libcamera: software_isp: Call Algorithm::prepare
- libcamera: software_isp: Call Algorithm::process
- libcamera: software_isp: Move black level to an algorithm module
- libcamera: software_isp: Move color handling to an algorithm module
- libcamera: software_isp: Use floating point for color parameters
- libcamera: software_isp: Use DelayedControls
- libcamera: software_isp: Move exposure+gain to an algorithm module
- libcamera: software_isp: Update black level only on exposure changes
- pipeline: simple: Increase buffer count to four
- libcamera: rkisp1: Eliminate hard-coded resizer limits
- pipeline: rkisp1: Filter out sensor sizes not supported by the pipeline
- libcamera: software_isp: Improve wording in a comment
- libcamera: rkisp1: Integrate SensorConfiguration support
- libcamera: rkisp1: Clamp stream configuration to ISP limit on raw path
- libcamera: rkisp1: Use const reference for sensor configuration
- libcamera: rkisp1: Rectify SensorConfiguration check
- libcamera: rkisp1: Maintain alphabetical order of forward declarations
- libcamera: software_isp: Clear IPA context on configure and stop
- libcamera: software_isp: Get black level from the camera helper
- libcamera: software_isp: Black level from tuning file
- libcamera: pipeline: rkisp1: Fix typo in todo task
- libcamera: rkisp1: Prepare for additional camera controls
- libcamera: rkisp1: Plumb the dw100 dewarper as V4L2M2M converter
- pipeline: rpi: Remove CameraData::scalerCrop_
- pipeline: rpi: Pass crop rectangle as a parameter to platformSetIspCrop()
- pipeline: rpi: Introduce CameraData::CropParams
- pipeline: rpi: Track which ISP output is configured for a stream
- pipeline: rpi: Pass ISP output index into platformSetIspCrop()
- pipeline: rpi: Handler controls::rpi::ScalerCrops
- libcamera: rkisp1: Create main buffer pool out of if(!isRaw)
- libcamera: software_isp: Clean up pending requests on stop
- libcamera: pipeline: Add test pattern for VirtualPipelineHandler
- libcamera: software_isp: Refactor SoftwareIsp to use DmaBufAllocator::exportBuffers
- libcamera: software_isp: Initialize exposure+gain before agc calculations
- libcamera: software_isp: Remove unused IPAActiveState fields
- libcamera: software_isp: Actually apply black level from tuning data
- rkisp1: Use Matrix class from libcamera
- libcamera: software_isp: Add support for contrast control
- libcamera: software_isp: Add contrast control
- pipeline: rkisp1: Fix scope of dewarper stop() exit action
- pipeline: rkisp1: Keep aspect ratio on imx8mp
- pipeline: rkisp1: Split inputCrop and outputCrop
- pipeline: rkisp1: Reorder sensorInfo collection code
- pipeline: rkisp1: Query dewarper crop bounds if no stream configured
- pipeline: rkisp1: Fix ScalerCrop to be in sensor coordinates
- pipeline: rkisp1: Add ScalerMaximumCrop property
- pipeline: rkisp1: Refactor path validation
- pipeline: rkisp1: Enable the dewarper unconditionally
- pipeline: rkisp1: make RkISP1CameraConfiguration a friend of the pipeline handler
- pipeline: rkisp1: Fix config validation when dewarper is used
- pipeline: rkisp1: Limit sensor size to max resolution
- debayer_cpu: Replace syncing DMABUFs with DmaSyncer
- include: media-bus-formats: Add Mali-C55 mbus codes
- mali-c55: Plumb the IPA module in
ipa:
- ipa: rpi: Use std::abs()
- ipa: rpi: Replace last users of math.h
- ipa: rpi: awb: Add a const for the default colour temperature
- ipa: rpi: awb: Add a bias to the AWB search
- ipa: rkisp1: algorithms: agc: Check for correct stats type
- ipa: rkisp1: algorithms: awb: Check for correct stats type
- ipa: rpi: Add tuning files for OV7251
- ipa: libipa: Fix ExposureModeHelper function name in documentation
- ipa: rkisp1: Add constructor to the ipa context
- ipa: rkisp1: Add debug metadata support to the rkisp1
- ipa: libipa: Add data accessor to Histogram
- ipa: libipa: Add colour helpers
- ipa: ipu3: Use centralised libipa helpers
- ipa: rkisp1: Use centralised libipa helpers
- ipa: rpi: Use centralised libipa helpers
- ipa: rpi: awb: Disable CT search bias for Grey World AWB
- libipa: FCQueue: Make sure FrameContext#0 is initialized
- libcamera: libipa: camera_sensor: Provide helper and properties for Sony IMX462
- ipa: rpi: cam_helper: Add Sony IMX327
- ipa: raspberrypi: Add tuning file for IMX462 sensor
- ipa: raspberrypi: Add tuning file for IMX327 sensor
- libcamera: libipa: camera_sensor_helper: add IMX290 black level
- ipa: libipa: vector: Add mutable x(), y() and z() accessors
- ipa: libipa: vector: Add r(), g() and b() accessors
- ipa: libipa: vector: Add scalar constructor
- ipa: libipa: vector: Rename the dot product operator*() to dot()
- ipa: libipa: vector: Generalize arithmetic operators
- ipa: libipa: vector: Add missing binary arithemtic operators
- ipa: libipa: vector: Add compound assignment operators
- ipa: libipa: vector: Add element-wise min() and max() functions
- ipa: libipa: vector: Add sum() function
- ipa: ipu3: awb: Replace Awb::RGB class with ipa::RGB
- ipa: libipa: colour: Use the RGB class to model RGB values
- ipa: libipa: colour: Use Vector and Matrix for linear algebra
- ipa: rkisp1: awb: Use RGB class to store colour gains
- ipa: rkisp1: awb: Use Vector and Matrix for linear algebra
- ipa: rkisp1: awb: Expand comment
- libcamera: libipa: camera_sensor: Add GalaxyCore gc05a2 sensor properties
- libcamera: libipa: camera_sensor: Add GalaxyCore gc08a3 sensor properties
- ipa: rpi: Rename Matrix to Matrix3x3
- ipa: rpi: ccm: Replace local matrix implementation with the libcamera one
- libipa: Use Matrix class from libcamera
- libipa: Drop Matrix class
- libipa: agc_mean_luminance: Rename yaml key from exposure-time to exposureTime
- ipa: software_isp: Add constructor to the IPA context
- ipa: ipu3: Add constructor to the IPA context
- libcamera: libipa: camera_sensor_helper: Use `variant` instead of `union`
- ipa: rpi: Fix wrong frame integration difference value for OV9281
- ipa: rpi: cam_helper: imx708: Correct the frame integration diff value
- libipa: Centralise Fixed / Floating point convertors
- ipa: mali-c55: Add Mali-C55 ISP IPA module
- ipa: mali-c55: Add Agc algorithm
- ipa: mali-c55: Add BLC Algorithm
- ipa: mali-c55: Add AWB Algorithm
- ipa: mali-c55: Add Lens Shading Correction algorithm
- ipa: mali-c55: Add IMX415 tuning data file
- ipa: rkisp1: awb: Load white balance gains from tuning file
- ipa: rkisp1: awb: Implement ColourTemperature control
- ipa: rpi: awb: Make it possible to set the colour temperature directly
- ipa: libipa: Add Lux helper
- ipa: rkisp1: Add Lux algorithm module
- controls: rpi: Add a vendor rpi::ScalerCrops control
documentation:
- Documentation: guides: Fix FileSink source link
test:
- test: py: Fix log level restore in SimpleTestMethods()
- test: py: Replace environment array with environment object
- test: py: LD_PRELOAD the C++ standard library when using ASan
- test: libipa: Add Vector class test
- test: span: Use intended variable
tuning:
- utils: tuning: libtuning: Fix tuning for non RGGB RAWs
- libtuning: Use logging framework in ctt_awb.awb()
- libtuning: Remove the Cam object from ctt_awb.awb()
- libtuning: Fix access to color member in ctt_awb.awb()
- libtuning: Add initial AWB module
- utils: tuning: rkisp1: Replace static AWB with new AWB module
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
The yaml definitions for controls now require a direction attribute
which is not auto generated by gen-debug-controls.py. Fix that.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Add a lux algorithm module to rkisp1 IPA for estimating the lux level of
an image. This is reported in metadata, as well as saved in the frame
context so that other algorithms (mainly AGC) can use its value. It does
not set any controls.
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>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
|
|
Add a Lux helper to libipa that does the estimation of the lux level
given gain, exposure, and luminance histogram. The helper also
handles reading the reference values from the tuning file. These are
expected to be common operations of lux algorithm modules in IPAs, and
is modeled/copied from Raspberry Pi.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
|
|
ColourTemperature is now exported as a writable control so that
applications can set it directly. The AWB algorithm class now requires
a method to be provided to perform this operation. The method should
clamp the passed value to the calibrated range known to the algorithm.
The default range is set very wide to cover all conceivable future AWB
calibrations. It will always be clamped before use.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Tested-by: Stefan Klug <stefan.klug@ideasonboard.com>
|
|
The rkisp1 tuner used a static module to insert the AWB algorithm into
the tuning file. Replace that with the new AWB module.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
This AWB module uses the awb function from Raspberry Pi to calculate the
needed white balance gains per colour temperature. It stores these gains
in the tuning file.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
The color temperature member of the image object was named "col" in the
past. Now it is named "color" (which is still not very expressive).
There are still a few unspotted accesses to the col member. Fix them to
access the color member.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Replace the Cam object with a list parameter to be able to call the
ctt_awb.awb() function from libtuning code.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
To be able to use the awb function copied from the Raspberry Pi tuning
scripts in the libtuning code, we need to remove the Cam object. Use the
logging framework to replace all accesses to Cam.log.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
There are many use-cases (tuning-validation, working in static
environments) where a manual ColourTemperature control is helpful.
Implement that by interpolating and applying the white balance gains
from the tuning file according to the requested colour temperature. If
colour gains are provided on the same request, they take precedence.
Store the colour temperature used for a given frame in the frame context
and report that in metadata.
Note that in the automatic case, the colour gains are still based on the
gray world model and the CT curve from the tuning file get ignored.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
For the implementation of a manual colour temperature setting, it is
necessary to read predefined colour gains per colour temperature from
the tuning file. Implement this in a backwards compatible way. If no
gains are contained in the tuning file, loading just continues as
before.
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|