[RFC,v2,0/1] ipa: libipa: awb: Support modules calibrated with gains below 1.0
mbox series

Message ID 20260829093523.41754-1-dmanresa@gmail.com
Headers show
Series
  • ipa: libipa: awb: Support modules calibrated with gains below 1.0
Related show

Message

D. Manresa Aug. 29, 2026, 9:35 a.m. UTC
Hello,

v2 of the AWB minimum-gain series, following Kieran's review of v1.

This comes out of bringing the front camera of the Microsoft Surface
Pro 7+ (an OV5693 behind an IPU6, driven by the simple pipeline and the
software ISP) to match the colours the Windows 11 stack produces on the
same hardware. The OEM calibration Microsoft ships in the public
Surface driver package stores per-illuminant sensor white points, and
the one for this module needs a red gain of 0.87 at 2592 K - below the
1.0 floor AwbAlgorithm applies. The patch makes the floor tunable
through a new optional "gainMin" tuning file property, keeping the 1.0
default so no existing platform changes behaviour.

Changes in v2:
- Reworded the rationale for the 1.0 floor in the commit message and in
  both comments: it is a policy choice (attenuating a channel discards
  part of its dynamic range), not a hardware limitation, as Kieran
  pointed out.
- Added to the commit message the raw evidence Kieran asked for: raw
  captures of this module under an incandescent lamp show the red
  channel at ~1.15x green on a white surface, matching the decoded OEM
  white point. Full numbers, per-channel histograms and the capture
  methodology are in the v1 thread and archived at:
  https://github.com/dmanresa-saes/surface-ipu6-cameras/tree/master/docs/measurements

The question from the v1 cover letter stands: the alternative -
trusting the platform gain range alone and dropping the floor - is
simpler, and I would value the maintainers' view on which is preferred.

The patch was developed with AI assistance (Claude) and verified on
Surface Pro 7+ hardware against Windows 11 renditions of the same
scenes.

Thanks,
D. Manresa

D. Manresa (1):
  ipa: libipa: awb: Allow tuning files to lower the minimum gain

 src/ipa/libipa/awb.cpp |  5 +++++
 src/ipa/libipa/awb.h   | 16 +++++++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

--
2.43.0