From patchwork Tue May 12 13:45:04 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 26734 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 F2210BDB1C for ; Tue, 12 May 2026 13:45:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E7F4063024; Tue, 12 May 2026 15:45:17 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="cJBnZ6hl"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 75F696271A for ; Tue, 12 May 2026 15:45:16 +0200 (CEST) Received: from [192.168.1.7] (net-93-65-100-155.cust.vodafonedsl.it [93.65.100.155]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 47CEE838; Tue, 12 May 2026 15:45:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1778593508; bh=0VFIWoxY/ugYpp5HhiT2T+wsSGL6l1XcjYidceVG3iw=; h=From:Subject:Date:To:Cc:From; b=cJBnZ6hlB7rqc+6mvU1feKWjwGNm/1MPDKncUqwGD27K6a9/sTlzLkTL2jIdhzKOd AHEjz4NilvQ26t6O5bB4ZNIAzWuJYVALOpnlTEEw9aecC2kbk/ZYZXKYlOGKll0pLj OPE37G9sEWyIx9Uyp3iqRGzKLJAy27pvL6hgi7Pg= From: Jacopo Mondi Subject: [PATCH v4 0/2] ipa: libipa: Add support for V4L2 ISP statistics Date: Tue, 12 May 2026 15:45:04 +0200 Message-Id: <20260512-extensible-stats-v4-0-e0425f6171e2@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOAuA2oC/33NQQ6CMBCF4auQrq1ph0LBlfcwLjp0kCZKTUsIh nB3CysW6PJ/yXwzs0jBUWSXbGaBRhed71OoU8aazvQP4s6mZiCgFIUoOE0D9dHhk3gczBC51gC VRlJoKpbO3oFaN23k7Z66c3Hw4bN9GOW6/sFGyQUXWJSNRoloy6uzZKLv0Ztgz41/sdUcYe/oA weSY9vG1HltbA76h5PvnerAyZPTgtTKoCIJ6sBZluULFerggkcBAAA= X-Change-ID: 20260505-extensible-stats-772287be4ba8 To: libcamera-devel@lists.libcamera.org, Antoine Bouyer Cc: Jacopo Mondi , Kieran Bingham X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1589; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=0VFIWoxY/ugYpp5HhiT2T+wsSGL6l1XcjYidceVG3iw=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBqAy7rrS/d4EiS111WhTWC6A6Q6YVuRboVNxod0 Ax3wJDDaSKJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCagMu6wAKCRByNAaPFqFW PORnEACnYm+5W0JFtE2QyVtL0c2qTmf4AR4rl9l1zkh4b6mXnC2v+dDJBSQLgiE5zYzrcjwnZ2m lKmGDVACFQlfSsU3DJHt2Ho3O927glh1QlcgGp79RW6Hs0wApI2CXMDAze5iT3h6bRwGVzRQAHJ 9+KxkBMFbKBQpTqsFz5II+OU1PPGkY1Lu3/ZPaaiGDsD+jnoSsv1SbftwMXg5/t66arJgihk+g1 ZrpbABsqZW0F/MsxFHOgexiXR1EmwdrdCzA59puRQp3y7mTPM53GEYwQtiRekakiNUhdiMSUqqs F36c+3zC/UIZ7LdkRAmks2EVPv8kltToaqc4BZk/sCaY+3hDjQ8ZoJasZL7PSrp2uCzKBRS8TaA c0nfSXZRORwwKxb8qh2T6vra+wWvQjl5d1eUZ6llHPP29OWBEeaG7cyWfbP5ziB8Fx2ZQCx6qVR ZC4H5fchf9sSI8k3chscaE/7Ce9L+1RTCZnYcHG2yFGnizzSpULnuRDvh0oSkhortvnHjqwkK9W mRMUt98nvhzL6Dm/Muuoiq5kC7a3xs1R94n6MCi3ofzKvQJushepYlINDDEA0OVmJPbwSWybw5l V9suu50QzvvM589YwG3pQ5gvpFQRKEWYObCvE6DhbecF/BB++vfz8bCqbhn4EDYspEPxpWynQA7 XJUyULlCyPH+bFQ== 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 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: b0dbd5100b1b1665dd2bc839d06263d55a89a6bd change-id: 20260505-extensible-stats-772287be4ba8 Best regards,