From patchwork Mon May 11 18:16:02 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Tia X-Patchwork-Id: 26715 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 5FA27C32F7 for ; Mon, 11 May 2026 18:16:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D90EB6302E; Mon, 11 May 2026 20:16:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=jetm.me header.i=@jetm.me header.b="bceJVvT3"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="PqVQs8Sk"; dkim-atps=neutral Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F77D62DC4 for ; Mon, 11 May 2026 20:16:08 +0200 (CEST) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id EB9387A00C4; Mon, 11 May 2026 14:16:06 -0400 (EDT) Received: from phl-imap-07 ([10.202.2.97]) by phl-compute-02.internal (MEProxy); Mon, 11 May 2026 14:16:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jetm.me; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1778523366; x=1778609766; bh=2gWSqYkwBitTNhg3SSRLFDPdQLDS0MxbIfQ7KDluudQ=; b= bceJVvT3rQq3EVuQfYgFOnxZrDMrjp/Chv3htv3aYeeHHJH5zVBgaMyBFxzsrFwo IhcrYhHZlFpbUBVnRQsK1brO+aEOPE0KtyzT4VuamEGYBnGfM4oDg5joffYyPHn4 g1Bo723n6MfeVO6dIBmFBEbxDtPMSvbWMP8Bd/BtpAFCqoh6MaU+6sSV6Ma5bF1T Rz/tP7+9VuqYpb/0qz/KWHNNYewp2pNGif4S8reZz8si3fHavIPo77SDBvWX2hQo vhAyyQYJS2iNd0sXt8WQmnc4hYH9QztpS9Llf1Qb6xHoH3fD/pB/Tec10swX/2jV jd0p5Pm1h4ZuTZ9WmagWKA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1778523366; x= 1778609766; bh=2gWSqYkwBitTNhg3SSRLFDPdQLDS0MxbIfQ7KDluudQ=; b=P qVQs8SkMQQfKTL22v6P2KaLXwQD91jw9LTqCRJsuvN0e3jpJN4QUoByEnwC2iCub oA0AhxEkBISnyH9e/xXA8Tcjm/FaBWZJNME+NmLuXeyCocW/aCmNLUFicM8fNfUT KnZNTFBBbee4ui/sLQ5oQs7JBa58DTbdScAzhaH7X1EwC3VSfFuU8kvosg/Wr9CL i5tHhW4EmKAST2mWeRqbnY1a54UO8FEMIfq8/zqjPiTmc1rM9br9Dao/Dy4/MBA+ yoxwd2pPWxsUxc6Ktby39Qq7cf6cdpFaqxx70IB6biahIi03me52uDBVrozgOe8L fW35P15U//8lntxSp9QJQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduudeliedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepoffhfffugggtgffkvfevofgjfhesthejredtredtjeenucfhrhhomheplfgrvhhi vghrucfvihgruceofhhlohhsshesjhgvthhmrdhmvgeqnecuggftrfgrthhtvghrnhepvd dtjeeiheeijedtveeujeevvdekjeeuveekleeijeekfeejhfefveeiffffvdeinecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhlohhsshesjh gvthhmrdhmvgdpnhgspghrtghpthhtohepjedpmhhouggvpehsmhhtphhouhhtpdhrtghp thhtoheprhhosggvrhhtrdhmrgguvghrsegtohhllhgrsghorhgrrdgtohhmpdhrtghpth htohepsggrrhhnrggsrghsrdhpohgtiigvsehiuggvrghsohhnsghorghrugdrtghomhdp rhgtphhtthhopehkihgvrhgrnhdrsghinhhghhgrmhesihguvggrshhonhgsohgrrhgurd gtohhmpdhrtghpthhtoheplhgruhhrvghnthdrphhinhgthhgrrhhtsehiuggvrghsohhn sghorghrugdrtghomhdprhgtphhtthhopehlihgstggrmhgvrhgrqdguvghvvghlsehlih hsthhsrdhlihgstggrmhgvrhgrrdhorhhgpdhrtghpthhtohepjhhohhgrnhhnvghsrdhg ohgvuggvsehoshhsrdhquhgrlhgtohhmmhdrtghomhdprhgtphhtthhopehmiigrmhgrii grlhesrhgvughhrghtrdgtohhm X-ME-Proxy: Feedback-ID: i9dde48b3:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id ABE2C1EA006B; Mon, 11 May 2026 14:16:06 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface From: Javier Tia Date: Mon, 11 May 2026 12:16:02 -0600 Subject: [PATCH v3 2/3] ipa: simple: data: Add OV2740 tuning file MIME-Version: 1.0 Message-Id: <20260511-ov2740-tuning-v3-2-8ff3e57c7368@jetm.me> To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham , Laurent Pinchart , =?utf-8?b?QmFybmFiw6FzIFDFkWN6?= =?utf-8?q?e?= , Milan Zamazal , Robert Mader , Hans de Goede X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3811; i=floss@jetm.me; h=from:subject:message-id; bh=PF2gc+FYa/uT/H4EVGsAYS/w7sQZDONq0fZ6ceMKq0g=; b=owEB7QES/pANAwAKAbXuwwuoZ3cfAcsmYgBqAhzgRMkuHei5e/6URAeecjaFweFi3rArbT16V mIlovtDNayJAbMEAAEKAB0WIQSbE7ILzw7eI0VKk8m17sMLqGd3HwUCagIc4AAKCRC17sMLqGd3 Hyq5C/44qiLBs64vTrqL/Vws4sRJbtrq/dCRG1lapFLMtG/OoVvNYHa6uTgA/6UNBSHjZ9E4ypb Nv4A8m3vLht8K6fj5lHgSeoXHp/E3m8lmcBEhRVYUTa49hqYPAOQ1tLJ3Msssw44SgX4hXcxigE +2np2aC061lZJFCFesNpaNkPm0XeRAWykuUy3fK+zjWXPCAayJvK8bwrgHiCrqnOM9xm2GRRGYp 8odImRAqs/V2QsZuucKN34a+nb/kwevD78ETlO2O4bkElrT71MG7okABCNn3yVOJFa8SI7xo/nm I7uOpWoxhQUGLA9jiCNTX6qw3JCLv1PtuFi5nad/69xXz6IxnOUeUynpMZET/k+n8PrFMuvvths VgycGTGST0Nam/Td5ZwhNoNgIQ+RvBqObTYJcJVT7nyw/OO/RGHTx8HwJGf21ZifBKykP76vdXZ FHooHYEUcJOKdUTYokfEQ2nQxrQWjUL/KuhURzYMmf8CTYdYxOgcaFzHADMrQQIE28bII= X-Developer-Key: i=floss@jetm.me; a=openpgp; fpr=9B13B20BCF0EDE23454A93C9B5EEC30BA867771F In-Reply-To: <20260511-ov2740-tuning-v3-0-8ff3e57c7368@jetm.me> References: <20260511-ov2740-tuning-v3-0-8ff3e57c7368@jetm.me> 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" 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 --- 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 + - 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: +...