From patchwork Mon Aug 3 12:07:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 27548 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 96E13BDE4C for ; Mon, 3 Aug 2026 12:31:30 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3E6E868069; Mon, 3 Aug 2026 14:31:30 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="SCRhsPkt"; dkim-atps=neutral Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A06367EE4 for ; Mon, 3 Aug 2026 14:31:29 +0200 (CEST) Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-495635a85d2so18948915e9.0 for ; Mon, 03 Aug 2026 05:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1785760289; x=1786365089; 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=ftV7hOGWULhGPitihJZ2Ixv/NfYSQq6ypqpwd/ew9x8=; b=SCRhsPktgqn6rrdOXuZQkOhGDdZrCyzDM++D63MfkYZABer5HbT4w0j+Uu7UCo31Wf y2cKfS/LOLXOGEsldbFNYej1l1rhNy7q/imYEUv4dvGVzVTyjjlgKUFjXLBufhw8fKAZ pMCx12JnsmD5v6sG3P4xm4GyBfWjBmDUaNEYH8GoaUSlpm/WqnjGLZQ5okGpS6jAYZ8R dj3WQFCXqbVCc1N/0bIkMNfMABb+H8g5XHFeBAQU0PLuHZQC0Y7jRTxiHm0mmvL5J/GS IyhEiR/jXKqqJD4QidP7Y2Fozm28AXRuh0TdcekO/qiH+h7ssQAUXNyAGZlLdmEs06Wr k8kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785760289; x=1786365089; 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=ftV7hOGWULhGPitihJZ2Ixv/NfYSQq6ypqpwd/ew9x8=; b=jUHk0U+o24Q88bkg3uh8KjaLngenX/xe0MOFFYLTbxuRtOf9NIfVZlzgnYs6XqnmS/ JxXSqDCbtLKINxoDeRsfDuWlYXzvigY7QNfWz0TLt6TBN+qJwJVvRWgRabBccFVYgoFw UslTr3gGtsNPyQ/VQtUWOHl8EUON7N6iSkUShII3Tk62JVDuWLLQafVE+f4I7SBSBVsR SaQB3gEuIUBPZT5raQ4D0zQkTTWcaRZmnDJmplw4FmlTovHH5gGJzBAMef6uu53qMhNb 6Yv/3a/4qTI75NC94KZ5WCFxGN/O9dqunxYPoV9jtLQs3CM2oxliPVvlu8ydpb0ywXLd d4YQ== X-Gm-Message-State: AOJu0Yz4MqhOIBKhLL15kDK6YeOEhc5jl9pQHypuk3mKGvh035RisM+P rSXP6590qP5WGuK+FifI5ozPJUTmhVgK23E9vRz1wri/AlAwXPHgjG+bHKho08BxPkGcE2EHd0w qzdtL X-Gm-Gg: AR+sD13dI7FPiOr4wSa7PQQBphFBgFMCuCW57Cb1eyr4EgzH39aaSE70aiXj1VpUa0L UlCBjAgRmsUjYrTKEzTQ7hDVb/LjIWcNOZOT9IDbNm1ZM8fZz5FEL5+Abq0kmv61mfeF2oKU2tF Tk2midgYNBexO3pPKHqolEHSByZATbqyVp5oNsggI01x3yJqEGo6N/co/mrRLzExn61M9OHGraI h28KLdYlj/tpbbm1tFDj3n5PQMu9vf/LEkWNo9cifY0T+5iUdGCKsa+ZmdAL14nBkq++VGGBTER SAsEztZJMRGal+TSUOsqWIQzStWof8XadKAyWvO+b4bsRWeeGo5otUmhigD3RlddH3xCEnj8yHh fC+SWq0c1J82wo+iFEUqNbkYtc4iyWye51JpDYzyVfG1LG4ZoFooIitou3ui4VYfBA0tX+AyvGm pthK7AzC/hf+s/sXo9eDe/NTHxrtDDDelFk0EaDT6cS8we+YupPviLRpJYQ4cWKtWCKegV4Tkf/ RuzDvOFDYJ/SwEO9PI0e2tMoK5mMZk0EsIvvm3TYpqXklidbEyUfl0XOsy/X2ckJ0lR+vTHTtdb J9Ai X-Received: by 2002:a05:600c:4fc5:b0:495:4e1d:82df with SMTP id 5b1f17b1804b1-4980f233e12mr221989515e9.10.1785760218115; Mon, 03 Aug 2026 05:30:18 -0700 (PDT) Received: from davidp-pi5.pitowers.org ([2a00:1098:3142:1f:4706:89ee:c47e:1087]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49808690ffbsm256452635e9.10.2026.08.03.05.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2026 05:30:17 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Cc: David Plowman Subject: [PATCH 0/4] Black level and other fixes for IMX662 Date: Mon, 3 Aug 2026 13:07:51 +0100 Message-ID: <20260803123012.10175-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 Work with the IMX662 sensor has shown a few relatively minor fixes/tweaks to be necessary. 1. The difference between the exposure time and frame length needs to be longer. There is a specific problem with the HCG (high conversion gain) mode at very high gains. 2. The IMX662 black level varies at very high levels of analogue gain, so this feature has been added to the black level control algorithm. 3. The udpated black level calibration is added to the IMX662 tuning files. 4. The colour temperature curve for the IMX662 is extended slightly at the bottom of the range (for slightly less orange images). 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 | 33 +++++++++++++++++--- 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, 76 insertions(+), 12 deletions(-)