[libcamera-devel,0/4] libcamera: Improve handling of fixed-size array controls
mbox series

Message ID 20220810002906.5406-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • libcamera: Improve handling of fixed-size array controls
Related show

Message

Laurent Pinchart Aug. 10, 2022, 12:29 a.m. UTC
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