[v2,0/2] ipa: ipu3: Take the OV5670 black level from the sensor helper
mbox series

Message ID 20260908163708.341308-1-dmanresa@gmail.com
Headers show
Series
  • ipa: ipu3: Take the OV5670 black level from the sensor helper
Related show

Message

D. Manresa Sept. 8, 2026, 4:37 p.m. UTC
This replaces "ipa: ipu3: blc: Make the black level configurable" from
the first version of the series. As Dan pointed out, the black level is
a sensor property and belongs in the camera sensor helper rather than in
the tuning data, so:

- add the OV5670 black level (64 at 10 bits) to camera_sensor_helper.cpp;
- make the IPU3 BLC algorithm read it from the helper, converting the
  16-bit value to the ImgU OB grid units (half a 10-bit LSB), and keep
  the old hard-coded 64 with a warning for sensors without a helper
  value.

Measured on a Latitude 7275: with 64 the darkest percentile of Y is 32
with a U/V of 132/131 (a residual, colour-shifted pedestal); with 128 it
is 15 with U/V 128/128.

Changes in v2:
- Rework as helper + algorithm change instead of a tuning parameter
  (Dan Scally).

D. Manresa (2):
  ipa: libipa: camera_sensor_helper: Add OV5670 black level
  ipa: ipu3: blc: Use the black level from the camera sensor helper

 src/ipa/ipu3/algorithms/blc.cpp         | 56 +++++++++++++++++++++----
 src/ipa/ipu3/algorithms/blc.h           |  5 +++
 src/ipa/libipa/camera_sensor_helper.cpp |  2 +
 3 files changed, 54 insertions(+), 9 deletions(-)