[0/5] Add AwbState metadata and AwbTrigger control
mbox series

Message ID 20260928-awb-state-v1-0-9b1bb8b9e51b@ideasonboard.com
Headers show
Series
  • Add AwbState metadata and AwbTrigger control
Related show

Message

Dan Scally Sept. 28, 2026, 11:13 a.m. UTC
Hello

This series adds a mode of operation to the AWB algorithm such that
the calculated gains can be "frozen" at a particular point, but later
prompted to re-calculate and then to re-freeze with a single control.

The main changes are:

1. The Awb algorithm's manual gains are updated from the automatic
   gains whenever AwbEnable == true. This means that setting
   AwbEnable = False will result in the gains "freezing" rather than
   jumping to the last-set manual values (unless a new set of values
   is passed at the same time).
2. The AwbLocked metadata item, which has no users, is removed.
3. A new metadata item named AwbState is added. This reports either
   "Locked" when AwbEnable is false, or "Searching" when the gains
   that the algorithm calculates for a frame are sufficiently changed
   from those previously calculated, or else "Converged".
4. A new control called AwbTrigger is added. This control is intended
   to be used only when AwbEnable == false (and therefore AwbState is
   "Locked"). When this control is passed with a request, AwbState
   will be reported as "Searching" until the algorithm converges, at
   which point the state returns to Locked and the manual gains are
   updated with the converged gains.

The change also brings the behaviour more in line with the Auto-focus
controls, which have a similar concept of operation.

Thanks
Dan

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
---
Daniel Scally (5):
      libcamera: controls: Expand AWB controls
      libcamera: vector: Add more comparison operators
      ipa: libipa: awb: Report AwbState
      ipa: libipa: awb: Update manual gains with automatic
      ipa: libipa: awb: Add AwbTrigger control

 include/libcamera/internal/vector.h  | 44 +++++++++++++++++
 src/ipa/libipa/awb.cpp               | 93 ++++++++++++++++++++++++++++++++++--
 src/ipa/libipa/awb.h                 |  6 +++
 src/libcamera/control_ids_core.yaml  | 44 ++++++++++++++---
 src/libcamera/control_ids_draft.yaml | 22 ---------
 5 files changed, 176 insertions(+), 33 deletions(-)
---
base-commit: 0024628dae48701da79e7522c8a057ba6a855201
change-id: 20260805-awb-state-56c6a4f95a24

Best regards,