[v2,2/3] ipa: simple: data: Add OV2740 tuning file
diff mbox series

Message ID 20260508171722.53AD71EA0070@mailuser.phl.internal
State New
Headers show
Series
  • ipa: simple: OV2740 tuning file and swstats sumShift cleanup
Related show

Commit Message

Javier Tia May 8, 2026, 4:51 p.m. UTC
Add a tuning file for the OV2740 sensor calibrated from the Intel IPU6
AIQB binary (OV2740_CJFLE23_ADL.aiqb) shipped with the Lenovo ThinkPad
X1 Carbon Gen 10 (Alder Lake, JP2 module, Chicony CJFLE23 camera).

Black level is 0x40 at 10-bit (64 ADU), stored as the 16-bit value 4096
per the BlackLevel algorithm convention (value >> 8 = 16 at 8-bit scale).

AWB gain limits are derived from the minimum R/G and B/G chromaticities
across the 8 calibrated illuminants (2319 K to 6302 K), with a 10%
headroom margin: maxGainR=2.49, maxGainB=3.07.

Eight CCMs are extracted from the AIQB advanced color matrix records
(record id=25, float format), covering illuminants from 2319 K
(incandescent) to 6302 K (daylight).

Signed-off-by: Javier Tia <floss@jetm.me>
---
 src/ipa/simple/data/meson.build |  1 +
 src/ipa/simple/data/ov2740.yaml | 52 +++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 src/ipa/simple/data/ov2740.yaml

Patch
diff mbox series

diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build
index 92795ee4..e3e4de74 100644
--- a/src/ipa/simple/data/meson.build
+++ b/src/ipa/simple/data/meson.build
@@ -1,6 +1,7 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
 conf_files = files([
+    'ov2740.yaml',
     'uncalibrated.yaml',
 ])
 
diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml
new file mode 100644
index 00000000..da7e1efe
--- /dev/null
+++ b/src/ipa/simple/data/ov2740.yaml
@@ -0,0 +1,52 @@ 
+# SPDX-License-Identifier: CC0-1.0
+# Calibrated from OV2740_CJFLE23_ADL.aiqb (Lenovo JP2 module, IPU6 ADL)
+%YAML 1.1
+---
+version: 1
+algorithms:
+  - BlackLevel:
+      blackLevel: 4096
+  - Awb:
+      maxGainR: 2.49
+      maxGainB: 3.07
+      speed: 0.25
+  - Ccm:
+      ccms:
+        - ct: 2319
+          ccm: [  1.5938, -0.1714, -0.4224,
+                 -0.6134,  1.9612, -0.3478,
+                 -0.4710, -1.8500,  3.3210 ]
+        - ct: 2854
+          ccm: [  1.6119, -0.3132, -0.2987,
+                 -0.4418,  1.8227, -0.3809,
+                 -0.1017, -1.3958,  2.4975 ]
+        - ct: 2884
+          ccm: [  1.7739, -0.6655, -0.1085,
+                 -0.4113,  1.6619, -0.2506,
+                 -0.0150, -1.1661,  2.1811 ]
+        - ct: 3239
+          ccm: [  1.8298, -0.6636, -0.1662,
+                 -0.4086,  1.7373, -0.3287,
+                 -0.0500, -1.0836,  2.1335 ]
+        - ct: 3865
+          ccm: [  1.8836, -0.7430, -0.1406,
+                 -0.3653,  1.7000, -0.3348,
+                 -0.0542, -0.8442,  1.8984 ]
+        - ct: 4136
+          ccm: [  1.9043, -0.8348, -0.0695,
+                 -0.3241,  1.6389, -0.3148,
+                  0.0262, -0.9593,  1.9332 ]
+        - ct: 4939
+          ccm: [  1.6371, -0.4490, -0.1881,
+                 -0.2675,  1.6494, -0.3819,
+                 -0.0245, -0.7782,  1.8026 ]
+        - ct: 6302
+          ccm: [  1.6401, -0.4418, -0.1984,
+                 -0.2360,  1.7191, -0.4832,
+                 -0.0248, -0.7221,  1.7469 ]
+  - Adjust:
+      gamma: 2.2
+      contrast: 1.0
+      saturation: 1.0
+  - Agc:
+...