[libcamera-devel] [PATCH 0/4] libcamera: Improve handling of fixed-size array controls
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Aug 10 02:29:02 CEST 2022
Hello,
This patch series builds up on top of Christian's "ibcamera: controls:
Generate and use fixed-sized Span types" patch to improve support of
fixed-size array controls. It started as an itch I wanted to scratch,
being bothered by the explicit Span construction in the Raspberry Pi IPA
module.
The series starts with patch 1/4 that refactors the gen-controls.py
script to make it (hopefully) more readable, without any functional
change. Patch 2/4 then improves the YAML notation for variable-size
array controls, and patch 3/4 extends the Control class to provide
access, at compilation time, to the control size in addition to its
type. The result is patch 4/4, which reverts usage of the explicit Span
constructor in the Rapsberry Pi IPA module.
As described in patch 3/4, this could be extended with the ability to
perform runtime checks on control sizes, but that's an exercise I'll
leave for later.
Laurent Pinchart (4):
utils: gen-controls: Factor out YAML data handling in classes
utils: gen-controls: Improve YAML notation for variable-size array
controls
libcamera: controls: Store array control size in Control class
ipa: raspberrypi: Remove unneeded Span casts
include/libcamera/controls.h | 20 +--
src/ipa/raspberrypi/raspberrypi.cpp | 19 ++-
src/libcamera/control_ids.yaml | 2 +-
src/libcamera/controls.cpp | 37 ++++--
src/libcamera/property_ids.yaml | 4 +-
utils/gen-controls.py | 195 +++++++++++++++++++++-------
6 files changed, 197 insertions(+), 80 deletions(-)
base-commit: e1ca213609abb99cc1b6e6f16214bf5a0936f3b7
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list