| Message ID | 20260828140629.128831-1-dmanresa@gmail.com |
|---|---|
| Headers | show
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 [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6D0FBC333F for <parsemail@patchwork.libcamera.org>; Fri, 28 Aug 2026 14:40:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0F897684A6; Fri, 28 Aug 2026 16:40:52 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ribkQLCH"; dkim-atps=neutral Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4921F6838A for <libcamera-devel@lists.libcamera.org>; Fri, 28 Aug 2026 16:06:34 +0200 (CEST) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-49b0dd3c9a0so7019195e9.1 for <libcamera-devel@lists.libcamera.org>; Fri, 28 Aug 2026 07:06:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787925994; x=1788530794; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=8pNP40U2ud44Uhz2KVwo40SLeQvX9A7Dap+0Z/uxb+Y=; b=ribkQLCHVsbNnpR5qc+x1A+ZtSqYDfQoM2VDSRDhVL0q+a2Tf3F6TY5OgruhmTg8Vm iXL8ZnLc7cQC1IFP2nenE/Vtv0EN45UAEtLvAOzvCEjhVOmInux7UhoZYjHulF4A6COf fNQZV/T3cokoPFsu3B1poaxacH1E44w+M+NlJ+PMzzi+78nLGrnBrqcSy9AP36yxSlC4 8uHQOTOsCoqekmcmVkmb2R4kP1TwvfsbO1Bj1fvTch8/OE1Ap3+Q2pIRE5jJRMRdcn5W dziJLFq/8m9sURBRpuwl8LQ5VhxCr0IzUJ3afX6O2CMLCZtchhly6Edj3YuFg0mOCAhA HZmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787925994; x=1788530794; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=8pNP40U2ud44Uhz2KVwo40SLeQvX9A7Dap+0Z/uxb+Y=; b=a+xiJbqEmeMO5hHSaj6NZnvOCZtqLlg+gI5MCGPhjk8oKHoaLmUU6sUKfuLPt+ZRNK 29xTeOgyphie6Mcc3Cz04/na6Y2nazBwO6Cr3T7foOWjl/7lH4GAk1o5lr7NVbOK2k+o Tb7qK5X71LlagOImvAIBTmdvz8YoyeSzp0DrjONMzXCAbwkZGNC0pHXx9XSFlx3vaLSC ARoTlEP8FLU7RBwSpQcnb2C11HQWASBAYJedzlB7EWFwBUTU8cLHZ5tgdiLHog5ep5Qn po8OuVeo0YhanR4m3j8QQWP7eSVg8htPox8YA1GUG4znt2Fd7KD8KocKBmhELg0Qfwid yObg== X-Gm-Message-State: AFuF++mZZMMWaGJ1yB28xO25NZLlfmvotbl4QUhwAuRT3tq0bS12FUXi h1O/XcxZbkUMoFkGeqWPRCrvFm+sAm8C4cq6RFN6zkJpIpPtoOFaePRqsbfyH/HHwF7T X-Gm-Gg: AR+sD12zVvNmOdZTa5KOSRiWgyOSTi8i91c2UnaYQL1kLNxnvGBO9lh/OgS6RmgNR6M h3nl0x2naCzx6vcQmlvkcQaTNPVEezBBWdUoE9/Pdw1nZx4rjgx97ko6qlN6j1NQ3xsRmHS++Nd YQlP4LgyOYCWfknft1zYPjyW2BYhDflJ1rLlWV94XwVeRBcy00aoQkCK08kRZupQNfRB9CXBzwB q1+2CIZfK2a7XN9Eb1Croez71IAolvalFTJH/M309Kg0IVGy7HjpFcYjsj2SG8TGzWuGqba1EQk IjWkgtuovpMHE5MGgW40zMCZhegiFbLCFqn2GMjJ0WKn/xHWDf7NdwCBY5KVSQUJBj9s9N/308K M8imZHLGAF99U7HPmiDtrEL+K+7auVnQSLTs5lB9KLNPW34wwUotDz9qynBA5dy6I/Jbx+eBxQm 8UBte9EYqVeIH2xft32C26HoXKOxJw7JjfmLmgu1CweZUmM+qYceqsvFgdibl5IXtNqxhY//iTr xPjrjehN54vfA== X-Received: by 2002:a05:600c:4715:b0:499:cd34:f7c with SMTP id 5b1f17b1804b1-49b91c26a01mr105206075e9.5.1787925993472; Fri, 28 Aug 2026 07:06:33 -0700 (PDT) Received: from surface.. ([217.61.227.23]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49b9500c7cfsm57858645e9.11.2026.08.28.07.06.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Aug 2026 07:06:32 -0700 (PDT) From: "D. Manresa" <dmanresa@gmail.com> To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Milan Zamazal <mzamazal@redhat.com>, Hans de Goede <hansg@kernel.org>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>, "D. Manresa" <dmanresa@gmail.com> Subject: [RFC PATCH 0/1] ipa: libipa: awb: Support modules calibrated with gains below 1.0 Date: Fri, 28 Aug 2026 16:06:28 +0200 Message-ID: <20260828140629.128831-1-dmanresa@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 28 Aug 2026 16:40:50 +0200 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>, <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>, <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> |
| Series |
|
| Related |
show
|
Hello, This comes out of bringing the front camera of the Microsoft Surface Pro 7+ (an OV5693 behind an IPU6, driven by the simple pipeline and the software ISP) to match the colours the Windows 11 stack produces on the same hardware. Microsoft publishes the per-module colour calibration in its public Surface driver package, as an Intel CPFF/.aiqb container. Decoding the advanced-colour-matrix records yields, per illuminant, the sensor white point (and therefore the AWB gains) and the CCMs, which we translated into a software ISP tuning file. The decoder, the tuning file and the full write-up live at: https://github.com/dmanresa-saes/surface-ipu6-cameras One obstacle remains in libcamera itself: AwbAlgorithm floors the white balance gains at 1.0, while the OEM white point for this module needs a red gain of 0.87 at 2592 K. The single patch here makes the floor tunable instead of removing it, keeping the 1.0 default so no existing platform changes behaviour. Sent as RFC because the alternative -- trusting the platform gain range alone and dropping the floor -- is simpler, and I would value the maintainers' view on which is preferred before respinning. For completeness, our production tree carried a second local patch making the software ISP AGC exposure target tunable (the MSV target clipped highlights, and the clipped statistics then poisoned the Bayesian AWB). That change is obsolete on master: since commit 004fea17d ("ipa: softisp: agc: Port to `AgcAlgorithm`") the target is tunable through the relativeLuminanceTarget property for sensors with a CameraSensorHelper, and we are migrating our tuning to it, so it is not part of this series. The patch was developed with AI assistance (Claude) and verified on Surface Pro 7+ hardware against Windows 11 renditions of the same scenes. Thanks, D. Manresa D. Manresa (1): ipa: libipa: awb: Allow tuning files to lower the minimum gain src/ipa/libipa/awb.cpp | 4 ++++ src/ipa/libipa/awb.h | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-)