The network was trained against CT curves measured for PiSP, so use
those as results are generally a bit better.
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
When injecting input tensors, the output results are expected to be made
available at a specific frame. This change exports tensors' frameCount
so that an appropriate comparison can be made by the controlling
application.
Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
If the decimation width is greater than the max stats width, add a
centre crop on the image to allow the stats to be gathered correctly.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Look for the RAW mandatory stream flag in the pipeline handler config
file. If this flag is set, it guarantees that the application will
provide buffers for Unicam Image, so override the minUnicamBuffers and
minTotalUnicamBuffers config parameters in the following way:
- If startup drop frames are required, allocate at least 1 internal buffer.
- If no startup drop frames are required, do not allocate any internal buffers.
Look for the Output 0 mandatory stream flag in in the pipeline handler
config file. If this flag is set, it guarantees that the application
will provide buffers for the ISP, do not allocate any internal buffers
for the device.
Add a new rpi_apps.yaml pipeline handler config file that enables both
these flags. To use the file, set the following env variable for a
custom build:
export LIBCAMERA_RPI_CONFIG_FILE=/usr/local/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml
or for a packaged install:
export LIBCAMERA_RPI_CONFIG_FILE=/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
This warning is issued by the compiler because the strncpy copies across
the whole string array, leaving no place for the nul terminator. Fix it
by copying sizeof(str) - 1 elements.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Add a Sony IMX500 camera helper to the IPA. This also includes support
for the on-chip CNN hardware accelerator and parsing of the neural
network data stream returned in the metadata buffer.
Add tuning files for both VC4 and PiSP platforms.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Add code to handle the new CNN vendor controls in the Raspberry Pi IPA.
The value of CnnInputTensorInfo is cached as it is the only stateful
input control.
All other controls are output controls, and the values are copied into
directly from the rpiMetadata object if present. The camera helpers
populate the rpiMetadata object if the sensor supports on-board CNN
processing, such as the IMX500.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Add the follwing RPi vendor controls to handle Convolutional Neural
Network processing:
CnnOutputTensor
CnnOutputTensorInfo
CnnEnableInputTensor
CnnInputTensor
CnnInputTensorInfo
CnnKpiInfo
These controls will be used to support the new Raspberry Pi AI Camera,
using an IMX500 sensor with on-board neural network processing.
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
This release brings 142 commits with the largest developments in the core of
libcamera components. Perhaps the most obvious is that we now use C++20 for the
project. The Configuration file handling has had a substantial rework with
updates to the yaml_parser.
The RKISP1 IPA has now added a new Hue control which brought with it a rework
of how we manage fixed point arithmetic with the Quantized class. I hope this
makes it easier to convey types with hardware operations.
The SoftISP has the ability to perform CPU debaying with multiple threads which
helps throughput on platforms such as the Arduino Uno Q.
The Mali-C55 pipeline handler now has full support for the RZG2LCRU and inline
handling which enables camera support on the Renesas RZ/V2H and RZ/V2NP
platforms.
And of interest in the apps components, the gstreamer plugin now has the
ability to select and configure the sensor mode configuration properties.
Finally a new script "libcamera-bug-report" is available to be packaged which
will help users identify issues when reporting bugs.
Contributors:
64 Laurent Pinchart <laurent.pinchart@ideasonboard.com>
28 Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
21 Kieran Bingham <kieran.bingham@ideasonboard.com>
8 Hans de Goede <johannes.goede@oss.qualcomm.com>
7 Jacopo Mondi <jacopo.mondi@ideasonboard.com>
3 David Plowman <david.plowman@raspberrypi.com>
3 Milan Zamazal <mzamazal@redhat.com>
3 Naushir Patuck <naush@raspberrypi.com>
2 Stefan Klug <stefan.klug@ideasonboard.com>
1 Daniel Scally <dan.scally@ideasonboard.com>
1 Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
1 van Veen, Stephan <stephan.vanveen@karlstorz.com>
142 commits, 319 files changed, 5346 insertions(+), 8486 deletions(-)
Integration Overview:
ABI:
The abi-compliance checker reports 100% compatibility in this release,
so the SONAME is maintained at 0.7.
Validating ABI compatibility between v0.7.0 and v0.7.1
Preparing, please wait ...
Comparing ABIs ...
Comparing APIs ...
Creating compatibility report ...
Binary compatibility: 100%
Source compatibility: 100%
Total binary compatibility problems: 0, warnings: 0
Total source compatibility problems: 0, warnings: 0
The following commits in this release relate to either a bug fix or an
improvement to an existing commit.
bugs:
- libcamera: converter: converter_dw100_vertexmap: Fix dewarp parameter p2 handling
- Fixes: 1784e08be3 ("libcamera: dw100_vertexmap: Implement parametric dewarping")
- py: Disable `-Winvalid-offsetof`
- Link: https://github.com/pybind/pybind11/pull/5824
- libcamera: software_isp: Set initial values of DebayerParams
- Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/311
- py: Fix include order
- Link: https://github.com/python/cpython/issues/61322
- ipa: simple: Fix `again10` value with sensor helper
- Fixes: 950ca85e8a ("ipa: software_isp: AGC: Do not lower gain below 1.0")
- apps: qcam: Fix clang build
- Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/315
- apps: qcam: Show `QImageWriter` errors
- Link: https://gitlab.freedesktop.org/camera/libcamera/-/issues/313
- gstreamer: Add `-Wno-volatile` for GCC
- Link: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
- treewide: Use character literal instead of string in some cases
- Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
- Documentation: Enable treeview generation for doxygen < 1.13.0
- Fixes: 42d914f20c ("Documentation: Enable doxygen-awesome-css")
- gstreamer: Add sensor-config property
- Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/300
- utils: update-kernel-headers: Fix destination path
- Fixes: ee8f88fc64 ("include: linux: Add v4l2-isp.h")
- libcamera: egl: Remove `eGLImage::image_`
- Fixes: f520b29fe9 ("libcamera: software_isp: debayer_egl: Add an eGL Debayer class")
- libcamera: pipeline: rkisp1: Fix buffer queue memleaks
- Fixes: c8f63760e5 ("pipeline: rkisp1: Support raw Bayer capture at runtime")
- ipa: rpi: awb_nn: Rename YamlObject to ValueNode
- Fixes: 554c5c7fa1 ("libcamera: Rename YamlObject to ValueNode")
And the following updates have been made in this release, grouped by category:
core:
- libcamera: base: Add missing `private.h` includes
- meson: Add `libdw` option to control libdw dependency
- libcamera: converter: converter_dw100_vertexmap: Fix dewarp parameter p2 handling
- libcamera: controls: Define a new core Hue control
- libcamera: Replace iterators with structured bindings
- libcamera: Replace iterators with range-based for loops
- libcamera: Use `it` variable name for iterators only
- libcamera: Standardize on 'const auto'
- libcamera: rpi: Make the controller min frame duration configurable
- utils: Add missing SPDX headers to scripts
- meson: Ignore `Wredundant-move` with GCC 11 and above
- libcamera: base: log: Ignore deprecations
- treewide: Use character literal instead of string in some cases
- meson: Switch to C++20
- meson: Add options to control drm, sdl2, jpeg dependencies of `cam`
- meson: Add `apps-output-dng` option to control libtiff dependency
- meson: Drop unnecessary egl, gles feature defines
- meson: Add `egl.cpp` to sources alongside `debayer_egl.cpp`
- meson: Simplify condition
- meson: Remove `gles_headless_enabled`
- meson: Use dependency object when checking for headers
- meson: Move egl related dependencies to `software_isp` subdir
- meson: Guard softisp gpu acceleration with feature option: softisp-gpu
- utils: raspberrypi: Remove Raspberry Pi CTT from the source tree
- utils: raspberrypi: Add a README.md to the old RPi CTT directory
- libcamera: Make converter/softISP configure()'s outputCfgs argument really const
- utils: Introduce libcamera-bug-report
- libcamera: properties: Add a pipeline handler name property
- libcamera: camera: Report the pipeline handler name
- subprojects: Add nlohmann_json to .gitignore
- reuse: Convert to REUSE.toml
- reuse: Update file paths in REUSE.toml
- reuse: Drop unnecessary entry from REUSE.toml
- reuse: Add missing files to REUSE.toml
- libcamera: Add missing SPDX headers
- libcamera: rpi: Add missing SPDX headers
- include: linux: Convert drm_fourcc.h to use SPDX
- meson: Print soft ISP boolean options as YES/NO
- meson: Print missing application options in summary
- utils: update-kernel-headers: Fix destination path
- meson: Use <version> header for C++ library version check
- libcamera: egl: Remove `eGLImage::image_`
- utils: checkstyle: Add license commit checker
- libcamera: Drop unneeded usage of this pointer
- libcamera: Replace plain pointers with std::unique<>
- libcamera: pipeline_handler: Add createIPA() function
- libcamera: camera_manager: Move IPAManager creation to start() time
- libcamera: utils: Add overloaded visitor helpers
- libcamera: yaml_parser: Use std::make_unique<>
- libcamera: yaml_parser: Rename Container to ValueContainer
- libcamera: yaml_parser: Rename Getter to Accessor
- libcamera: yaml_parser: Replace getList() with get() specializations
- libcamera: yaml_parser: Add function to set a YamlObject value
- libcamera: yaml_parser: Add functions to add children
- libcamera: yaml_parser: Un-friend YamlParserContext from YamlObject
- libcamera: yaml_parser: Move Size handling to geometry.cpp
- libcamera: yaml_parser: Drop unneeded \fn Doxygen commands
- libcamera: yaml_parser: Split YamlObject from YamlParser
- libcamera: yaml_object: Miscellaneous documentation improvements
- libcamera: Rename YamlObject to ValueNode
- libcamera: value_node: Add constructor with value
- libcamera: value_node: Rework templates to prepare for mutable views
- libcamera: value_node: Add mutable adapters
- libcamera: value_node: Add mutable children accessors
- libcamera: value_node: Support adding nested children in one operation
- libcamera: value_node: Support looking up descendant node by path
- libcamera: value_node: Add functions to erase child nodes
- libcamera: Pass CameraManager around instead of GlobalConfiguration
- libcamera: global_configuration: Reorder functions
- libcamera: global_configuration: Add missing include and comment
- libcamera: global_configuration: Rename yamlConfiguration_
- libcamera: global_configuration: Rename Configuration to Option
- libcamera: global_configuration: Drop Option type
- libcamera: global_configuration: Populate empty configuration
- libcamera: global_configuration: Override options with environment variables
ipa:
- libcamera: ipa: simple: Fix multiplication order in Awb
- ipa: rkisp1: Fix awb algorithm brief
- ipa: simple: Remove duplicate header inclusion
- ipa: libipa: Provide a Quantized data type support
- ipa: libipa: fixedpoint: Fix unsigned usage
- ipa: libipa: Provide fixed point quantized traits
- ipa: rkisp1: cproc: Convert to use Quantized types
- ipa: rkisp1: cproc: Report metadata
- ipa: rkisp1: cproc: Provide a Hue control
- ipa: rkisp1: ccm: Use Q<4, 7> format directly
- ipa: mali-c55: Reduce AWB calculations to float precision
- ipa: mali-c55: Convert AWB to UQ<4, 8> usage
- ipa: mali-c55: agc: Quantise the ISP Digital Gain
- ipa: libipa: fixedpoint: Move float conversion inline
- ipa: rpi: awb_nn: Remove unused constexpr variable
- ipa: simple: Fix `again10` value with sensor helper
- ipa: libipa: quantized: Enable `constexpr` operation
- ipa: rpi: Fix gamma lookup table generation for PiSP platform
- utils: ipc: extract-docs: Work around reuse tool problem
- ipa: rpi: awb_nn: Rename YamlObject to ValueNode
pipeline:
- libcamera: software_isp: debayer: Take `DebayerParams` by ref
- libcamera: software_isp: Remove redundant include of time.h
- libcamera: software_isp: Fix LIBCAMERA_SOFTISP_MODE log print
- libcamera: software_isp: debayer_egl: Remove `frameSize()`
- libcamera: software_isp: Set initial values of DebayerParams
- libcamera: software_isp: Convert TODO list to markdown
- libcamera: software_isp: Move GPU TODO items to TODO.md
- libcamera: software_isp: debayer: Add missing `override`
- libcamera: software_isp: debayer_egl: Remove unnecessary declarations
- libcamera: pipeline: rkisp1: Fix buffer queue memleaks
- libcamera: mali-c55: Add RZG2LCRU class
- libcamera: mali-c55: Split TPG and Inline camera handling
- libcamera: mali-c55: Register memory input camera
- libcamera: mali-c55: Configure camera in memory-to-memory
- libcamera: mali-c55: Do not rely on bufferCount
- libcamera: mali-c55: Implement capture for memory-to-memory
- libcamera: mali-c55: Fix sensor size computation
test:
- test: Remove uses of `O_TMPFILE`
- test: libipa: Add tests for Quantized types
- test: libipa: Provide FixedPoint Quantized tests
- test: libipa: Remove legacy fixed point conversion test
- test: ipa: ipa_interface: Use IPAManager::createIPA()
- test: ipa: ipa_interface: Replace FIFO with pipe
- test: Add ValueNode unit test
- test: yaml-parser: Simplify test
- test: yaml-parser: Standardize on explicitly qualifying std namespace
- test: yaml-parser: Fix typos in error messages
- test: yaml-parser: Replace "object" with "node"
softisp:
- software_isp: benchmark: Add missing _ postfix to measure data member
- software_isp: benchmark: Print what is being benchmarked
- software_isp: swstats_cpu: Prepare for multi-threading support
- software_isp: debayer_cpu: Add DebayerCpuThread class
- software_isp: debayer_cpu: Add multi-threading support
- software_isp: Log input config from configure()
apps:
- android: camera_stream: Include <poll.h> instead of <sys/poll.h>
- py: Disable `-Winvalid-offsetof`
- py: Fix include order
- apps: qcam: Fix clang build
- apps: qcam: Show `QImageWriter` errors
- gstreamer: Add `-Wno-volatile` for GCC
- cam: Add option to report libcamera version
- gstreamer: Add sensor-config property
documentation:
- Documentation/runtime_configuration: Add missing software_isp.mode doc
- Documentation: Enable treeview generation for doxygen < 1.13.0
- Documentation: Update to C++20
- Documentation: Rename runtime configuration title
tuning:
- tuning: Handle macbeth_ref.pgm license through REUSE.toml
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
libcamera supports several environment variables that can override
configuration options. This requires components that use such overrides
to call the special envOption() and envListOption() functions, spreading
knowledge of the overrides through the code base. This will hinder
future enhancements to the global configuration, such as implementing
per-camera options that will override pipeline handler-level options. To
prepare for that, move handling of the environment variables to the
GlobalConfiguration class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
The GlobalConfiguration::Option type was introduced to decouple the
configuration option storage from its users, and make changes to the
underlying implementation easier. While the type could indeed be changed
to map to a different class, the API would need to remain the same. The
Option type therefore brings little value. Drop it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
global_configuration.h uses std::initializer_list, include the
corresponding header. Add a comment in global_configuration.cpp to close
an anonymous namespace, as mandated by the coding style.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Member functions should be implemented in the .cpp file in the same
order as in the class definition, within each access group. Move them to
the right location. While at it, move load() before loadFile() in the
class definition to match execution order, making the code easier to
read.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
The GlobalConfiguration is explicitly passed around through constructors
of various objects that need access to the configuration. This ad-hoc
solution works for the specific use cases it was meant to support, but
isn't very generic. We have a top-level object in libcamera, the
CameraManager, that also needs to be accessed from various locations and
is passed to object constructors. Standardize on passing the
CameraManager everywhere, and access the global configuration through
it.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
yaml-parser.cpp mixes unqualified and qualified identifier in the std
namespace. Standardize on qualified identifiers, and drop the
"using namespace std" statement.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Most of the tests in the YamlParser unit test cover the ValueNode class.
They are now implemented in the ValueNode unit test. Drop them, and only
keep the tests that related to YAML parsing.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Add a unit test for the ValueNode class. The tests focus on the class
itself, without considering that is currently only used when parsing
YAML files. This duplicates some of the tests of the YamlParser class,
which will be dropped from the corresponding unit test in a subsequent
change.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
There will be a need to erase child nodes when implementing support for
overriding configuration options. Add two erase() functions to the
ValueNode class, mimicking the add() API.
More erase() overloads could be added, for instance taking iterators as
parameters, to improve efficiency. This should be considered later, when
usage of the ValueNode class will expand, based on the actual usage
patterns.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
The GlobalConfiguration class will need to add nested children to a
ValueNode. Add a new overload to the add() function for this purpose.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Add two at() functions that return mutable pointer to child nodes, based
on an index for lists and a key for dictionaries.
The API differs from const children accessors that use operator[] and
return a reference in order to allow better error handling: while the
const accessors return a reference to a global instance of an empty
ValueNode when the requested child doesn't exist, a mutable accessor
can't do the same without allowing modifying the empty global instance.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
The ValueNode class was initially designed to store read-only property
trees. It is useful to also provide mutable access. Add non-const
adapters and iterators and adapters. This allows obtaining a mutable
ValueNode instance when traversing a tree.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
ValueNode provides adapter classes to expose the object as an iteratable
list or dictionary. The Iterator and Adapter classes hardcode the
assumption that the ValueNode is const. To prepare for mutable views,
move the const specifier to the top-level DictAdapter and ListAdapter
class templates.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
The YamlObject class is now a generic data container to model trees of
values. Rename it to ValueNode and expand the class documentation.
While at it, drop the unneeded libcamera:: namespace prefix when using
the ValueNode class.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Fix a few documentation issues:
- Drop unneeded \fn
- Sort \brief and \tparam correctly
- Add missing \tparam and \param
- Explain the T and U template parameters for get()
- Standardize the naming of dictionary keys as "key"
- Fix typo
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
The YamlObject class was designed to represent data parsed from YAML
files. It is outgrowing the initial needs. Move it to a separate file to
prepare for a rename.
Most files that include yaml_parser.h only need access to a YamlObject.
Switch them to yaml_object.h. pipeline_base.cpp was including
yaml_parser.h indirectly through pipeline_base.h, include it directly
now.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
The YamlObject::Accessor structure is designed to extend the YamlObject
class with new getter and setter types without modifying
yaml_parser.cpp. This feature is used for various libcamera classes,
while standard C++ types are handled in yaml_parser.cpp.
The Size class is an outlier: it is a libcamera class, but is handled in
yaml_parser.cpp. Move it to geometry.cpp. Drop the std::vector<Size>
specialization as it is currently unused.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
YamlParserContext is a friend of the YamlObject class to access private
member variables. Now that YamlObject exposes functions to set a value
and add children, this is not needed anymore. Decouple the two classes.
The YamlParserContext::readValue() function now takes a const reference
to the EventPtr as the YamlParserContext::parseNextYamlObject() function
needs to access it in the error handler.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Add YamlObject::add() functions to add children to a list or dictionary
object. This will be used by the YamlParserContext to replace direct
access to YamlObject member variables to decouple the two classes.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
The YamlObject class has two member function templates to get values:
the get() function gets a scalar value, while the getList() function
gets a vector of scalar values.
As get() is a function template, we can provide specializations for
vector types. This makes the code more systematic, and therefore more
readable. Replace all getList() occurrences, and drop the getList()
function.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
The YamlObject class defines two private types, Container and
ListContainer. The format is an alias to std::vector<Value>, and is used
to store child elements. The latter hasn't been used since commit
38987e165c ("libcamera: yaml_parser: Preserve order of items in
dictionary").
To prepare for upcoming reworks that will use the name 'Container' as a
template parameter, rename Container to ValueContainer for clarity, and
drop the unused ListContainer type.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Plumb in the MaliC55 pipeline handler support for capturing frames
from memory using the CRU.
Introduce a data flow which uses the CRU to feed the ISP through
the IVC.
In detail:
- push incoming request to a pending queue until a buffer from the CRU
is available
- delay the call to ipa_->fillParams() to the CRU buffer ready event
- once the IPA has computed parameters feed the ISP through the IVC
with buffers from the CRU, params and statistics
- Handle completion of in-flight requests: in m2m mode buffers are
queued earlier to the ISP capture devices. If the camera is stopped
these buffers are returned earlier in error state: complete the
Request bypassing the IPA operations
- As cancelled Requests might now be completed earlier then IPA events,
modify the IPA event handler to ignore Requests that have been
completed already
Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Do not rely on bufferCount for the allocation of parameters and stats
buffers but add instead kMaliC55BufferCount which is also used to limit
the number of in-flight requests supported by the pipeline handler.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Add support for memory-to-memory Camera to the
PipelineHandlerMaliC55::configure() function.
Start by enabling the IVC links, then configure the CRU and
propagate the format to the IVC.
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>