From patchwork Fri May 8 16:51:31 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javier Tia X-Patchwork-Id: 26697 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 01784BE173 for ; Fri, 8 May 2026 17:17:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1AD3D62FD3; Fri, 8 May 2026 19:17:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=jetm.me header.i=@jetm.me header.b="iLbkBIX4"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="qUoSYwV7"; dkim-atps=neutral Received: from fhigh-a8-smtp.messagingengine.com (fhigh-a8-smtp.messagingengine.com [103.168.172.159]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1983762FD3 for ; Fri, 8 May 2026 19:17:20 +0200 (CEST) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfhigh.phl.internal (Postfix) with ESMTP id 36FD91400096; Fri, 8 May 2026 13:17:19 -0400 (EDT) Received: from phl-imap-07 ([10.202.2.97]) by phl-compute-02.internal (MEProxy); Fri, 08 May 2026 13:17:19 -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=1778260639; x=1778347039; bh=DUXg2KCwxZrLHkCnyyR+AarzHb6xe7BfWq1i4pkjZCw=; b= iLbkBIX4d5d07ZruLhIdcBuO787gy36JGQkDq1q2B+EOd0f0NJqvUPzJlG/GT4Hf ROK9VTBzeqrbrnMHymXIYVnFYw6XhHJdh3ARVn7c7174rvHuxJOfNsFg9Dw6FkkP v3w8qhSN3mxWJsEHAKYqFSsuY00dfVPxJakAYGEDueFaEjJv/RTlIVCNyh+AlyDi 4PecbFE+4GCVWDVM1bISQeIUd9Qha/xO48SGj64AWN8DGKb2+s02ATZIhUaRVvq0 uMzi+d7xvay2MIp/EtpF26weAXp5eGnWLaLqhxxOif07D0hu6TgEgTMrf05BXPti Ou6oVczheOcszyew610bsA== 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=1778260639; x= 1778347039; bh=DUXg2KCwxZrLHkCnyyR+AarzHb6xe7BfWq1i4pkjZCw=; b=q UoSYwV7D/R/hIsWslMZi0vN6+bFUT8fJ2CJ8IW1QWCociX3RkkuJqgbkN6DbOtOT JfTY9qY9f6lJFdS4kGITQ7o5n40GSqutWIF7RKVnZyaLZfSUji/F60ChdeTsb4ux C0/w/mwNsBcQ6nhTavo6nD9RJYNkd+vPTwdVOMKE26VdhyJBuKXERT5NvI5fJTWj jtt4zqiPAUeSuOTDF53EzInkdthLnQuju0TnbNFtkvYdYvTstQumWHv1J5d8c9YV EXMrlta3Cy2vYefDhB8OHYGl3oAJcGTTh9dUaqkSXZqXSWom2awiBPzyM8RX74SA nijVN72B+RHTiFd1IMzqA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduuddtledvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucgoufhushhpvggtthffohhmrghinhculdegledmnecujf gurhepofgtggfghffvfffuvegjfhfksehtkeertdertdejnecuhfhrohhmpeflrghvihgv rhcuvfhirgcuoehflhhoshhssehjvghtmhdrmhgvqeenucggtffrrghtthgvrhhnpedtve ekvdegteevgfegfefggfejheejieefjefhvdduvdeivefgkedulefhiedvfeenucffohhm rghinhepghhithhhuhgsrdhiohdplhhisggtrghmvghrrgdrohhrghenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehflhhoshhssehjvghtmhdr mhgvpdhnsggprhgtphhtthhopeejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhope hrohgsvghrthdrmhgruggvrhestgholhhlrggsohhrrgdrtghomhdprhgtphhtthhopegs rghrnhgrsggrshdrphhotgiivgesihguvggrshhonhgsohgrrhgurdgtohhmpdhrtghpth htohepkhhivghrrghnrdgsihhnghhhrghmsehiuggvrghsohhnsghorghrugdrtghomhdp rhgtphhtthhopehlrghurhgvnhhtrdhpihhntghhrghrthesihguvggrshhonhgsohgrrh gurdgtohhmpdhrtghpthhtoheplhhisggtrghmvghrrgdquggvvhgvlheslhhishhtshdr lhhisggtrghmvghrrgdrohhrghdprhgtphhtthhopehjohhhrghnnhgvshdrghhovgguvg esohhsshdrqhhurghltghomhhmrdgtohhmpdhrtghpthhtohepmhiirghmrgiirghlsehr vgguhhgrthdrtghomh X-ME-Proxy: Feedback-ID: i9dde48b3:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id D9DCD1EA0070; Fri, 8 May 2026 13:17:18 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 From: Javier Tia To: libcamera-devel@lists.libcamera.org Date: Fri, 08 May 2026 10:51:31 -0600 Subject: [PATCH v2 0/3] ipa: simple: OV2740 tuning file and swstats sumShift cleanup Cc: mzamazal@redhat.com, kieran.bingham@ideasonboard.com, laurent.pinchart@ideasonboard.com, barnabas.pocze@ideasonboard.com, johannes.goede@oss.qualcomm.com, robert.mader@collabora.com In-Reply-To: <177817025814.1112523.8335692307235726369@jetm.me> References: <177817025814.1112523.8335692307235726369@jetm.me> Message-ID: <177826063718.39714.13674874482653763631@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" This series adds an OV2740 tuning file calibrated from the Intel IPU6 AIQB binary, plus a small cleanup in the SwStatsCpu sum-shift code that came up during review of v1. To make the calibration approach reproducible for other Intel IPU6 sensors, v2 adds a parse_aiqb.py script that walks the AIQB record chain and emits a libcamera tuning YAML. Patch 1/3 drops the redundant `if (sumShift_)` guard before the three right-shift assignments in SwStatsCpu::finishFrame() (suggested during v1 review). 2/3 adds the OV2740 tuning file. 3/3 adds the parse_aiqb.py script that produced the file in 2/3. Changes since v1: - Patch 1/3: added blank line before the shift block per Laurent's review. Picked up Laurent's and Barnabás's Reviewed-by trailers. - New patch 3/3: parse_aiqb.py script that extracts CCMs, AWB gain limits, and black level from Intel IPU6 AIQB binaries (requested by Hans). The script has only been tested on OV2740_CJFLE23_ADL.aiqb so far; format details and limitations are documented in its module docstring. A walkthrough of the AIQB format and the calibration workflow is on my blog: https://jetm.github.io/blog/posts/ipu6-aiqb-calibration/ Link to v1: https://patchwork.libcamera.org/project/libcamera/list/?series=5920 Javier Tia (3): libcamera: software_isp: Drop redundant sumShift_ guard in finishFrame ipa: simple: data: Add OV2740 tuning file utils: tuning: Add AIQB parser for Intel IPU6 sensors src/ipa/simple/data/meson.build | 1 + src/ipa/simple/data/ov2740.yaml | 52 ++++ src/libcamera/software_isp/swstats_cpu.cpp | 9 +- utils/tuning/parse_aiqb.py | 276 +++++++++++++++++++++ 4 files changed, 333 insertions(+), 5 deletions(-) create mode 100644 src/ipa/simple/data/ov2740.yaml create mode 100644 utils/tuning/parse_aiqb.py