From patchwork Tue Jul 7 12:29:44 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 27260 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 AEA93C3323 for ; Tue, 7 Jul 2026 12:30:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6BDCE66075; Tue, 7 Jul 2026 14:30:09 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nOm3A/RH"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F089658BF for ; Tue, 7 Jul 2026 14:30:07 +0200 (CEST) Received: from [192.168.1.182] (93-46-82-201.ip106.fastwebnet.it [93.46.82.201]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 799D6673; Tue, 7 Jul 2026 14:29:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1783427357; bh=dQMwIy0yojOjmppg7t0GCB6xqOJhON17YNqSITg5YFE=; h=From:Subject:Date:To:Cc:From; b=nOm3A/RHsBW1MJHzEPyv2dyk2oGgdC3ra8UX2Ai8P/pjFSmjE72lBxeVXJaXNr3zH 8ZgAEUQ3bNOb3tOVexHvx4I9o6QhQhs8UszahECBvn9I5RU7RtrtQa2++iCgCUtvsu /j6eFq+lTvalVvGRJwLhFysgaUfaZKXR/ayNqoDA= From: Jacopo Mondi Subject: [PATCH v5 0/2] ipa: libipa: Add support for V4L2 ISP statistics Date: Tue, 07 Jul 2026 14:29:44 +0200 Message-Id: <20260707-extensible-stats-v5-0-f5539feb0f46@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIADjxTGoC/33NQQ7CIBCF4as0rMXAFEp15T2MCwamlkSLgaapM b276KqL6vJ/yXzzYplSoMyO1YslmkIOcSihdxVzvR2uxIMvzUBAI7TQnOaRhhzwRjyPdszcGID WICm0LStnj0RdmL/k+VK6D3mM6fn9MMnP+gebJBdcoG6cQYnom1PwZHMcMNrk9y7e2cecYO2YD QeK4ztnD/XB+hrMD6deO+2GUxenA2mURUUS1A9HrRwJG44qDgkFumukkQQbzrIsb1ZOX66PAQA A X-Change-ID: 20260505-extensible-stats-772287be4ba8 To: libcamera-devel@lists.libcamera.org, Antoine Bouyer Cc: Jacopo Mondi , Kieran Bingham , Paul Elder X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1705; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=dQMwIy0yojOjmppg7t0GCB6xqOJhON17YNqSITg5YFE=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqTPFNRabcjsXdaXe9V2SLgnq/k5JMk61WBwIk/ 5ZHizsLs0+JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCakzxTQAKCRByNAaPFqFW PBSnD/4l4JvHMf7Y+moorvRsiWARI7YRix3uEVGaVb2+x6pZYcrNCvj4CS+OE7NrOQQtGtavKHt 3hIVNzbXnfkLDhV5iTfOXWPPrHLEZPbqCW+3OLpLSkuZujRW+u0EdNX8HpPZecuux7sPyxpbG12 OIZF7HkK8S1rnxyK8qwg0/nNeGo27tH0JaBVw8xhbAyvKbi0FVw4j/XlOvEDZrkrLyyT1gfVkF8 Mb60HWQqoZBCGX/FxhCtEyuzzXGpyTzMO1DWVdqovu1LJs2yh4MzqnhWtCxg+/SoMIXwNHQUPIi NG9/9vdO0UGLoSgikqsrqmcDw/2yO00iQHTKJSiaNdZIo0057q6a4Ckxsmu8+xo6IfDtpddfm6n 64HrfH2Vs8TUMpS/rGKo+plill5XC3fnlwvf5Ej0tPv0J0KyMd74KZRhNO6uK36nm+DaHuXZ+8N 07qd3CcispdtF7HPkoa/rx2sO/S9xJ85ohWEoeZ+/VhnUHdnF9a+hXAYQHzdDaeQfXSE7SZu76T 2Oue9jVnem3JSptMVtch+LvZsb83J4QTLI7zBZ421Jp0qwjUcPMab0JzzAw0DqjmRB3vz/hy1Tp D8Hg2nZTyBsW2t3wp0cq+4nIEdgN/lVYfH1G+VuoiBBhNfJtMWB+LIMWkyZNleN9e2tMW0SZ+cU cz3MlMsMsTrSBZg== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=72392EDC88144A65C701EA9BA5826A2587AD026B 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" Support for extensible stats has been submitted for review first by Antonie then broken-out to a dedicated patch series here: https://patchwork.linuxtv.org/project/linux-media/list/?series=24772 With the same spirit as V4L2Params, introduce a V4L2Stats class to help IPA modules handle a buffer of V4L2 ISP statistics. There are currently no users in-tree of the class but we have an example user in the RPP-X1 IPA module available at: https://gitlab.freedesktop.org/jmondi/libcamera/-/blob/v4h/jmondi/rppx1/src/ipa/rppx1/stats.h https://gitlab.freedesktop.org/jmondi/libcamera/-/blob/v4h/jmondi/rppx1/src/ipa/rppx1/algorithms/awb.cpp#L365 Signed-off-by: Jacopo Mondi --- Changes in v5: - Update to v3 of kernel v4l2-stats - Add Paul's tags and address his comments on documentation Changes in v4: - Restore public constructor for V4L2Stats - Address Barnabas' comments Changes in v3: - Drop V4L2StatsBlock - Introduce V4L2StatsBase - Build a cache of stats block at construction time Changes in v2: - Address Kieran's and Barnabas' comment --- Jacopo Mondi (2): include: v4l2-isp: Update to support extensible stats ipa: libipa: Introduce V4L2Stats include/linux/media/v4l2-isp.h | 125 +++++++++++++-------- src/ipa/libipa/meson.build | 2 + src/ipa/libipa/v4l2_stats.cpp | 243 +++++++++++++++++++++++++++++++++++++++++ src/ipa/libipa/v4l2_stats.h | 67 ++++++++++++ 4 files changed, 391 insertions(+), 46 deletions(-) --- base-commit: 709ad59a8d90af3570be1c8d02dee0ec9e011954 change-id: 20260505-extensible-stats-772287be4ba8 Best regards,