From 3f6919e62d358d991afa7edbfa062ded47504dc2 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Thu, 23 Oct 2025 19:43:48 +0200 Subject: [PATCH] temp/libcamera: Add tuning files for IMX838 and s5kjn1 Used by the Fairphone 5. Only containing black levels for now, however adding those already makes the colors look less washed out, in particular for the front camera. Part-of: --- ...pa-simple-Add-tuning-file-for-IMX858.patch | 44 +++++++++++++++++++ ...pa-simple-Add-tuning-file-for-s5kjn1.patch | 44 +++++++++++++++++++ temp/libcamera/APKBUILD | 6 ++- 3 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch create mode 100644 temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch diff --git a/temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch b/temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch new file mode 100644 index 000000000..077424e49 --- /dev/null +++ b/temp/libcamera/0018-ipa-simple-Add-tuning-file-for-IMX858.patch @@ -0,0 +1,44 @@ +From 1fe6f0def67fc76344ecd7c4e4b038b8d7cc7197 Mon Sep 17 00:00:00 2001 +From: Robert Mader +Date: Thu, 23 Oct 2025 19:35:59 +0200 +Subject: [PATCH 18/19] ipa/simple: Add tuning file for IMX858 + +Used by the Fairphone 5. The value is guessed from similar IMX sensors. +--- + src/ipa/simple/data/imx858.yaml | 11 +++++++++++ + src/ipa/simple/data/meson.build | 1 + + 2 files changed, 12 insertions(+) + create mode 100644 src/ipa/simple/data/imx858.yaml + +diff --git a/src/ipa/simple/data/imx858.yaml b/src/ipa/simple/data/imx858.yaml +new file mode 100644 +index 000000000..f7d01b738 +--- /dev/null ++++ b/src/ipa/simple/data/imx858.yaml +@@ -0,0 +1,11 @@ ++# SPDX-License-Identifier: CC0-1.0 ++%YAML 1.1 ++--- ++version: 1 ++algorithms: ++ - BlackLevel: ++ blackLevel: 4096 ++ - Awb: ++ - Lut: ++ - Agc: ++... +diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build +index e0c8e443a..8536a9672 100644 +--- a/src/ipa/simple/data/meson.build ++++ b/src/ipa/simple/data/meson.build +@@ -6,6 +6,7 @@ conf_files = files([ + 'imx363.yaml', + 'imx371.yaml', + 'imx376.yaml', ++ 'imx858.yaml', + 's5k3l6xx.yaml', + 'uncalibrated.yaml', + ]) +-- +2.51.0 + diff --git a/temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch b/temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch new file mode 100644 index 000000000..4f56c931d --- /dev/null +++ b/temp/libcamera/0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch @@ -0,0 +1,44 @@ +From f0466e0bf079919df780a1bdbc22a55d5fa67c7d Mon Sep 17 00:00:00 2001 +From: Robert Mader +Date: Thu, 23 Oct 2025 19:37:31 +0200 +Subject: [PATCH 19/19] ipa/simple: Add tuning file for s5kjn1 + +Used by the Fairphone 5. The value is guessed from similar IMX sensors. +--- + src/ipa/simple/data/meson.build | 1 + + src/ipa/simple/data/s5kjn1.yaml | 11 +++++++++++ + 2 files changed, 12 insertions(+) + create mode 100644 src/ipa/simple/data/s5kjn1.yaml + +diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build +index 8536a9672..4cecff634 100644 +--- a/src/ipa/simple/data/meson.build ++++ b/src/ipa/simple/data/meson.build +@@ -8,6 +8,7 @@ conf_files = files([ + 'imx376.yaml', + 'imx858.yaml', + 's5k3l6xx.yaml', ++ 's5kjn1.yaml', + 'uncalibrated.yaml', + ]) + +diff --git a/src/ipa/simple/data/s5kjn1.yaml b/src/ipa/simple/data/s5kjn1.yaml +new file mode 100644 +index 000000000..f7d01b738 +--- /dev/null ++++ b/src/ipa/simple/data/s5kjn1.yaml +@@ -0,0 +1,11 @@ ++# SPDX-License-Identifier: CC0-1.0 ++%YAML 1.1 ++--- ++version: 1 ++algorithms: ++ - BlackLevel: ++ blackLevel: 4096 ++ - Awb: ++ - Lut: ++ - Agc: ++... +-- +2.51.0 + diff --git a/temp/libcamera/APKBUILD b/temp/libcamera/APKBUILD index c8692e941..d513d326f 100644 --- a/temp/libcamera/APKBUILD +++ b/temp/libcamera/APKBUILD @@ -3,7 +3,7 @@ pkgname=libcamera _pkgver=0.5.2 pkgver=9999$_pkgver -pkgrel=2 +pkgrel=3 pkgdesc="Linux camera framework" url="https://libcamera.org/" arch="all" @@ -62,6 +62,8 @@ source="https://gitlab.freedesktop.org/camera/libcamera/-/archive/v$_pkgver/libc 0015-ipa-simple-Add-tuning-file-for-hi846.patch 0016-ipa-simple-Add-tuning-file-for-IMX371.patch 0017-ipa-simple-Add-tuning-file-for-IMX376.patch + 0018-ipa-simple-Add-tuning-file-for-IMX858.patch + 0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch qcam.desktop " builddir="$srcdir/$pkgname-v$_pkgver" @@ -176,5 +178,7 @@ bb1dfadc125901bb6cac0bfc8640333833afe0a2616990f7ee7dd2fba7bf3f327afc37191dc517c4 e4902b96659c993e93776c0586395df51aea0bedb92e8e0813fc917264e709eb4f17283e80e26a7b43a7177af24c03b93032870a214045e3b09ab63d552bb7a5 0015-ipa-simple-Add-tuning-file-for-hi846.patch 7f2586be77bf629b18862dc7f33e29133c4dcac34200ce0435b4630abc08e16303441e67f86e4dd475dd09e8fd0690bb38f59792327bf42f25285b8d690aeb6f 0016-ipa-simple-Add-tuning-file-for-IMX371.patch 2f508f21d4ca51732407c2c97cf646d1f7a573687e8c36f8e48172183f1100e17517ee77f2ff11069437dd8da0d3600d6ea37768e41c418c52b35d363c38e19c 0017-ipa-simple-Add-tuning-file-for-IMX376.patch +bb7244f03363721428b85e3bdbe249e975d26ca0b36932d4f7733f669c336408093aee036bec14522e7c46fd81afdea20f0a4c41c9058bd18d82de00a2cc4864 0018-ipa-simple-Add-tuning-file-for-IMX858.patch +22cfe2e5992e1b850c5f0960a68c04fd7a9612ab7f66ccf6086d66e1d019b253a5030a35003cac2e23295e4823bec3c05329ae52ef590c25561a25f477b668d5 0019-ipa-simple-Add-tuning-file-for-s5kjn1.patch 22167a4eceb6d1b40b0b7c45fdf116c71684f5340de7f767535cb8e160ad9d2ae0f00cb3d461f73a344520a48a4641cf46226841d78bee06bfbfd2a91337f754 qcam.desktop "