From patchwork Thu Aug 6 15:19:40 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 27663 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 8D094C3306 for ; Thu, 6 Aug 2026 15:27:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BCFD6817D; Thu, 6 Aug 2026 17:27:08 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="J1Cr1pQu"; dkim-atps=neutral Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7DB8267E44 for ; Thu, 6 Aug 2026 17:27:05 +0200 (CEST) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-490cf322ed0so19580355e9.1 for ; Thu, 06 Aug 2026 08:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1786030025; x=1786634825; 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=qBr67cTKYJcDRYHK1aMe3RZIctN9bYwhA2mvivwVUkY=; b=J1Cr1pQuESJpHQRRInxpGe6mDzXjPQ7GytiBPBJWabj9sBACgLdnb9cKcrpdNKG/k7 blynDVCiXIAHQBlO35nujs5dLH2xtl0qEMTpXq258xkbo9LiosgTexHgD/3Fn3CFvHCz 6DSDhVF0xQIM8VWqQb4SmQ+kvOrBtKImgtE8CpJNX71FzvLI6KdQDoi7PBsbOsD79nw5 DOM/U+3cJE31FfhZUHekzPmNYH6SlC/WAXuzSV3NbDCYTJTsb3WUtFGy1p7YjhgJrp+P +bexO9ysb3ES81q/nz/atSRt/NafJDV2jmS32tcu/yY0R0d5qhkbmZfDHC3PcSjXfaPH ZT6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786030025; x=1786634825; 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=qBr67cTKYJcDRYHK1aMe3RZIctN9bYwhA2mvivwVUkY=; b=CMRjJE620P1zrSr0ROinuHawgZbrxI5p42Itw5IAud2qsRUTss2NDaIuK3fuu4V1my 4aWpgUGJ7u43+sn3ugz4SgppLBZMyd1N8JYhEs5cls9XV1OVEC4q00IAk4rtKuC9rj8Z VYMGoIkN8rcZ4XvuWLDUHu2ghOC/HKEtwS8Uo8ugKsB9If3KEpWTSKARa4FR1SWXApCh zClSeY2wIGSl9lMGe6vFXhIBbyuqnP45tzZ9f0uvFUEXhz38bQ4aEoTB2ouYyANPU7I5 fh9d6VjhKsZq5GwDqG8Heb0VgBhSZf0GVtEt2UBIvQAek2ALpFVtlaGUwIEJBBhpixjL spsQ== X-Gm-Message-State: AOJu0YxsTXkwN4l7/31sn2/Y4MxHo8o+Rc21GKVD0hoDf2aSCNMEpIzS dNsGdvGMOJwQ7cZXgBmurAxnT3QpGadPpla/icoUY879oMYVYyQYASjqbdtclWzBwM8/GnUkfaq iSolA X-Gm-Gg: AR+sD11A7P2AsF/6oylfQJkyJDowokxDr6I3UnobnJfSI4mQs/ZdVEKwbNzDnbfd/Vr luys5Nx5Kb9s0W5jl1rXPl4oWJ6iFhSjxwDMh2bSSagbUkYXGK3i3++SLMT5FiVOF/mRywLy1+C W36HY0VGa7m+MG7VuFgWtOJP9rrqr7yc2gPL0gxhO0aD0B39kNrXhyd0T8TDNDnoB5MYv77DeQp vgyOwdoXSMwiRRnUoRf2iPY82FLNqbfv9jQXESdvzFg2mvKHzFR/D4Vc2hKd63qU9vf+di9I0Ua YA3VzN15ksxhIKRFzFaDiqd7rRQhpUrtwl/pbO+GRlJcqNnMg6LxiDzPpU3/k2czNTZDEkUrt3U +sJT5ZkAYgi0SV3fa9NTyWRyhMKkTmKrUjU6SQpsFSFhRRefE/ZECPV22oj7I4G0yhKUFlyW1vQ CLObMuw93Yq1UMypjCQEq3Q4hGE7Ym+xaZrNMIZJRfFb7m7H8HD9DxCgkYTUuqoRbGxxnlVsiqW 9UyD++ev+XK9I7/FgYf5qMLew/QbxX6Li7ff7Aae4jqU29D6EuSvZhSoyQ7AScatvaWt6wCxHr+ Oz60 X-Received: by 2002:a05:600c:15d4:b0:499:59b5:ba67 with SMTP id 5b1f17b1804b1-49959b5ba93mr28119175e9.17.1786030024675; Thu, 06 Aug 2026 08:27:04 -0700 (PDT) Received: from davidp-pi5.pitowers.org ([2a00:1098:3142:1f:4706:89ee:c47e:1087]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4995428f294sm70769235e9.15.2026.08.06.08.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2026 08:27:04 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH v2 0/4] Black level and other fixes for IMX662 Date: Thu, 6 Aug 2026 16:19:40 +0100 Message-ID: <20260806152701.4179-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 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" Hi Version 2 changes only the 2nd patch (Allow black levels to vary with analogue gain). 1. I've made it issue a little warning if you specify constant black level values that are not used. 2. I've actually changed the PWL evaluation so that you get constant extensions off the ends, rather than linear extrapolation. I don't think it really matters too much, and it's probably not a thing that would happen in something calibrated sensibly, but I'm perhaps slightly more comfortable with this behaviour. (So I haven't added any extra tags on this one as yet.) Thanks! David David Plowman (4): ipa: rpi: cam_helper: Increase frameIntegrationDiff for IMX662 ipa: rpi: Allow black levels to vary with analogue gain ipa: rpi: Update black level tuning for IMX662 ipa: rpi: Update colour temperature curve for IMX662 src/ipa/rpi/cam_helper/cam_helper_imx290.cpp | 19 +++++++-- src/ipa/rpi/controller/rpi/black_level.cpp | 45 ++++++++++++++++++-- src/ipa/rpi/controller/rpi/black_level.h | 7 +++ src/ipa/rpi/pisp/data/imx662.json | 15 ++++++- src/ipa/rpi/vc4/data/imx662.json | 14 +++++- 5 files changed, 88 insertions(+), 12 deletions(-)