When there are multiple entities between the sensor and CFE device (e.g.
a serialiser and deserialiser or multiple mux devices), the media graph
enumeration would work incorrectly and report that the frontend entity
was not found. This is because the found flag was stored locally in a
boolean and got lost in the recursion.
Fix this by explicitly tracking and returning the frontend found flag
through the return value of enumerateVideoDevices(). This ensures the
flag does not get lost through nested recursion.
This flag can also be used to fail a camera registration if the frontend
is not found.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Umang Jain <uajain@igalia.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
The `AeEnable` control is handled in `Camera::queueRequest()` but it
still reaches the pipeline handler because a single element cannot be
removed from a `ControlList`. So ignore it silently.
Fixes: ffcecda4d5 ("libcamera: pipeline: uvcvideo: Report new AeEnable control as available")
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
The description for computeTransform() when the desired orientation
cannot be achieved, can be expanded a further bit, to clearly report
that orientation will be adjusted to native camera sensor mounting
rotation.
Signed-off-by: Umang Jain <uajain@igalia.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>
Use the libyaml wrap file from the meson wrapdb instead of
creating the wrap file manually and using the cmake module.
This provides better integration with meson, such as the
`force_fallback_for` built-in option.
This is also needed because the upstream CMakeLists.txt is
out of date, failing with a sufficiently new cmake version:
CMake Error at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 has been removed from CMake.
The above is nonetheless addressed by https://github.com/yaml/libyaml/pull/314,
but the project seems a bit inactive at the moment.
The wrap file was added using `meson wrap install libyaml`,
and it can be updated using `meson wrap update libyaml`.
`default_library=static` is used to match the behaviour of the
previously used cmake build. `werror=false` needs to be set
because libyaml does not compile without warnings, and that
would abort the build process otherwise.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
In commit 6a09deaf7d ("controls: Add FrameWallClock control") the
existing SPDX was accidentally removed, likely from a rebase operation
at some point.
Unfortunately as this patch had already collected Reviewed-by tags, the
surruptious removal wasn't noticed until after it was merged.
Re-insert the existing SPDX and copyright banner as the header to the
control definitions file.
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
listed
For a list of log levels like LIBCAMERA_LOG_LEVELS="CatA:0,CatB:1" only
the severity of the last entry is correctly parsed.
Due to the change of level to a string_view in 24c2caa1c1 ("libcamera:
base: log: Use `std::string_view` to avoid some copies") the level is no
longer necessarily null terminated as it is a view on the original data.
Replace the check for a terminating null by a check for the end position
to fix the issue.
Fixes: 24c2caa1c1 ("libcamera: base: log: Use `std::string_view` to avoid some copies")
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Log level parsing doesn't always work as expected. Add a failing test
for 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>
g_steal_pointer) only preserves the type since glib 2.68, requiring
casts. Use std::exchange() instead.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
The Sharpness control is used solely by the Filter algorithm. Create it
there, to avoid exposing it to applications when the algorithm is
disabled.
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>
A ClockRecovery object is added for derived classes to use, and
wallclock timestamps are copied into the request metadata for
applications.
Wallclock timestamps are derived corresponding to the sensor
timestamp, and made available to the base pipeline handler class and
to IPAs, for both vc4 and pisp platforms.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
New controls are added to control the camera "sync" algorithm, which
allows different cameras to synchronise their frames. For the time
being, the controls are Raspberry Pi specific, though this is expected
to change in future.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
The ClockRecovery class takes pairs of timestamps from two different
clocks, and models the second ("output") clock from the first ("input")
clock.
We can use it, in particular, to get a good wallclock estimate for a
frame's SensorTimestamp.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Add a FrameWallClock control that reports the same moment as the
frame's SensorTimestamp, but in wallclock units.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Whenever a downstream element queries latency, libcamerasrc will always reply,
even though it has not yet determined the latency.
However some downstream elements (e.g. glvideomixer/aggregator) will query the
latency before libcamerasrc sets the caps. When these elements get the latency,
they will start the caps negotiation. Since libcamerasrc has not yet determined
caps, invalid negotiation is performed and workflow is disrupted.
So, set latency to 'GST_CLOCK_TIME_NONE' during initialization, and reply to the
query after libcamerasrc confirms the latency. At this time, libcamerasrc has also
completed caps negotiation and downstream elements work fine.
In addition, every time the src pad task stops, we reset the latency to
GST_CLOCK_TIME_NONE to ensure that when next time task starts, the downstream
elements can generate out buffers after receiving the effective latency.
Signed-off-by: Hou Qi <qi.hou@nxp.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This is how uvcvideo and rkisp1 do it. See ee918b370a
("ipa: rkisp1: agc: Initialize enum controls with a list of values")
for the motivation. In summary, having a list of values is used as a sign
that the control is an enum in multiple places (e.g. `cam`, `camshark`).
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Usage of NULL has slowly crept in the libcamerasrc sources. Replace it
with nullptr.
Reported-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
The caps object passeed to the gst_libcamera_create_video_pool()
function is managed as a g_autoptr() in the caller. The function doesn't
acquire any new reference, so it shouldn't call gst_caps_unref(). Fix
it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
The gst_libcamera_create_video_pool() function leaks a GstQuery instance
and a GstBufferPool instance in an error path. Fix the leaks with
g_autoptr().
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Now that the code is isolated in a function, the video_pool variable in
gst_libcamera_create_video_pool() can be renamed to pool without
clashing with another local variable. Do so to reduce line length.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Now that video pool creation is handled by a dedicated function, the
logic can be simplified by returning early instead of nesting scopes. Do
so to decrease indentation and improve readability, and document the
implementation of the function with comments.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
The gst_libcamera_src_negotiate() function uses 5 indentation levels,
causing long lines. Move video pool creation to a separate function to
increase readability.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
A const_cast<> was recently added to fix a compilation issue with older
GStreamer versions. Add a comment to indicate it can be removed when
bumping the minimum GStreamer version requirement. While at it, also
document a possible future improvement in the same function, and wrap
long lines.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
So far, imx8-isi pipeline supports _symetrical_ crossbar, with same
amount of sink and source pads.
But for some other imx SoCs, such as i.MX8QM or i.MX95, crossbar is not
symetric anymore.
Since each crossbar source is already captured as a pipes_ vector entry,
we use pipes_ vector's size to compute 1st source index.
"1st source index" = "total number of crossbar pads" - pipes_.count()
Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
The match() function returns a boolean type, while it could return int
in case of error when opening the capture file.
Fixes: 0ec982d210 ("libcamera: pipeline: Add IMX8 ISI pipeline")
Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
`plane` must be strictly less than the vector's size,
it cannot be equal to it.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Rename dropFrameCount_ to invalidCount_ to better reflect its use as
frames are no longer dropped by the pipeline handler.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
With the drop frame logic removed from the pipeline handler, these
member variables and not used, so remove them.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
With the previous change to not drop frames in the pipeline handler,
the "disable_startup_frame_drops" pipeline config option is not used.
Remove it, and throw a warning if the option is present in the YAML
config file.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Split the pipeline handler drop frame tracking into startup frames and
invalid frames, as reported by the IPA.
Remove the drop buffer handling logic in the pipeline handler. Now all
image buffers are returned out with the appropriate FrameStatus set
for startup or invalid frames.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Replace the dropFrameCount parameter returned from ipa::start() to the
pipeline handler by startupFrameCount and invalidFrameCount. The former
counts the number of frames required for AWB/AGC to converge, and the
latter counts the number of invalid frames produced by the sensor when
starting up.
In the pipeline handler, use the sum of these 2 values to replicate the
existing dropFrameCount behaviour.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Add a new status enum, FrameStartup, used to denote that even though
the frame has been successfully captured, the IQ parameters set by the
IPA will cause the frame to be unusable and applications are advised to
not consume this frame. An example of this would be on a cold-start of
the 3A algorithms, and there will be large oscillations to converge to
a stable state quickly.
Additional, update the definition of the FrameError state to cover the
usage when the sensor is known to produce a number of invalid/error
frames after stream-on.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Return `-EINVAL` from `Process::start()` if any of the file descriptors
are negative as those most likely signal some kind of issue such as
missed error checking.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Returning 0 when a running process is already managed can be confusing
since the parameters might be completely different, causing the caller
to mistakenly assume that the program it specified has been started.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Firstly, get the number of arguments first, and use that to determine the
size of the allocation instead of retrieving it twice.
Secondly, use `const_cast` instead of a C-style cast when calling `execv()`.
Third, use `size_t` to match the type of `args.size()`.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
A `Process` object has address identity because a pointer to it is
stored inside the `ProcessManager`. However, copy/move special
methods are still generated by the compiler. So disable them to
avoid potential issues and confusion.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
The default argument already takes care of passing no fence to
`addBuffer()`, so there is no reason to specify `nullptr` explicitly.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
The abi-compliance checker reports 100% compatibility in this release.
As such the SONAME is maintained at 0.5.
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0
This release brings 93 commits with a large proportion of fixes and
cleanup againt earlier releases. Improvements have been made to the
Raspberry Pi Camera Tuning Tools, and the geometry, matrix and vector
class helpers have been expanded for greater reuse throughout the
project.
Notably for packagers - IPA modules now have their own subdirectory
which should prevent undesirable surrupticious error messages that would
occur if packagers choose to install the V4L2 adaptation layer in the
same folder as the IPA modules.
The RKISP1 can now adapt to more complex input pipelines, including
FPGAs and multiplexors, which has been beneficial for users on the
i.MX8MP, and the IPA algorithms for i.MX8MP and RKISP1 continue to get
improvements.
The software ISP has a new Saturation control (available when the CCM is
enabled).
The Documentation and pipeline handler writers guide has been
re-reviewed and cleaned up.
On the application and test side, lc-compliance now includes
multi-stream tests, and cam has extended support for display formats and
now prevents issues on non-display GPUs when rendering direct to DRM.
Contributors:
36 Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
15 Stefan Klug <stefan.klug@ideasonboard.com>
5 David Plowman <david.plowman@raspberrypi.com>
5 Kieran Bingham <kieran.bingham@ideasonboard.com>
5 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
4 Milan Zamazal <mzamazal@redhat.com>
4 Quentin Schulz <quentin.schulz@cherry.de>
3 Daniel Scally <dan.scally@ideasonboard.com>
3 Paul Elder <paul.elder@ideasonboard.com>
2 Hou Qi <qi.hou@nxp.com>
2 Julien Vuillaumier <julien.vuillaumier@nxp.com>
2 Naushir Patuck <naush@raspberrypi.com>
2 Niklas Söderlund <niklas.soderlund@ragnatech.se>
2 Pavel Machek <pavel@ucw.cz>
1 Benjamin Mugnier <benjamin.mugnier@foss.st.com>
1 Nícolas F. R. A. Prado <nfraprado@collabora.com>
1 Sven Püschel <s.pueschel@pengutronix.de>
108 files changed, 3359 insertions(+), 528 deletions(-)
Integration overview:
The following commits in this release relate to either a bug fix or an
improvement to an existing commit.
- meson: Do not automatically build documentation if sphinx-build-3 is found
- Fixes: aba567338b ("Documentation: Move all dependencies into features")
- Revert "libcamera: rkisp1: Eliminate hard-coded resizer limits"
- Fixes: 761545407c ("pipeline: rkisp1: Filter out sensor sizes not supported by the pipeline")
- pipeline: rkisp1: Fix vblank delay
- Fixes: f72c76eb6e ("rkisp1: Honor the FrameDurationLimits control")
- utils: raspberrypi: ctt: Fix NaNs in lens shading tables
- Bug: https://github.com/raspberrypi/libcamera/issues/254
- utils: raspberrypi: ctt: Fix NaNs in chromatic aberration tables
- Bug: https://github.com/raspberrypi/libcamera/issues/254
- utils: raspberrypi: ctt: Fix integer division error calculating LSC cell size
- Bug: https://github.com/raspberrypi/libcamera/issues/260
- apps: qcam: Push the viewfinder role to vector
- Fixes: ee2b011b65 ("apps: cam: Try raw role if default viewfinder role fails")
- ipa: Move IPA installations to a subdir
- Bug: https://bugs.libcamera.org/show_bug.cgi?id=268
- ipa: rkisp1: algorithms: awb: Fix wrong colour temperature reporting
- Fixes: b60bd37b1a ("ipa: rkisp1: Move calculation of RGB means into own function")
- ipa: rkisp1: ccm/lsc: Fix CCM/LSC based on manual color temperature
- Fixes: 0230880954 ("ipa: rkisp1: awb: Implement ColourTemperature control")
- libcamera: controls: Fix `ControlInfoMap::count(unsigned int)`
- Fixes: 76b9923e55 ("libcamera: controls: Avoid exception in ControlInfoMap count() and find()")
- apps: cam: capture_script: Disallow arrays of strings
- Fixes: b35f04b3c1 ("cam: capture_script: Support parsing array controls")
- libcamera: matrix: Fix compilation error in inverse() function
- Fixes: 6287ceff5a ("libcamera: matrix: Add inverse() function")
- ipa: rpi: controller: rpi: Fix colour gain typo in AGC
- Fixes: 29892f1c56 ("ipa: libipa: colour: Use the RGB class to model RGB values")
And the following updates have been made in this release, grouped by category:
core:
- meson: Make the default value of "documentation" feature explicit
- meson: Do not automatically build documentation if sphinx-build-3 is found
- libcamera: request: Avoid double map lookup
- utils: rkisp1: gen-csc-table: Support printing CCM in decimal
- libcamera: ipa_module: Avoid unnecessary copy when getting signature
- libcamera: controls: Disallow arrays of arrays
- libcamera: media_device: Add helper to return matching entities
- libcamera: internal: Add MediaPipeline helper
- libcamera: stream: Add color space to configuration string representation
- README.rst: remove unnecessary dependency for qcam
- libcamera: v4l2_videodevice: Log buffer count on allocation error
- libcamera: matrix: Replace SFINAE with static_asserts
- libcamera: matrix: Make most functions constexpr
- libcamera: matrix: Add a Span based constructor
- libcamera: vector: Add a Span based constructor
- libcamera: matrix: Add inverse() function
- libcamera: matrix: Extend multiplication operator to heterogenous types
- libcamera: vector: Extend matrix multiplication operator to heterogenous types
- libcamera: controls: Fix `ControlInfoMap::count(unsigned int)`
- utils: codegen: Make users depend on `controls.py` in meson
- libcamera: matrix: Fix compilation error in inverse() function
- libcamera: sensor: Fix the gain delay for IMX283
- treewide: Do not use `*NameValueMap` for known values
- utils: codegen: ipc: Use `any()` instead of `len([]) > 0`
- utils: codegen: ipc: Remove `namespace` argument
- utils: codegen: ipc: Add `deserializer()` function
- utils: codegen: ipc: Log error code when remote call fails
- utils: codegen: ipc: Simplify `return` statements
- libcamera: ipa_data_serializer: Remove some vector `reserve()` calls
- libcamera: mali-c55: Remove tpgCodes_
- libcamera: mali-c55: Remove tpgSizes_ member from MaliC55CameraData
- libcamera: process: Use _exit in child process
- libcamera: process: Pass stderr and reserve stdin and stdout fds
- guides: pipeline-handler: Update name of pipeline handler stop function
- libcamera: mali-c55: Fix error paths in ::init()
pipeline:
- libcamera: software_isp: Add a clarification comment to AWB
- libcamera: pipeline: uvcvideo: Expose `Gamma` control
- libcamera: software_isp: Fix CCM multiplication
- libcamera: pipeline: virtual: Fix typo in log message
- libcamera: pipeline: imx8-isi: Remove unused variable
- pipeline: rkisp1: Fix vblank delay
- libcamera: pipeline: rkisp1: Convert to use MediaPipeline
- libcamera: pipeline: uvcvideo: Report new AeEnable control as available
- ipu3: cio2: Remove unused function definition
- libcamera: software_isp: Add saturation control
- Revert "libcamera: rkisp1: Eliminate hard-coded resizer limits"
apps:
- apps: lc-compliance: Support multiple streams in helpers
- apps: lc-compliance: Add multi-stream tests
- apps: cam: capture_script: Simplify bool array parsing
- gstreamer: Fixate colorimetry field during caps negotiation
- apps: cam: Try raw role if default viewfinder role fails
- apps: qcam: Push the viewfinder role to vector
- py: Set `PYTHONPATH` in devenv
- apps: cam: sdl_texture: Take list of buffers in span
- apps: cam: sdl_texture: Drop `&rect_` from `SDL_Update{NV,}Texture()` call
- apps: cam: sdl_texture: Add `SDLTexture1Plane`
- apps: cam: sdl_sink: Support more single-plane formats
- gstreamer: Add GstVideoMeta support
- apps: cam: capture_script: Disallow arrays of strings
- apps: cam: Skip non-display GPUs
ipa:
- utils: ipc: Do not duplicate signals in proxy object
- utils: ipc: Do not define variables in signal handler up front
- ipa: rpi: common: Avoid warnings when AeEnable control is used
- ipa: rpi: awb: Remove "fast" parameter
- ipa: Move IPA installations to a subdir
- ipa: rkisp1: awb: Declare ControlInfo in AWB
- ipa: rkisp1: awb: Ignore empty AWB statistics
- ipa: rkisp1: Refactor automatic/manual structure in IPAActiveState
- ipa: rkisp1: algorithms: awb: Fix wrong colour temperature reporting
- ipa: rkisp1: ccm/lsc: Fix CCM/LSC based on manual color temperature
- ipa: rkisp1: Implement manual ColourCorrectionMatrix control
- libipa: awb: Make result of gainsFromColourTemp optional
- ipa: rkisp1: Damp color temperature regulation
- ipa: rkisp1: awb: Take the CCM into account for the AWB gains calculation
- ipa: rkisp1: awb: Avoid division by zero
- ipa: rpi: controller: rpi: Fix colour gain typo in AGC
- ipa: rpi: Add tuning for IMX283
- ipa: rpi: Prevent segfault if AGC algorithm is absent
tuning:
- utils: raspberrypi: ctt: Fix NaNs in lens shading tables
- utils: raspberrypi: ctt: Fix NaNs in chromatic aberration tables
- utils: raspberrypi: ctt: Fix integer division error calculating LSC cell size
documentation:
- Documentation: guides: pipeline-handler: Fix camera creation
- Documentation: guides: pipeline-handler: Fix property list file name
- Documentation: guides: pipeline-handler: Fix configuration creation
- Documentation: guides: pipeline-handler: Fix `Camera::create()` link
- Documentation: guides: pipeline-handler: Simplify format collection
- Documentation: guides: pipeline-handler: Query pixel formats once
- Documentation: guides: application-developer: Remove unnecessary argument
- Documentation: Fix `INCLUDE_PATH` doxygen configuration option
- doc: Mention right meson version
- doc: document libtiff dependency for cam
test:
- test: Add minimal test for Matrix
- lc-compliance: Move camera setup to CameraHolder class
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
libcamera header files should be included using the `libcamera/...` prefix.
However, `INCLUDE_PATH` is currently set to `@TOP_SRCDIR@/include/libcamera`
meaning that doxygen, when encountering `libcamera/x.h`, will try to open
`@TOP_SRCDIR@/include/libcamera/libcamera/x.h`, which is not the correct
path.
Fix that by using `@TOP_{BUILD,SRC}DIR@/include`. This removes the extra
`libcamera` component from the path and adds the corresponding directory
from the build directory as well since that is an implicit include
directory added by meson.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.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>
Saturation control is added on top of the colour correction matrix. A
method of saturation adjustment that can be fully integrated into the
colour correction matrix is used. The control is available only if Ccm
algorithm is enabled.
The control uses 0.0-2.0 value range, with 1.0 being unmodified
saturation, 0.0 full desaturation and 2.0 quite saturated.
The saturation is adjusted by converting to Y'CbCr colour space,
applying the saturation value on the colour axes, and converting back to
RGB. ITU-R BT.601 conversion is used to convert between the colour
spaces, for no particular reason.
The colour correction matrix is applied before gamma and the given
matrix is suitable for such a case. Alternatively, the transformation
used in libcamera rpi ccm.cpp could be used.
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
In the MaliC55CameraData::init() function there are two places that
return values they shouldn't; the ret variable is returned after
checking a pointer is not null instead of an explicit -ENODEV and later
the boolean value false is returned on failure instead of the error
value returned by V4L2Subdevice::open() - fix both problems.
Signed-off-by: Daniel Scally <dan.scally@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>
Since commit f6b6f15b54 ("libcamera: pipeline: Introduce
stopDevice()") the stop function needed to be implemented by pipeline
handlers was renamed to stopDevice().
Update the pipeline handler writers guide to match this.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jai Luthra <jai.luthra@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
The private function cio2BufferReady is defined but not implemented or
used, remove it for the class definition.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Device::openCard() in the cam DRM helpers looks for a /dev/dri/card*
device that can be opened and that doesn't fail when asked about
DRM_CAP_DUMB_BUFFER capability (regardless whether the capability is
supported by the device).
There can be matching devices that are not display devices. This can
lead to selection of such a device and inability to use KMS output with
the `cam' application. The ultimate goal is to display something on the
device and later the KMS sink will fail if there is no connector
attached to the device (although it can actually fail earlier, when
trying to set DRM_CLIENT_CAP_ATOMIC capability if this is not
supported).
Let's avoid selecting devices without connectors, CRTCs or encoders.
The added check makes the original check for DRM_CAP_DUMB_BUFFER API
most likely unnecessary, let's remove it.
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Even without AGC definition in the tuning file, the application would
still dereference agc unconditionally, leading to a segmentation fault
if AGC is absent.
This is relevant for sensors already providing AGC/AEC by themselves.
Check if AGC is present prior to setting maximum exposure time.
Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> # RPi4 + imx708_wide
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
When a child process is started from Process::start(), the file
descriptors inherited from the parent process are closed, except
the ones explicitly listed in the fds[] argument.
One issue is that the file descriptors for stdin, stdout and stderr
being closed, the subsequent file descriptors created by the child
process will reuse the values 0, 1 and 2 that are now available.
Thus, usage of printf(), assert() or alike may direct its output
to the new resource bound to one of these reused file descriptors.
The other issue is that the child process can no longer log on
the console because stderr has been closed.
To address the 2 issues, Process:start() is amended as below:
- Child process inherits from parent's stderr fd in order to share
the same logging descriptor
- Child process stdin, stdout and stderr fds are bound to /dev/null
if not inherited from parent. That is to prevent those descriptors
to be reused for any other resource, that could be corrupted by
the presence of printf(), assert() or alike.
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Use _exit() in child process in case of execv() error. That is to
avoid interfering with the parent process as exit() may call its
atexit() handlers and flush its io buffers.
Signed-off-by: Julien Vuillaumier <julien.vuillaumier@nxp.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>
The tpgSizes_ vector is only used within the initTPGData() function.
Drop it and use a local variable instead.
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
MaliC55CameraData stores a vector of the TPG's mbus codes (if the
camera in question is a TPG). This is never used - remove it.
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
`appendPOD()` does a single insertion, so if only a single `appendPOD()`
will be called on a vector before returning, then calling `reserve()`
is not that useful, so remove it.
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>