From patchwork Mon Oct 5 15:22:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "D. Manresa" X-Patchwork-Id: 28401 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 22490BDCB2 for ; Mon, 5 Oct 2026 15:22:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D080C68A44; Mon, 5 Oct 2026 17:22:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="B9i1zRca"; dkim-atps=neutral Received: from mail-wr2-x0d.google.com (mail-wr2-x0d.google.com [IPv6:2a00:1450:4864:30::d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 86523689D8 for ; Mon, 5 Oct 2026 17:22:34 +0200 (CEST) Received: by mail-wr2-x0d.google.com with SMTP id ffacd0b85a97d-48b9d8056d2so1079811f8f.1 for ; Mon, 05 Oct 2026 08:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1791213754; x=1791818554; darn=lists.libcamera.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=myQJDyhkkGwVsg9Uds8vju/vlm2dGHvTBhvi0Rvie3U=; b=B9i1zRcaHSn7eTUnzSWWoiqhyTKPpdTUhFfiOnMAqnG9ADzT3NfwXjuvUWFdyhexGZ AyDYDaukQer73+pmQoWDofy7UnDgMU61rwwvqqf+yKwQ3l8Acd4GOGaNBR+/uv3NikWM OS2+1PeiJaO6ll5uio+8kdCvN+KgiY8p2oFlq9lElc7DDeARkgv44ItC7Yfzf1UB/6Uq YPH6K0u14rOIADZnlYy/qHEpYxFj4E+tPc9/xOpHp6XAaitLozXbzYPKN1xYG/+9UiTZ xWPWSI80QFTyPLqVTDlt/fODrKXTkGixNfg7HYpbqoMeXqYNof3gvSBRjf0CVIGEHNDq AZUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1791213754; x=1791818554; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to: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=myQJDyhkkGwVsg9Uds8vju/vlm2dGHvTBhvi0Rvie3U=; b=U2Kw06n65n/O/q1IaswgRNBp54mUhdaoFvmIVbwzmO9ZuXyrutBNf/8Yl3b5LBl000 jYYdU9sLO6Y7MSrATLWkv68MF7sL45qFeUARO9MpwUmbQ48EagxuhWiQFGZLTqNbHLVa zmMxBDfiVZSgn3uoMCB+FILKgoy+iuEhLrRBa/zbvlor5eI9rw5fJcfGZxt6tWMlnpbF IpVMlTizs3GfiyYZyJrkm7oyO/pgPppKEjXz2nbnW7VLaMK4eY14ZMsL8pZFK//NLPk0 H5iSYlvV/Dc7DmrdqPX6b6rvzCpOoNrVqoZQSTQU92yBPS8Idra4n/9W43hxUNxlRqJ4 WNcQ== X-Gm-Message-State: AFq9FYLTTR9zmYx1RyZeMw/PccCsSQMwzHObKTA5a8Lf8G8xy/F90FHM dupWuuDizzGYtXLsbvE6LplYL2vFN7cUEDbf0ZOjBXru2fvjFEereFrgjfIn X-Gm-Gg: AYBFou28b7HBbgPsDatNkpx1VbpeOfSkooEE1c/Zoh+ylOFTRQhlLR57rYOE9UaLGPT ysVTHCh4JwjhuhBCoE53JQ0aFkLl6EUEegG4ORtkgqJq0TO197Xd0xjk4k2eviU1S+BtwEptS4s BZqlInDkd2uJvUIeRDE6iZUeGS8t22HoknyL9Xl6XWnE8sHwDR9mhR8eLQUDBB5GzK2IaJ1R4MP zRgX2mdO/oGlvdMk6wI1kzYFTFhvQRjCnBIMe6jeJRiL6+76l2wCMj0QRgFECio/H74dZ60z+bK kWGWcWtvC51uX7oyElr3TjTwiL31XaOtN4OFZTB4S7DZu6sew/pnif+SD17fH3HkgbvYYfJDXgd GjuxOLQMAQgQIsOGTJ3NFwTwOOzCHL3Zm23+PCZuxEMVKH58JnyALgzV+svoWVzE3UCVpCZPXbB Ak5YsnrUtkPp/r/WNjTw6O2Ii9htYBqRu9X/LeplEdtAgoaqY6zWa0N4rcbXyyv0NL5j42kLfUM qCnwbKUUJNrqMPBzHLWqxHSWeiKkFbDWeF96p9cx+xDvg5n8o0jkP4= X-Received: by 2002:a05:6000:240e:b0:48c:455b:6625 with SMTP id ffacd0b85a97d-48c455b66e9mr15713349f8f.19.1791213753332; Mon, 05 Oct 2026 08:22:33 -0700 (PDT) Received: from surface.. (84.124.213.91.dyn.user.ono.com. [84.124.213.91]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48c622ab7b5sm4707591f8f.37.2026.10.05.08.22.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Oct 2026 08:22:32 -0700 (PDT) From: "D. Manresa" To: libcamera-devel@lists.libcamera.org Cc: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= , Laurent Pinchart , Daniel Scally , "D . Manresa" Subject: [PATCH v5 1/2] ipa: libipa: camera_sensor_helper: Add OV5670 black level Date: Mon, 5 Oct 2026 17:22:30 +0200 Message-ID: <20261005152231.2024537-1-dmanresa@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260911153918.96470-1-dmanresa@gmail.com> References: <20260911153918.96470-1-dmanresa@gmail.com> 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" The OV5670 outputs a data pedestal of 64 at 10 bits. The black level characterisation in the OEM tuning data for a Dell Latitude 7275 camera module measures 64.1 to 64.4 at unity gain over six exposure times, and stays within 62.0 to 64.5 up to a gain of 15.9. Provide it in the camera sensor helper so that IPAs can use it instead of hard-coded or tuning-file values. Signed-off-by: D. Manresa --- Written with the assistance of an AI tool (Claude). libcamera has no trailer for this and checkstyle.py rejects unknown trailer keys, so it is noted here rather than in the commit message. v5: move the camera_sensor_helper comment to 1/2, per Barnabás Pőcze's review of v4 2/2. This patch now introduces the comment already in its final wording. No functional change. src/ipa/libipa/camera_sensor_helper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 82bf255..3589b06 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -802,6 +802,8 @@ class CameraSensorHelperOv5670 : public CameraSensorHelper public: CameraSensorHelperOv5670() { + /* From the OEM black level characterisation: 64 at 10bits. */ + blackLevel_ = 4096; gain_ = AnalogueGainLinear{ 1, 0, 0, 128 }; } };