From patchwork Thu Nov 12 14:53:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emfox Zhou X-Patchwork-Id: 28884 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id A0FC5C3304 for ; Thu, 12 Nov 2026 14:53:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C8C3D6A7D3; Thu, 12 Nov 2026 15:53:36 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=debian.org header.i=@debian.org header.b="dYg7+IUr"; dkim-atps=neutral Received: from stravinsky.debian.org (stravinsky.debian.org [IPv6:2001:41b8:202:deb::311:108]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4E7B7691CE for ; Thu, 12 Nov 2026 15:53:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debian.org; s=smtpauto.stravinsky; h=X-Debian-User:Content-Type:MIME-Version:Cc:To: References:In-Reply-To:Message-ID:Date:Subject:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=FUwHwbBPiwjrkd94NSy65QI26KcgpcmH3MW4sy7/XcE=; b=dYg7+IUra/gzKAFJ6+EKLRCkFw hsqmFs+cF7t97GqZ5NG+Wc9y43AXERPPTnQhVWjFuoTVraBkak4xwaH0i9Qr24cQufWhEgO+VeCes Li7dCT4yc19VntsWyOhYw11AfBeGhhaW5CEY/nOMARCV/PR506WguhgXLzqWPsRBVXsqWmdfyi0RN JXvKb54x5Eh6ShTYUeFVrRse3W2pNaHN/baoadHfuPYVpCSpGHuM64Hh4kcN2q3nhJ5iP+ouRIMfL T10tTuqdICyN4MD6fwo9mvXKvBAp16NGx3wgCmfPzJbQwrwpm5OMAjabsdqdBHszVvxLq+s0G+hJQ xLbm1rMg==; Received: from authenticated-user by stravinsky.debian.org with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1xRWBB-00E30v-1Y; Thu, 12 Nov 2026 14:53:33 +0000 From: Emfox Zhou Subject: [PATCH 1/1] ipa: softisp: Add tuning data for the ov13858 and ov5693 Date: Thu, 12 Nov 2026 22:53:29 +0800 Message-ID: <179449520935.395739.5332075053517783570@debian.org> In-Reply-To: <179449369268.366128.18140816117565550812@debian.org> References: <179449369268.366128.18140816117565550812@debian.org> To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Laurent Pinchart MIME-Version: 1.0 X-Debian-User: emfox X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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 From cc83260240d2e91a560b1bd046fc9a1991ed3d65 Mon Sep 17 00:00:00 2001 From: Emfox Zhou 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 --- 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