[{"id":38209,"web_url":"https://patchwork.libcamera.org/comment/38209/","msgid":"<177131784834.1178617.4260933555994198182@ping.linuxembedded.co.uk>","date":"2026-02-17T08:44:08","subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal (2026-02-16 20:30:19)\n> This patch series implements parameters and statistics buffer sharing in\n> software ISP.  This is a rebase of an old patch series, adjusted for the\n> current master and GPU ISP.  It implements the following software ISP\n> TODOs:\n> \n> - 2. Reconsider stats sharing\n> - 5. Store ISP parameters in per-frame buffers\n> \n> The first part of the patches deals with parameters buffers, the next\n> part with statistics buffers.\n> \n> It’s a way to make params correspond to the respective frames, which is\n> currently not the case with software ISP.  But with the plans to compute\n> stats on a GPU and make everything synchronous, the only useful patches\n> from this series may eventually be those dropping the software ISP\n> TODOs.  Which means I don’t plan to work on the patches further unless\n> we decide they are needed.\n\nI know it's only RFC, but just reporting the CI pinged me on some\ncompile failures in here. Just trivials by the look of it, an extra\nsemi-colon causing a warning.\n\nhttps://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1606180\n\n> \n> Changes in v2:\n> - Rebase on master and make it working with GPU ISP.\n> \n> Milan Zamazal (14):\n>   libcamera: software_isp: Remove initializer_list include\n>   libcamera: software_isp: Introduce arguments for parameters buffers\n>   libcamera: software_isp: Separate allocation of the parameters buffer\n>   libcamera: software_isp: Track unused parameters buffers\n>   libcamera: software_isp: Allocation of multiple params buffers\n>   libcamera: software_isp: Allocate multiple parameters buffers\n>   libcamera: software_isp: Use multiple parameters buffers in IPA\n>   libcamera: software_isp: Share parameters buffers with debayering\n>   libcamera: software_isp: Remove per-frame params buffers TODO item\n>   libcamera: software_isp: Introduce arguments for statistics buffers\n>   libcamera: software_isp: Allocate statistics buffers\n>   libcamera: software_isp: Track statistics buffers\n>   libcamera: software_isp: Share statistics buffers with IPA\n>   libcamera: software_isp: Remove stats-sharing TODO item\n> \n>  .../internal/software_isp/software_isp.h      |  21 ++-\n>  .../internal/software_isp/swstats_cpu.h       |  21 +--\n>  include/libcamera/ipa/soft.mojom              |  11 +-\n>  src/ipa/simple/soft_simple.cpp                |  94 +++++++------\n>  src/libcamera/pipeline/simple/simple.cpp      |  12 +-\n>  src/libcamera/software_isp/TODO               |  45 -------\n>  src/libcamera/software_isp/debayer.cpp        |  42 ++++--\n>  src/libcamera/software_isp/debayer.h          |  12 +-\n>  src/libcamera/software_isp/debayer_cpu.cpp    |  79 ++++++-----\n>  src/libcamera/software_isp/debayer_cpu.h      |  16 ++-\n>  src/libcamera/software_isp/debayer_egl.cpp    |  18 ++-\n>  src/libcamera/software_isp/debayer_egl.h      |  11 +-\n>  src/libcamera/software_isp/software_isp.cpp   | 126 +++++++++++++++---\n>  src/libcamera/software_isp/swstats_cpu.cpp    |  66 ++++-----\n>  14 files changed, 336 insertions(+), 238 deletions(-)\n> \n> -- \n> 2.53.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DA069C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Feb 2026 08:44:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4102C62209;\n\tTue, 17 Feb 2026 09:44:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BF094620C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Feb 2026 09:44:10 +0100 (CET)","from monstersaurus.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3B4A7161;\n\tTue, 17 Feb 2026 09:43:19 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"acgOvFs5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771317799;\n\tbh=CKYp/FyhFR12kKLNon39WQj0RxmMB+I8+MrEaw0NYiw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=acgOvFs5+XBYpqi/5Ff976EfqVJAFfSgkJ3cU3kbTT+/7OIwd4HdItSKF9FcPRgOb\n\tG+kVCHMOVroH0NbLnWVvXIz3Pih3NQflLuqy7tYGIEyzujnB1OxT2F5K+Wl6T5njNZ\n\tSzfiULKp4XpsJxNbUH+6PtmyJz/k+InGoP2/SLsU=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260216203034.27558-1-mzamazal@redhat.com>","References":"<20260216203034.27558-1-mzamazal@redhat.com>","Subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Tue, 17 Feb 2026 08:44:08 +0000","Message-ID":"<177131784834.1178617.4260933555994198182@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38211,"web_url":"https://patchwork.libcamera.org/comment/38211/","msgid":"<0be8481c-6d12-4754-96d6-7048143f3fed@ideasonboard.com>","date":"2026-02-17T09:41:31","subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 02. 16. 21:30 keltezéssel, Milan Zamazal írta:\n> This patch series implements parameters and statistics buffer sharing in\n> software ISP.  This is a rebase of an old patch series, adjusted for the\n> current master and GPU ISP.  It implements the following software ISP\n> TODOs:\n> \n> - 2. Reconsider stats sharing\n> - 5. Store ISP parameters in per-frame buffers\n> \n> The first part of the patches deals with parameters buffers, the next\n> part with statistics buffers.\n> \n> It’s a way to make params correspond to the respective frames, which is\n> currently not the case with software ISP.  But with the plans to compute\n> stats on a GPU and make everything synchronous, the only useful patches\n\nI think I'm missing something because as far as I can see splitting the statistics\ncollection would just introduce more async:\n\n   1. raw buffer arrives -> queue statistics calculation (async)\n   2. statistics arrive -> queue parameter computations (asnyc)\n   3. parameters arrive -> queue frame processing with parameters (async)\n   4. frame arrives -> signal completion\n\nat least assuming you want to use the statistics of the corresponding frame.\n\n\n> from this series may eventually be those dropping the software ISP\n> TODOs.  Which means I don’t plan to work on the patches further unless\n> we decide they are needed.\n> \n> Changes in v2:\n> - Rebase on master and make it working with GPU ISP.\n> \n> Milan Zamazal (14):\n>    libcamera: software_isp: Remove initializer_list include\n>    libcamera: software_isp: Introduce arguments for parameters buffers\n>    libcamera: software_isp: Separate allocation of the parameters buffer\n>    libcamera: software_isp: Track unused parameters buffers\n>    libcamera: software_isp: Allocation of multiple params buffers\n>    libcamera: software_isp: Allocate multiple parameters buffers\n>    libcamera: software_isp: Use multiple parameters buffers in IPA\n>    libcamera: software_isp: Share parameters buffers with debayering\n>    libcamera: software_isp: Remove per-frame params buffers TODO item\n>    libcamera: software_isp: Introduce arguments for statistics buffers\n>    libcamera: software_isp: Allocate statistics buffers\n>    libcamera: software_isp: Track statistics buffers\n>    libcamera: software_isp: Share statistics buffers with IPA\n>    libcamera: software_isp: Remove stats-sharing TODO item\n> \n>   .../internal/software_isp/software_isp.h      |  21 ++-\n>   .../internal/software_isp/swstats_cpu.h       |  21 +--\n>   include/libcamera/ipa/soft.mojom              |  11 +-\n>   src/ipa/simple/soft_simple.cpp                |  94 +++++++------\n>   src/libcamera/pipeline/simple/simple.cpp      |  12 +-\n>   src/libcamera/software_isp/TODO               |  45 -------\n>   src/libcamera/software_isp/debayer.cpp        |  42 ++++--\n>   src/libcamera/software_isp/debayer.h          |  12 +-\n>   src/libcamera/software_isp/debayer_cpu.cpp    |  79 ++++++-----\n>   src/libcamera/software_isp/debayer_cpu.h      |  16 ++-\n>   src/libcamera/software_isp/debayer_egl.cpp    |  18 ++-\n>   src/libcamera/software_isp/debayer_egl.h      |  11 +-\n>   src/libcamera/software_isp/software_isp.cpp   | 126 +++++++++++++++---\n>   src/libcamera/software_isp/swstats_cpu.cpp    |  66 ++++-----\n>   14 files changed, 336 insertions(+), 238 deletions(-)\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 171C0C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Feb 2026 09:41:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C93C96220A;\n\tTue, 17 Feb 2026 10:41:36 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E28BB620C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Feb 2026 10:41:34 +0100 (CET)","from [192.168.33.77] (185.221.141.206.nat.pool.zt.hu\n\t[185.221.141.206])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4C85E4D3;\n\tTue, 17 Feb 2026 10:40:43 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"oLU1lvqE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1771321243;\n\tbh=EcroHta3rW9Vg+0+OxLZxmDOsZ0t+vmftE0qA87T/Cc=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=oLU1lvqEl1VaEVrE78zCT8DJgL4+6d8Uokp2IccMgP+igT3cQojY8XqJClyJ/P3Gy\n\tXtTjcnxgXPOhLhP2+QCxn9gkoy7JSlAAPIi8mtRj2Y0TbZbgQdbPiQZ9wUSdD3ogZz\n\tWORavSshuA/lbbM1l3KumUrjtGVhwcTTGltw31f4=","Message-ID":"<0be8481c-6d12-4754-96d6-7048143f3fed@ideasonboard.com>","Date":"Tue, 17 Feb 2026 10:41:31 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","References":"<20260216203034.27558-1-mzamazal@redhat.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260216203034.27558-1-mzamazal@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38212,"web_url":"https://patchwork.libcamera.org/comment/38212/","msgid":"<854infd6e2.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-02-17T10:13:57","subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Kieran Bingham <kieran.bingham@ideasonboard.com> writes:\n\n> Quoting Milan Zamazal (2026-02-16 20:30:19)\n>> This patch series implements parameters and statistics buffer sharing in\n>> software ISP.  This is a rebase of an old patch series, adjusted for the\n>\n>> current master and GPU ISP.  It implements the following software ISP\n>> TODOs:\n>> \n>> - 2. Reconsider stats sharing\n>> - 5. Store ISP parameters in per-frame buffers\n>> \n>> The first part of the patches deals with parameters buffers, the next\n>> part with statistics buffers.\n>> \n>> It’s a way to make params correspond to the respective frames, which is\n>> currently not the case with software ISP.  But with the plans to compute\n>> stats on a GPU and make everything synchronous, the only useful patches\n>> from this series may eventually be those dropping the software ISP\n>> TODOs.  Which means I don’t plan to work on the patches further unless\n>> we decide they are needed.\n>\n> I know it's only RFC, but just reporting the CI pinged me on some\n> compile failures in here. Just trivials by the look of it, an extra\n> semi-colon causing a warning.\n>\n> https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1606180\n\nAh, right.  Apparently clang only, I should check it next time.\n\n>> Changes in v2:\n>> - Rebase on master and make it working with GPU ISP.\n>> \n>> Milan Zamazal (14):\n>>   libcamera: software_isp: Remove initializer_list include\n>>   libcamera: software_isp: Introduce arguments for parameters buffers\n>>   libcamera: software_isp: Separate allocation of the parameters buffer\n>>   libcamera: software_isp: Track unused parameters buffers\n>>   libcamera: software_isp: Allocation of multiple params buffers\n>>   libcamera: software_isp: Allocate multiple parameters buffers\n>>   libcamera: software_isp: Use multiple parameters buffers in IPA\n>>   libcamera: software_isp: Share parameters buffers with debayering\n>>   libcamera: software_isp: Remove per-frame params buffers TODO item\n>>   libcamera: software_isp: Introduce arguments for statistics buffers\n>>   libcamera: software_isp: Allocate statistics buffers\n>>   libcamera: software_isp: Track statistics buffers\n>>   libcamera: software_isp: Share statistics buffers with IPA\n>>   libcamera: software_isp: Remove stats-sharing TODO item\n>> \n>>  .../internal/software_isp/software_isp.h      |  21 ++-\n>>  .../internal/software_isp/swstats_cpu.h       |  21 +--\n>>  include/libcamera/ipa/soft.mojom              |  11 +-\n>>  src/ipa/simple/soft_simple.cpp                |  94 +++++++------\n>>  src/libcamera/pipeline/simple/simple.cpp      |  12 +-\n>>  src/libcamera/software_isp/TODO               |  45 -------\n>>  src/libcamera/software_isp/debayer.cpp        |  42 ++++--\n>>  src/libcamera/software_isp/debayer.h          |  12 +-\n>>  src/libcamera/software_isp/debayer_cpu.cpp    |  79 ++++++-----\n>>  src/libcamera/software_isp/debayer_cpu.h      |  16 ++-\n>>  src/libcamera/software_isp/debayer_egl.cpp    |  18 ++-\n>>  src/libcamera/software_isp/debayer_egl.h      |  11 +-\n>>  src/libcamera/software_isp/software_isp.cpp   | 126 +++++++++++++++---\n>>  src/libcamera/software_isp/swstats_cpu.cpp    |  66 ++++-----\n>>  14 files changed, 336 insertions(+), 238 deletions(-)\n>> \n>> -- \n>> 2.53.0\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 97CB3C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Feb 2026 10:14:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3D0A66221B;\n\tTue, 17 Feb 2026 11:14:07 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 837FE620C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Feb 2026 11:14:04 +0100 (CET)","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n\t[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-586-n3AXFmM8MNe6zlY19fbdpA-1; Tue, 17 Feb 2026 05:14:01 -0500","by mail-wm1-f69.google.com with SMTP id\n\t5b1f17b1804b1-48372facfedso44437325e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Feb 2026 02:14:01 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4834d8334a8sm537935605e9.12.2026.02.17.02.13.57\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Feb 2026 02:13:58 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"HBNevwsp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1771323243;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=SQirqg6RJLijW/V5haOTeGXcGvBddh0Yz/2W0qEyutg=;\n\tb=HBNevwspor2/NccP2/Uo90kNuGOF+r+FmN+CBIWmddPz858kCzbdXGgZCclWwHDF3N/awq\n\tuJt4rS7VZpB05pb6tJP9UG9n1OP2X1UYlQpWqav9XkCJMGymg8P25aGpHhYcc/n5zR4c3n\n\tAI6eqVmsyRPYRE4cGz9jnnriZNj+omk=","X-MC-Unique":"n3AXFmM8MNe6zlY19fbdpA-1","X-Mimecast-MFC-AGG-ID":"n3AXFmM8MNe6zlY19fbdpA_1771323240","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1771323239; x=1771928039;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=SQirqg6RJLijW/V5haOTeGXcGvBddh0Yz/2W0qEyutg=;\n\tb=ag1sTnoascL/ggrhv1gZRRutzxoxwF5bQKtSmMTQNmxQesRe3AzBXmvwp9wjCzVeCL\n\tXZAqbh/zI9w6j/4OXdjjA/p7fARVPMs1d8rqFDywgq7rzwJPvLRVqh9Rnt9w30NMyBpi\n\th/06LJnye77GKaWmLjLh1xR8vmc8Hhs1k2N4nmdnv86JDMMYhEM80avTEimrStbY4ol5\n\tgAOBAw5QeZ8T0zuGjlkq0+q86mujmZXYJTIfQtmLkYm1RzJ6SLxKcMxhh7SIMQuX5Uey\n\tzXekgUcoEDK3oiAKMpT56LH7i0EWKdPw/XoWqajpujN0YlTHYufQ/jJ12rTv7p2vobr1\n\tp7/g==","X-Gm-Message-State":"AOJu0YwycKdXBs72ZOU/oMH7je2HV+beQLZZI2H5+ek/cAr7u+qepuj0\n\tUA0yNYcruXZq+SC5+b0cAuzGmLz7njXhZyjXNBSJHdhNn1oKdLUl730x1jb6zM+FEffb48cIsID\n\tFO9XcsEbomhtlU/a4TwEM/mAyYGhxr9NBqyF4IoncranySaFUNMzHfdGeRLjerK1VqhgiOIYwie\n\tHnekAG5NWHULzZnswZ5OhDV6HKB01BqsKobC1nPZT0WoSbSeBLdj5F6RkD7+E=","X-Gm-Gg":"AZuq6aLEDwb/abj8JgiK7o3FdG68F94ea/61n2CVTNfzVu+mUA+FFvcp898PJ8eIqyM\n\t47BOvBjc/BqY8oJYRAFWO8xz8bPhNPNXZv12mtwhZC4HyOaP8a2T4RsdB8/+/JGCLkBwDBjqPVx\n\tBoJME6e1zcpWZVHYIk/o0LszbOIxanu0WlkR5S1a5tDTNzMlFpWmhMuQ8eDuHXqUicMKlSxBpCy\n\t4AmIa2MriPzrKb6ti85Yqz/MxOEfFoT1fiA44vFBN977pQQfv4kxWu2wt3UnzmhTC7v/JzrRU6L\n\tXR+LiLBqq2avuVAgxAAlO1UdTY3dSe7fYJA/wZoGn362pWwN/RBP+HJzFIBgj38Neloef/86SEM\n\tZe80HfYKv9Iw2ik2UDFYRXBfLivTVqXc+IsibuOZyrkWCCK74JCBT6zM0eCEi+9uQjPbGoUQyT0\n\tU=","X-Received":["by 2002:a05:600c:6c51:b0:477:a53c:8ca1 with SMTP id\n\t5b1f17b1804b1-48378d9f626mr134551825e9.14.1771323239227; \n\tTue, 17 Feb 2026 02:13:59 -0800 (PST)","by 2002:a05:600c:6c51:b0:477:a53c:8ca1 with SMTP id\n\t5b1f17b1804b1-48378d9f626mr134551535e9.14.1771323238719; \n\tTue, 17 Feb 2026 02:13:58 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","In-Reply-To":"<177131784834.1178617.4260933555994198182@ping.linuxembedded.co.uk>\n\t(Kieran Bingham's message of \"Tue, 17 Feb 2026 08:44:08 +0000\")","References":"<20260216203034.27558-1-mzamazal@redhat.com>\n\t<177131784834.1178617.4260933555994198182@ping.linuxembedded.co.uk>","Date":"Tue, 17 Feb 2026 11:13:57 +0100","Message-ID":"<854infd6e2.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"j3VuJC2JZStYAiB5XaeRepnTRcQWinM6Dzu2d1oJYvM_1771323240","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":38213,"web_url":"https://patchwork.libcamera.org/comment/38213/","msgid":"<85y0krbqfr.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2026-02-17T10:43:52","subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> 2026. 02. 16. 21:30 keltezéssel, Milan Zamazal írta:\n>> This patch series implements parameters and statistics buffer sharing in\n>> software ISP.  This is a rebase of an old patch series, adjusted for the\n>> current master and GPU ISP.  It implements the following software ISP\n>> TODOs:\n>> - 2. Reconsider stats sharing\n>> - 5. Store ISP parameters in per-frame buffers\n>> The first part of the patches deals with parameters buffers, the next\n>> part with statistics buffers.\n>> It’s a way to make params correspond to the respective frames, which is\n>> currently not the case with software ISP.  But with the plans to compute\n>> stats on a GPU and make everything synchronous, the only useful patches\n>\n> I think I'm missing something because as far as I can see splitting the statistics\n> collection would just introduce more async:\n>\n>   1. raw buffer arrives -> queue statistics calculation (async)\n>   2. statistics arrive -> queue parameter computations (asnyc)\n>   3. parameters arrive -> queue frame processing with parameters (async)\n>   4. frame arrives -> signal completion\n>\n> at least assuming you want to use the statistics of the corresponding frame.\n\nAsync is fine (or even useful) as long as we use the right data\ntogether.  The idea is to replace the current mechanism of \"use whatever\nis available at the moment\" with buffer/frame id tracking.\n\n(I'm sure this doesn't work correctly at the moment as I just rebased\nthe very old series, adjusted it for GPU ISP some way, made it to\ncompile (with gcc), and checked it runs.  For example, I can see there\nis still, unused, debayerParams_ around.  I believe there are other\nbugs.  Doing more ATM would be waste of time unless we decide we need\nthis.  Hence RFC.)\n\n>> from this series may eventually be those dropping the software ISP\n>> TODOs.  Which means I don’t plan to work on the patches further unless\n>> we decide they are needed.\n>> Changes in v2:\n>> - Rebase on master and make it working with GPU ISP.\n>> Milan Zamazal (14):\n>>    libcamera: software_isp: Remove initializer_list include\n>>    libcamera: software_isp: Introduce arguments for parameters buffers\n>>    libcamera: software_isp: Separate allocation of the parameters buffer\n>>    libcamera: software_isp: Track unused parameters buffers\n>>    libcamera: software_isp: Allocation of multiple params buffers\n>>    libcamera: software_isp: Allocate multiple parameters buffers\n>>    libcamera: software_isp: Use multiple parameters buffers in IPA\n>>    libcamera: software_isp: Share parameters buffers with debayering\n>>    libcamera: software_isp: Remove per-frame params buffers TODO item\n>>    libcamera: software_isp: Introduce arguments for statistics buffers\n>>    libcamera: software_isp: Allocate statistics buffers\n>>    libcamera: software_isp: Track statistics buffers\n>>    libcamera: software_isp: Share statistics buffers with IPA\n>>    libcamera: software_isp: Remove stats-sharing TODO item\n>>   .../internal/software_isp/software_isp.h      |  21 ++-\n>>   .../internal/software_isp/swstats_cpu.h       |  21 +--\n>>   include/libcamera/ipa/soft.mojom              |  11 +-\n>>   src/ipa/simple/soft_simple.cpp                |  94 +++++++------\n>>   src/libcamera/pipeline/simple/simple.cpp      |  12 +-\n>>   src/libcamera/software_isp/TODO               |  45 -------\n>>   src/libcamera/software_isp/debayer.cpp        |  42 ++++--\n>>   src/libcamera/software_isp/debayer.h          |  12 +-\n>>   src/libcamera/software_isp/debayer_cpu.cpp    |  79 ++++++-----\n>>   src/libcamera/software_isp/debayer_cpu.h      |  16 ++-\n>>   src/libcamera/software_isp/debayer_egl.cpp    |  18 ++-\n>>   src/libcamera/software_isp/debayer_egl.h      |  11 +-\n>>   src/libcamera/software_isp/software_isp.cpp   | 126 +++++++++++++++---\n>>   src/libcamera/software_isp/swstats_cpu.cpp    |  66 ++++-----\n>>   14 files changed, 336 insertions(+), 238 deletions(-)\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 7856EC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 17 Feb 2026 10:44:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8F44962210;\n\tTue, 17 Feb 2026 11:44:01 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 965B9620C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Feb 2026 11:44:00 +0100 (CET)","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-616-nf0ZHaePP3entjtQWyFdFg-1; Tue, 17 Feb 2026 05:43:56 -0500","by mail-wm1-f70.google.com with SMTP id\n\t5b1f17b1804b1-4836abfc742so27923765e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 17 Feb 2026 02:43:56 -0800 (PST)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-4836cd7af87sm375582295e9.1.2026.02.17.02.43.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 17 Feb 2026 02:43:53 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"ZAsKLYdF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1771325039;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=gcQonDVxbnHrhu3irL9ZPvqL/D+/HBK9FBF7bMhi6vE=;\n\tb=ZAsKLYdFzkWJipk19av5yqAsRK6f02N1oYndZ/bnmVtm+Eu+VwWO/j9XtvwRMvOzj4HYfK\n\tNbu3UhhZHdujlGOrR9SYYG3tacXgnv6gcORiOF9CvHOdeoQn6ZIzVM70IP5+3EYmndVEJQ\n\tRXZLR4azB2iRbvu3yLh2qGloKLIYPtA=","X-MC-Unique":"nf0ZHaePP3entjtQWyFdFg-1","X-Mimecast-MFC-AGG-ID":"nf0ZHaePP3entjtQWyFdFg_1771325035","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1771325034; x=1771929834;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-gg\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=gcQonDVxbnHrhu3irL9ZPvqL/D+/HBK9FBF7bMhi6vE=;\n\tb=ADklOtx29s4Wg167hACmph6FzP9b5nxEN65nKSWAdpMY4g7ldzydFeNnyqWrNDhmPF\n\t1O4b+j2plsBrpqlNFzJktgMt+jb3Yw32eGOTeORmNvcz1VJ+MJ2B5Q1VUg6f8R8iz5C/\n\tg/SvLdcRFjhNn0ESvZkp1jH8qVFcdTms1Bo4y39yxK78Iyf+/4ygnvOo6dpNtSU34JX9\n\tWd9yTJNxWfgJNBMY3Sog0P2TTLTlc6HJ2aP+vnHQQ2IHQNCtqelxsBF+aJJ1wAutIl2Y\n\tpwr3+GL0noG1OjnP6s1tzKQBsPx1YRbJgB4B4+SPGXBBKGwIywDqmkTkFEQ8y8pN9yKW\n\tulfA==","X-Gm-Message-State":"AOJu0Yxq11UdUX+aq2MryfJnZIo7R0UYG1+CCc1fZZNiNoN+WKMVFTH1\n\tAfbHrrvYDByYJMYZR47cZpCJI1PiKh1UOkn2TbMiTBDqsjg7u2gshmXEIZ8M/5+okYRpnEkCIkN\n\tWfT/+f++NJfVA5wKQWGuCnpxEYZeibGQFCK3vfADu3Q2KPEo8mdKVEHsx3MTl6xx2qDC44H/+cb\n\tvdMD9zzLKXDQX8VVHAC46+1CsWIg9TAlykuhPSXHAPJ+ZqxUi/t8HIHaDafj8=","X-Gm-Gg":"AZuq6aIVhv4DWGl23dgPfNXKsKgBfyHjYlVT+UKFfbDr4iQOfRUjnH7YecyIgWln2Rv\n\toYLgVXHDMtlst1JnSKp1EAfnWlTlKex/ksfCnZyruPpU+bk+sHrL0SmEET6izrFTPlf/zwOArwE\n\tfgxsIfdICqCi/VKPtgCg247bNqds540zWgb+db+D/TaOHMv8Bx5345arsZLmE9fe2EamOS9F1sW\n\t65JwUwO9nbH74xmQBua4RF11nRYokOpJYWZNnEUiavt/FzcGJ+A1JDVzDjF6IpNxSG/w8r4SLf+\n\t0ViLTh6ZvdNa6ivfm7pXxz/u5UKi3MD9YFKQFIzxjZDFsTDLKTb2LTmpVnxX4MclCt1sT/wL9bh\n\t0rMBGKehXKkOrM6lNiRbPdqmz+uGajebSEgqJPR/6t+smORISk4rOgIo84vQLLM2nZBy2RJyntj\n\tM=","X-Received":["by 2002:a05:600c:8288:b0:480:6bef:63a0 with SMTP id\n\t5b1f17b1804b1-48379bd7114mr186097365e9.21.1771325034519; \n\tTue, 17 Feb 2026 02:43:54 -0800 (PST)","by 2002:a05:600c:8288:b0:480:6bef:63a0 with SMTP id\n\t5b1f17b1804b1-48379bd7114mr186097065e9.21.1771325033962; \n\tTue, 17 Feb 2026 02:43:53 -0800 (PST)"],"From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [RFC PATCH v2 00/14] Software ISP: Share params and stats\n\tbuffers","In-Reply-To":"<0be8481c-6d12-4754-96d6-7048143f3fed@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Tue,\n\t17 Feb 2026  10:41:31 +0100\")","References":"<20260216203034.27558-1-mzamazal@redhat.com>\n\t<0be8481c-6d12-4754-96d6-7048143f3fed@ideasonboard.com>","Date":"Tue, 17 Feb 2026 11:43:52 +0100","Message-ID":"<85y0krbqfr.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"bMguZpliCb2JwBl8gKpcqVuh822q6W2vUb6QvFEJBJA_1771325035","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]