[0/6] libipa: Introduce a Quantized type
mbox series

Message ID 20251026233048.175689-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • libipa: Introduce a Quantized type
Related show

Message

Kieran Bingham Oct. 26, 2025, 11:30 p.m. UTC
This series superceeds [0] "rkisp1: cproc - Metadata and Hue
developments" by introducing a new base type for libipa to be able to
maintain values which are quantized for hardware.

These data values often need to be converted, perhaps to a fixed-point
format for configuration of hardware, but also then back to a floating
point for returning as metadata.

In particular this series builds to solve the review comment that
blocked the original series at [1]

The Quantized type provides a protected storage mechanism to make both
of these storage representations visible to code that wishes to utilise
the specific values, but only through read only accessors.

Any write access must be performed through a Quantizer ... a derived
type which introduces the mechanism to update the data store, always
ensuring to update both values at the same time.

The series then re-introduces the proposed updates to cproc using the
new mechanisms.

[0] https://patchwork.libcamera.org/project/libcamera/list/?series=5245
[1] https://patchwork.libcamera.org/patch/23645/#34626

If this new base Quantized type can be accepted, I believe a good next
step is to provide a FixedPointQuantizer and extend the tests of the
current fixed point helpers, allowing fixed point conversions to be
simplified through out.


Kieran Bingham (5):
  libipa: Provide a Quantized type and Quantizer support
  test: libipa: Add tests for Quantizers
  ipa: rkisp1: cproc: Convert to use Quantized types
  ipa: rkisp1: cproc: Report metadata
  ipa: rkisp1: cproc: Provide a Hue control

van Veen, Stephan (1):
  libcamera: controls: Define a new core Hue control

 src/ipa/libipa/meson.build          |   2 +
 src/ipa/libipa/quantized.cpp        | 167 ++++++++++++++++++++++++++++
 src/ipa/libipa/quantized.h          |  90 +++++++++++++++
 src/ipa/rkisp1/algorithms/cproc.cpp | 117 ++++++++++++++++---
 src/ipa/rkisp1/algorithms/cproc.h   |   4 +
 src/ipa/rkisp1/ipa_context.h        |  15 ++-
 src/libcamera/control_ids_core.yaml |  13 +++
 test/ipa/libipa/meson.build         |   1 +
 test/ipa/libipa/quantized.cpp       | 149 +++++++++++++++++++++++++
 9 files changed, 534 insertions(+), 24 deletions(-)
 create mode 100644 src/ipa/libipa/quantized.cpp
 create mode 100644 src/ipa/libipa/quantized.h
 create mode 100644 test/ipa/libipa/quantized.cpp