| Message ID | 20260514-ov2740-tuning-v4-1-5d59b40abfef@jetm.me |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Hi Javier, Thank you for the patch. On Thu, May 14, 2026 at 02:01:48PM -0600, Javier Tia wrote: > 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 | 72 +++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 73 insertions(+) > > 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..0704143a > --- /dev/null > +++ b/src/ipa/simple/data/ov2740.yaml > @@ -0,0 +1,72 @@ > +# 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 The black level value can be dropped as there's a sensor helper for the OV2740. > + - Awb: > + algorithm: grey > + maxGainR: 2.49 > + maxGainB: 3.07 > + speed: 0.25 > + # Forward-compatible with the AwbGrey colourGains interpolation in > + # libcamera patch series 5874. Has no effect until that series merges. 5847 doesn't seem related. > + colourGains: > + - ct: 2319 > + gains: [1.0103, 2.7953] > + - ct: 2854 > + gains: [1.2614, 2.3815] > + - ct: 2884 > + gains: [1.3996, 2.4229] > + - ct: 3239 > + gains: [1.5648, 2.2331] > + - ct: 3865 > + gains: [1.7861, 1.8856] > + - ct: 4136 > + gains: [1.9005, 1.8955] > + - ct: 4939 > + gains: [1.9603, 1.6439] > + - ct: 6302 > + gains: [2.2597, 1.4038] > + - 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: > +...
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..0704143a --- /dev/null +++ b/src/ipa/simple/data/ov2740.yaml @@ -0,0 +1,72 @@ +# 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: + algorithm: grey + maxGainR: 2.49 + maxGainB: 3.07 + speed: 0.25 + # Forward-compatible with the AwbGrey colourGains interpolation in + # libcamera patch series 5874. Has no effect until that series merges. + colourGains: + - ct: 2319 + gains: [1.0103, 2.7953] + - ct: 2854 + gains: [1.2614, 2.3815] + - ct: 2884 + gains: [1.3996, 2.4229] + - ct: 3239 + gains: [1.5648, 2.2331] + - ct: 3865 + gains: [1.7861, 1.8856] + - ct: 4136 + gains: [1.9005, 1.8955] + - ct: 4939 + gains: [1.9603, 1.6439] + - ct: 6302 + gains: [2.2597, 1.4038] + - 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: +...
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 | 72 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+)