[{"id":39046,"web_url":"https://patchwork.libcamera.org/comment/39046/","msgid":"<20260611193054.GA1972310@killaraus.ideasonboard.com>","date":"2026-06-11T19:30:54","subject":"Re: [PATCH v4 1/2] ipa: simple: data: Add OV2740 tuning file","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Javier,\n\nThank you for the patch.\n\nOn Thu, May 14, 2026 at 02:01:48PM -0600, Javier Tia wrote:\n> Add a tuning file for the OV2740 sensor calibrated from the Intel IPU6\n> AIQB binary (OV2740_CJFLE23_ADL.aiqb) shipped with the Lenovo ThinkPad\n> X1 Carbon Gen 10 (Alder Lake, JP2 module, Chicony CJFLE23 camera).\n> \n> Black level is 0x40 at 10-bit (64 ADU), stored as the 16-bit value 4096\n> per the BlackLevel algorithm convention (value >> 8 = 16 at 8-bit scale).\n> \n> AWB gain limits are derived from the minimum R/G and B/G chromaticities\n> across the 8 calibrated illuminants (2319 K to 6302 K), with a 10%\n> headroom margin: maxGainR=2.49, maxGainB=3.07.\n> \n> Eight CCMs are extracted from the AIQB advanced color matrix records\n> (record id=25, float format), covering illuminants from 2319 K\n> (incandescent) to 6302 K (daylight).\n> \n> Signed-off-by: Javier Tia <floss@jetm.me>\n> ---\n>  src/ipa/simple/data/meson.build |  1 +\n>  src/ipa/simple/data/ov2740.yaml | 72 +++++++++++++++++++++++++++++++++++++++++\n>  2 files changed, 73 insertions(+)\n> \n> diff --git a/src/ipa/simple/data/meson.build b/src/ipa/simple/data/meson.build\n> index 92795ee4..e3e4de74 100644\n> --- a/src/ipa/simple/data/meson.build\n> +++ b/src/ipa/simple/data/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  conf_files = files([\n> +    'ov2740.yaml',\n>      'uncalibrated.yaml',\n>  ])\n>  \n> diff --git a/src/ipa/simple/data/ov2740.yaml b/src/ipa/simple/data/ov2740.yaml\n> new file mode 100644\n> index 00000000..0704143a\n> --- /dev/null\n> +++ b/src/ipa/simple/data/ov2740.yaml\n> @@ -0,0 +1,72 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +# Calibrated from OV2740_CJFLE23_ADL.aiqb (Lenovo JP2 module, IPU6 ADL)\n> +%YAML 1.1\n> +---\n> +version: 1\n> +algorithms:\n> +  - BlackLevel:\n> +      blackLevel: 4096\n\nThe black level value can be dropped as there's a sensor helper for the\nOV2740.\n\n> +  - Awb:\n> +      algorithm: grey\n> +      maxGainR: 2.49\n> +      maxGainB: 3.07\n> +      speed: 0.25\n> +      # Forward-compatible with the AwbGrey colourGains interpolation in\n> +      # libcamera patch series 5874. Has no effect until that series merges.\n\n5847 doesn't seem related.\n\n> +      colourGains:\n> +        - ct: 2319\n> +          gains: [1.0103, 2.7953]\n> +        - ct: 2854\n> +          gains: [1.2614, 2.3815]\n> +        - ct: 2884\n> +          gains: [1.3996, 2.4229]\n> +        - ct: 3239\n> +          gains: [1.5648, 2.2331]\n> +        - ct: 3865\n> +          gains: [1.7861, 1.8856]\n> +        - ct: 4136\n> +          gains: [1.9005, 1.8955]\n> +        - ct: 4939\n> +          gains: [1.9603, 1.6439]\n> +        - ct: 6302\n> +          gains: [2.2597, 1.4038]\n> +  - Ccm:\n> +      ccms:\n> +        - ct: 2319\n> +          ccm: [  1.5938, -0.1714, -0.4224,\n> +                 -0.6134,  1.9612, -0.3478,\n> +                 -0.4710, -1.8500,  3.3210 ]\n> +        - ct: 2854\n> +          ccm: [  1.6119, -0.3132, -0.2987,\n> +                 -0.4418,  1.8227, -0.3809,\n> +                 -0.1017, -1.3958,  2.4975 ]\n> +        - ct: 2884\n> +          ccm: [  1.7739, -0.6655, -0.1085,\n> +                 -0.4113,  1.6619, -0.2506,\n> +                 -0.0150, -1.1661,  2.1811 ]\n> +        - ct: 3239\n> +          ccm: [  1.8298, -0.6636, -0.1662,\n> +                 -0.4086,  1.7373, -0.3287,\n> +                 -0.0500, -1.0836,  2.1335 ]\n> +        - ct: 3865\n> +          ccm: [  1.8836, -0.7430, -0.1406,\n> +                 -0.3653,  1.7000, -0.3348,\n> +                 -0.0542, -0.8442,  1.8984 ]\n> +        - ct: 4136\n> +          ccm: [  1.9043, -0.8348, -0.0695,\n> +                 -0.3241,  1.6389, -0.3148,\n> +                  0.0262, -0.9593,  1.9332 ]\n> +        - ct: 4939\n> +          ccm: [  1.6371, -0.4490, -0.1881,\n> +                 -0.2675,  1.6494, -0.3819,\n> +                 -0.0245, -0.7782,  1.8026 ]\n> +        - ct: 6302\n> +          ccm: [  1.6401, -0.4418, -0.1984,\n> +                 -0.2360,  1.7191, -0.4832,\n> +                 -0.0248, -0.7221,  1.7469 ]\n> +  - Adjust:\n> +      gamma: 2.2\n> +      contrast: 1.0\n> +      saturation: 1.0\n> +  - Agc:\n> +...","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B5EB3C324C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Jun 2026 19:30:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D1196623B8;\n\tThu, 11 Jun 2026 21:30:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 21E1860579\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Jun 2026 21:30:56 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-70f3-e800--a06.rev.dnainternet.fi\n\t[IPv6:2001:14ba:70f3:e800::a06])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DE1DD8D4;\n\tThu, 11 Jun 2026 21:30:25 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"msOelbWZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1781206226;\n\tbh=uInUofMFfT+RQ5CxrUfwp2iXgIxASFeuTFcCjCONOVQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=msOelbWZyfSXSXWIWF3dtXUOUmioFCnYhp1VgOLmykJpFzzsVJh+EkdP0+TSHqnSV\n\tAoQ2a48hkx3RLkpDwlulebIr8TLgv8yd42JHyqRFVf/+MX3xGec5h/l+YhkRC7AcWX\n\tGmUcNDjv7odCBDDcvcqZ8bOYsVTmFSDztvcndoEA=","Date":"Thu, 11 Jun 2026 22:30:54 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Javier Tia <floss@jetm.me>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4 1/2] ipa: simple: data: Add OV2740 tuning file","Message-ID":"<20260611193054.GA1972310@killaraus.ideasonboard.com>","References":"<20260514-ov2740-tuning-v4-0-5d59b40abfef@jetm.me>\n\t<20260514-ov2740-tuning-v4-1-5d59b40abfef@jetm.me>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260514-ov2740-tuning-v4-1-5d59b40abfef@jetm.me>","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]