[1/1] ipa: softisp: Add tuning data for the ov13858 and ov5693
diff mbox series

Message ID 179449520935.395739.5332075053517783570@debian.org
State Superseded
Headers show
Series
  • ipa: softisp: Add tuning data for the Surface Pro 8 cameras
Related show

Commit Message

Emfox Zhou Nov. 12, 2026, 2:53 p.m. UTC
The patch that the previous message was the cover for; it went out without
the attachment, sorry for the noise.

The black level is left to the sensor helper rather than set in these files.

Emfox

Comments

Jacopo Mondi Nov. 12, 2026, 3:09 p.m. UTC | #1
Hi Emfox Zhou

On Thu, Nov 12, 2026 at 10:53:29PM +0800, Emfox Zhou wrote:
> The patch that the previous message was the cover for; it went out without
> the attachment, sorry for the noise.

Patches are not expected as attachments :)

They should be sent in-line, through git-send-email or b4.

Documentation/contributing.rst has some links that might be useful.

Thanks
  j
>
> The black level is left to the sensor helper rather than set in these files.
>
> Emfox

Patch
diff mbox series

From cc83260240d2e91a560b1bd046fc9a1991ed3d65 Mon Sep 17 00:00:00 2001
From: Emfox Zhou <emfox@debian.org>
Date: Thu, 12 Nov 2026 22:27:29 +0800
Subject: [PATCH] ipa: softisp: Add tuning data for the ov13858 and ov5693

Both sensors are the cameras of the Surface Pro 8, the ov13858 at the back
and the ov5693 in front, behind the Intel IPU6. With no tuning file of
their own they fall back to uncalibrated.yaml, which has grey world AWB and
no colour correction.

The colour gains and matrices are the ones the module vendor ships in the
AIQB blob that comes with the Windows camera driver of this machine, six
light sources for the ov13858 (2514 K to 6366 K) and seven for the ov5693
(2592 K to 6905 K). The gains are the inverse of the calibrated white
point of each source and its matrix has rows summing to one, so the two
cannot disagree with each other.

Tested on a Surface Pro 8 with the software ISP, exposure and gain set by
hand so that AGC does not move between runs. With the fallback file the
ISP reports grey world gains of [1.081, 1.071]; with these files the AWB
reaches the 3786 K entry of the table and reports [1.603, 1.530]. On the
same frame the mean saturation at the centre of the picture goes from 0.16
to 0.31.

Signed-off-by: Emfox Zhou <emfox@debian.org>
---
 src/ipa/softisp/data/meson.build  |  2 +
 src/ipa/softisp/data/ov13858.yaml | 70 ++++++++++++++++++++++++++++
 src/ipa/softisp/data/ov5693.yaml  | 77 +++++++++++++++++++++++++++++++
 3 files changed, 149 insertions(+)
 create mode 100644 src/ipa/softisp/data/ov13858.yaml
 create mode 100644 src/ipa/softisp/data/ov5693.yaml

diff --git a/src/ipa/softisp/data/meson.build b/src/ipa/softisp/data/meson.build
index fd9aa0f..c775edd 100644
--- a/src/ipa/softisp/data/meson.build
+++ b/src/ipa/softisp/data/meson.build
@@ -1,6 +1,8 @@ 
 # SPDX-License-Identifier: CC0-1.0
 
 conf_files = files([
+    'ov13858.yaml',
+    'ov5693.yaml',
     'uncalibrated.yaml',
 ])
 
diff --git a/src/ipa/softisp/data/ov13858.yaml b/src/ipa/softisp/data/ov13858.yaml
new file mode 100644
index 0000000..491707d
--- /dev/null
+++ b/src/ipa/softisp/data/ov13858.yaml
@@ -0,0 +1,70 @@ 
+# SPDX-License-Identifier: CC0-1.0
+# Calibrated from the AIQB blob shipped with the Windows camera driver of
+# the Surface Pro 8 rear camera. The gains are the inverse of the white
+# point of each light source, so they match its matrix.
+%YAML 1.1
+---
+version: 1
+algorithms:
+  - BlackLevel:
+  - Awb:
+      algorithm: bayes
+      colourGains:
+        - ct: 2514
+          gains: [ 0.982, 2.138 ]
+        - ct: 2848
+          gains: [ 1.141, 2.093 ]
+        - ct: 2870
+          gains: [ 1.121, 1.991 ]
+        - ct: 3786
+          gains: [ 1.439, 1.698 ]
+        - ct: 5438
+          gains: [ 1.713, 1.405 ]
+        - ct: 6366
+          gains: [ 1.952, 1.300 ]
+      priors:
+        - lux: 0
+          ct: [ 2514, 2848, 2870, 3786, 5438, 6366 ]
+          probability: [ 0.158, 0.182, 0.183, 0.223, 0.162, 0.092 ]
+        - lux: 100
+          ct: [ 2514, 2848, 2870, 3786, 5438, 6366 ]
+          probability: [ 0.158, 0.182, 0.183, 0.223, 0.162, 0.092 ]
+      AwbMode:
+        Auto:
+          lo: 2314
+          hi: 7266
+  - Ccm:
+      ccms:
+        - ct: 2514
+          ccm: [ 1.7629, -0.5693, -0.1936,
+                 -0.4249, 1.9627, -0.5378,
+                 -0.5866, -1.9850, 3.5715 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 2848
+          ccm: [ 1.9531, -0.9529, -0.0001,
+                 -0.3551, 1.7226, -0.3675,
+                 -0.2652, -1.4782, 2.7434 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 2870
+          ccm: [ 1.8272, -0.7111, -0.1161,
+                 -0.3449, 1.8779, -0.5330,
+                 -0.2949, -1.6501, 2.9449 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 3786
+          ccm: [ 2.1206, -1.1331, 0.0125,
+                 -0.3294, 1.7928, -0.4634,
+                 -0.1663, -1.0385, 2.2048 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 5438
+          ccm: [ 1.9775, -0.8734, -0.1041,
+                 -0.2989, 2.0270, -0.7282,
+                 -0.1307, -1.0078, 2.1386 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 6366
+          ccm: [ 2.2659, -1.2426, -0.0233,
+                 -0.2405, 1.9141, -0.6736,
+                 -0.1005, -0.7925, 1.8930 ]
+          offsets: [ 0, 0, 0 ]
+  - Adjust:
+  - Agc:
+...
diff --git a/src/ipa/softisp/data/ov5693.yaml b/src/ipa/softisp/data/ov5693.yaml
new file mode 100644
index 0000000..23ce3e9
--- /dev/null
+++ b/src/ipa/softisp/data/ov5693.yaml
@@ -0,0 +1,77 @@ 
+# SPDX-License-Identifier: CC0-1.0
+# Calibrated from the AIQB blob shipped with the Windows camera driver of
+# the Surface Pro 8 front camera. The gains are the inverse of the white
+# point of each light source, so they match its matrix.
+%YAML 1.1
+---
+version: 1
+algorithms:
+  - BlackLevel:
+  - Awb:
+      algorithm: bayes
+      colourGains:
+        - ct: 2592
+          gains: [ 0.869, 2.577 ]
+        - ct: 2773
+          gains: [ 1.037, 2.484 ]
+        - ct: 3716
+          gains: [ 1.332, 2.025 ]
+        - ct: 3763
+          gains: [ 1.379, 2.006 ]
+        - ct: 4877
+          gains: [ 1.447, 1.608 ]
+        - ct: 5894
+          gains: [ 1.642, 1.453 ]
+        - ct: 6905
+          gains: [ 1.803, 1.342 ]
+      priors:
+        - lux: 0
+          ct: [ 2592, 2773, 3716, 3763, 4877, 5894, 6905 ]
+          probability: [ 0.140, 0.151, 0.190, 0.191, 0.170, 0.108, 0.050 ]
+        - lux: 100
+          ct: [ 2592, 2773, 3716, 3763, 4877, 5894, 6905 ]
+          probability: [ 0.140, 0.151, 0.190, 0.191, 0.170, 0.108, 0.050 ]
+      AwbMode:
+        Auto:
+          lo: 2392
+          hi: 7805
+  - Ccm:
+      ccms:
+        - ct: 2592
+          ccm: [ 1.5691, -0.2756, -0.2934,
+                 -0.3879, 1.6699, -0.2820,
+                 -0.3042, -1.0578, 2.3620 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 2773
+          ccm: [ 1.6955, -0.5724, -0.1231,
+                 -0.4270, 1.6746, -0.2475,
+                 -0.1430, -0.8612, 2.0042 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 3716
+          ccm: [ 1.7514, -0.6602, -0.0912,
+                 -0.3392, 1.5992, -0.2600,
+                 -0.0800, -0.5953, 1.6753 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 3763
+          ccm: [ 1.7262, -0.6288, -0.0973,
+                 -0.3271, 1.6412, -0.3141,
+                 -0.0558, -0.7116, 1.7674 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 4877
+          ccm: [ 1.6255, -0.4656, -0.1599,
+                 -0.2505, 1.5615, -0.3110,
+                 -0.0736, -0.5388, 1.6124 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 5894
+          ccm: [ 1.6173, -0.4864, -0.1310,
+                 -0.2346, 1.6605, -0.4259,
+                 -0.0586, -0.5318, 1.5903 ]
+          offsets: [ 0, 0, 0 ]
+        - ct: 6905
+          ccm: [ 1.6764, -0.5621, -0.1143,
+                 -0.2169, 1.6501, -0.4332,
+                 -0.0466, -0.5040, 1.5506 ]
+          offsets: [ 0, 0, 0 ]
+  - Adjust:
+  - Agc:
+...
-- 
2.55.0