[{"id":34955,"web_url":"https://patchwork.libcamera.org/comment/34955/","msgid":"<ykbrqd3klawee6zwzbqya3xnijsbgue7ad274hzs76cjhidkzg@7uoxapinckqw>","date":"2025-07-21T05:40:53","subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On Fri, Jul 11, 2025 at 07:53:35PM +0200, Milan Zamazal wrote:\n> When software ISP is enabled, we want to be able to provide a raw stream\n> in addition to the processed stream.  For this purpose, we need two\n> streams.  If only the processed stream is requested, it doesn't harm to\n> allocate two.\n> \n> This is a hack for the lack of a better easy option.  The number of\n> streams is determined as a camera property in the pipeline matching.\n> The actual number of streams needed (one or two) is determined only when\n> examining roles in SimplePipelineHandler::generateConfiguration.\n> \n> In theory, software ISP could produce multiple processed streams but\n> this is out of scope of this patch series.  Hence two streams are\n> sufficient at the moment.\n> \n> When software ISP is not enabled, the camera won't be able to produce\n> multiple streams (assuming there's no hardware converter) and only\n> single stream should be allocated as before.  The simple pipeline\n> handler assumes there's a linear pipeline from the camera sensor to a\n> video capture device, and only supports a single stream.  Branches in\n> the hardware pipeline that would allow capturing multiple streams from\n> the same camera sensor are not supported.  We have no plan to change\n> that, as a device that can produce multiple streams will likely be\n> better supported by a dedicated pipeline handler.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/libcamera/pipeline/simple/simple.cpp | 13 ++++++++++++-\n>  1 file changed, 12 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index d45480fe7..06532ed26 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1723,7 +1723,18 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)\n>  \t\t}\n>  \t}\n>  \n> -\tswIspEnabled_ = info->swIspEnabled;\n> +\tif (info->swIspEnabled) {\n> +\t\t/*\n> +\t\t * When the software ISP is enabled, the simple pipeline handler\n> +\t\t * exposes the raw stream, giving a total of two streams. This\n> +\t\t * is mutally exclusive with the presence of a converter.\n> +\t\t */\n> +\t\tASSERT(!converter_);\n> +\t\tnumStreams = 2;\n> +\t\tswIspEnabled_ = true;\n> +\t} else {\n> +\t\tswIspEnabled_ = false;\n> +\t}\n\nsimply assign swIspEnabled_ to false, at construction time and get rid\nof else block. This is fixed up in my branch.\n\n>  \n>  \t/* Locate the sensors. */\n>  \tstd::vector<MediaEntity *> sensors = locateSensors(media);\n> -- \n> 2.50.1\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 BB5F0BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Jul 2025 05:40:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0DF0168FC1;\n\tMon, 21 Jul 2025 07:40:51 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 74047614F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Jul 2025 07:40:49 +0200 (CEST)","from [49.36.71.87] (helo=uajain) by fanzine2.igalia.com with\n\tesmtpsa \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1udjGa-001ZzP-79; Mon, 21 Jul 2025 07:40:48 +0200"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"abRqvjLK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:\n\tSubject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=qZc9Ta0edjK9NsYY6NVAEnyJZgYIcrcyOq8+3KFvcqQ=;\n\tb=abRqvjLKWAhUiZ4RcOv9mKmF2b\n\t3wLNs+ADTr4ax4vhXGfzX8DVFbA63SU4aTA6cWpgt1vg/9rNyzzVy5e4LbBuU9hFlZ20ARGyqB1XZ\n\tffbgrOcbyxXy7NylIRF7NNEJbXtpANrAzCgngMZEOhoyTxqbiyoXGUw5wHJb6M5rUvPI+OpXYG5Nc\n\t5g74ux7V8lrH064I4PBYAZQEIoUV4NoQAgBKjN6goLq1C+cXEI/rcGyT9/VYiQtGV9Q6Epgvw7Pt0\n\ts32oEUW81ckq2pzvIsSw9vJNIDkFDaPd1h4ynYXVXh7w64Oli3ipE5GP5HwcA5rh+6p3Nq5moKdJr\n\tjUgRrzfQ==;","Date":"Mon, 21 Jul 2025 11:10:53 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>, Paul Elder\n\t<paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","Message-ID":"<ykbrqd3klawee6zwzbqya3xnijsbgue7ad274hzs76cjhidkzg@7uoxapinckqw>","References":"<20250711175345.90318-1-mzamazal@redhat.com>\n\t<20250711175345.90318-3-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20250711175345.90318-3-mzamazal@redhat.com>","User-Agent":"NeoMutt/20250510-dirty","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":35002,"web_url":"https://patchwork.libcamera.org/comment/35002/","msgid":"<85frepbal5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-07-21T19:36:06","subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Umang,\n\nUmang Jain <uajain@igalia.com> writes:\n\n> On Fri, Jul 11, 2025 at 07:53:35PM +0200, Milan Zamazal wrote:\n>> When software ISP is enabled, we want to be able to provide a raw stream\n>> in addition to the processed stream.  For this purpose, we need two\n>\n>> streams.  If only the processed stream is requested, it doesn't harm to\n>> allocate two.\n>> \n>> This is a hack for the lack of a better easy option.  The number of\n>> streams is determined as a camera property in the pipeline matching.\n>> The actual number of streams needed (one or two) is determined only when\n>> examining roles in SimplePipelineHandler::generateConfiguration.\n>> \n>> In theory, software ISP could produce multiple processed streams but\n>> this is out of scope of this patch series.  Hence two streams are\n>> sufficient at the moment.\n>> \n>> When software ISP is not enabled, the camera won't be able to produce\n>> multiple streams (assuming there's no hardware converter) and only\n>> single stream should be allocated as before.  The simple pipeline\n>> handler assumes there's a linear pipeline from the camera sensor to a\n>> video capture device, and only supports a single stream.  Branches in\n>> the hardware pipeline that would allow capturing multiple streams from\n>> the same camera sensor are not supported.  We have no plan to change\n>> that, as a device that can produce multiple streams will likely be\n>> better supported by a dedicated pipeline handler.\n>> \n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>  src/libcamera/pipeline/simple/simple.cpp | 13 ++++++++++++-\n>>  1 file changed, 12 insertions(+), 1 deletion(-)\n>> \n>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> index d45480fe7..06532ed26 100644\n>> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> @@ -1723,7 +1723,18 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)\n>>  \t\t}\n>>  \t}\n>>  \n>> -\tswIspEnabled_ = info->swIspEnabled;\n>> +\tif (info->swIspEnabled) {\n>> +\t\t/*\n>> +\t\t * When the software ISP is enabled, the simple pipeline handler\n>> +\t\t * exposes the raw stream, giving a total of two streams. This\n>> +\t\t * is mutally exclusive with the presence of a converter.\n>> +\t\t */\n>> +\t\tASSERT(!converter_);\n>> +\t\tnumStreams = 2;\n>> +\t\tswIspEnabled_ = true;\n>> +\t} else {\n>> +\t\tswIspEnabled_ = false;\n>> +\t}\n>\n> simply assign swIspEnabled_ to false, at construction time and get rid\n> of else block. This is fixed up in my branch.\n\nI think assigning it here is both clearer and safer -- the decision\npoint is here, not in the construction time.\n\n>>  \t/* Locate the sensors. */\n>>  \tstd::vector<MediaEntity *> sensors = locateSensors(media);\n>> -- \n>> 2.50.1\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 0B195BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 21 Jul 2025 19:36:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ED91A6901C;\n\tMon, 21 Jul 2025 21:36:14 +0200 (CEST)","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 2F97268FB1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Jul 2025 21:36:13 +0200 (CEST)","from mail-wr1-f71.google.com (mail-wr1-f71.google.com\n\t[209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-388-oushTsQcMRqtbxz5kIBUiA-1; Mon, 21 Jul 2025 15:36:10 -0400","by mail-wr1-f71.google.com with SMTP id\n\tffacd0b85a97d-3b20f50da27so2250805f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 21 Jul 2025 12:36:09 -0700 (PDT)","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-4562e81ccb4sm169759405e9.17.2025.07.21.12.36.07\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 21 Jul 2025 12:36:07 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"LHZF/xcB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1753126571;\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\tin-reply-to:in-reply-to:references:references;\n\tbh=qUQxmWwlUKuBt1qeSOQc15Y7R4VLuVeROzGhQ3rbs0o=;\n\tb=LHZF/xcBFCRG0JoCR4gUbYxy81s8o8P2OsUMiTALXbBdGE/MKiYWw8ANEeedkIt6oD4FME\n\t9ltcz7X1o26Iog13VNL31W90qnh36+0YPSSHh4JhRc7k6VAOQAFppQ01L8pLhLAgxoouBe\n\tegq9wGLdBFH/KKKLMAdo7H+aIKU+k0M=","X-MC-Unique":"oushTsQcMRqtbxz5kIBUiA-1","X-Mimecast-MFC-AGG-ID":"oushTsQcMRqtbxz5kIBUiA_1753126569","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1753126569; x=1753731369;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=qUQxmWwlUKuBt1qeSOQc15Y7R4VLuVeROzGhQ3rbs0o=;\n\tb=Rp5BcNFcs/dDF0ZCNnbhKSO/RLhvx0CUgkU9I2ijw8XwMN+t2H46Js1jLWA3Ni20M5\n\tutyZnQp5E3GMBHAQQVVn/axn8GmNzrbWDW+87SEM8hrsvFUoXFLlmSf4a7marJVawZOm\n\tICo/wglBFtQh9uzkc33wJ2Xc1vVydFT9qBE6Upzc1s/gsDfrrZfMp8pFj1l0n5zAyl6p\n\t9pFXyGaZj2lIKCclD/TPNBvtaNQ6zociDRfsSnmGAPXphYgM8kuVfZ34T5Xmwt+D07F1\n\tVFofxGgHjG09xCq3dWNAvERa3p9I6k7JYrdpHbi2dps/nshkW1pUkulqNHJRv5LzHjP6\n\tLJgg==","X-Gm-Message-State":"AOJu0Yw58PGWdsDLvrcj1xR+qnBVjNfzTh3lXxq+oCqqzLNFnsf/WJw6\n\tcJ52sLWq6CHgQsov9UO/2k3wUv//ofvbCdptNkZ2VTnS5CItbMNbetlilVxX37q1XjHRTCw9X/w\n\tDe0589sdUPYmMCmX16sxm0Pvl2zzUNE7bUmDPu/oKp6dvpOtxYa7etCeGgeNmH3UU6qY+nsNIVA\n\tg=","X-Gm-Gg":"ASbGncunOZNwjwQdwajFRvUHQeATml/dQLGWMqkcOUztMdJFLl5YQdZTYMu2fI5xGCN\n\tnOSZHGlaC0HG5TVV6V/ngY+X1LiH8K+Js2gaadjdnhRrU0/2FiIrF9dyiU6No/6z/fBZFs9UBf+\n\tqJRgcrcsIHdsASjEZH3qfTldcrZH6Mb8X/PD1QQD//tH+PxSO7ov7+2b9jSwFYr2uu2TxhJAZ9e\n\tRER+Ik4cuqENwgnsEs5seg/AP2BCMLwI9DN8gaP10gmHseRnUz8b5DKofoRX/sfeUOdj5/fj5pi\n\tRewK0OEE9/bejevYUZIp4IKe5XehQb6/JMDdjdlCUpjMn+Luf9sPO4S12//wwPIxJ0RrlREXtKo\n\txOFSz6xush7aujTA2","X-Received":["by 2002:a05:6000:1885:b0:3b5:f8ea:28ff with SMTP id\n\tffacd0b85a97d-3b763485513mr543792f8f.6.1753126568727; \n\tMon, 21 Jul 2025 12:36:08 -0700 (PDT)","by 2002:a05:6000:1885:b0:3b5:f8ea:28ff with SMTP id\n\tffacd0b85a97d-3b763485513mr543779f8f.6.1753126568338; \n\tMon, 21 Jul 2025 12:36:08 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IGqugCVwuIUA5HY/5Ei7gaj19BQ0KpGfJGsBz1fv7w1t47VWgBj56sJ4tAzT3sVfJbM2s/F+w==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org,  Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?=\n\t<barnabas.pocze@ideasonboard.com>, Paul Elder\n\t<paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","In-Reply-To":"<ykbrqd3klawee6zwzbqya3xnijsbgue7ad274hzs76cjhidkzg@7uoxapinckqw>\n\t(Umang Jain's message of \"Mon, 21 Jul 2025 11:10:53 +0530\")","References":"<20250711175345.90318-1-mzamazal@redhat.com>\n\t<20250711175345.90318-3-mzamazal@redhat.com>\n\t<ykbrqd3klawee6zwzbqya3xnijsbgue7ad274hzs76cjhidkzg@7uoxapinckqw>","Date":"Mon, 21 Jul 2025 21:36:06 +0200","Message-ID":"<85frepbal5.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":"-J7a1SCyqWl_I2C3jfmeb4y85qQ4zyPWxTKY8AuKgJI_1753126569","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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":35007,"web_url":"https://patchwork.libcamera.org/comment/35007/","msgid":"<bxlx5d5boifzujitxeiknunxx4tnt5nrs5lg7omyrpdwr3g4n6@5ayqk33nwxms>","date":"2025-07-22T05:57:39","subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On Mon, Jul 21, 2025 at 09:36:06PM +0200, Milan Zamazal wrote:\n> Hi Umang,\n> \n> Umang Jain <uajain@igalia.com> writes:\n> \n> > On Fri, Jul 11, 2025 at 07:53:35PM +0200, Milan Zamazal wrote:\n> >> When software ISP is enabled, we want to be able to provide a raw stream\n> >> in addition to the processed stream.  For this purpose, we need two\n> >\n> >> streams.  If only the processed stream is requested, it doesn't harm to\n> >> allocate two.\n> >> \n> >> This is a hack for the lack of a better easy option.  The number of\n> >> streams is determined as a camera property in the pipeline matching.\n> >> The actual number of streams needed (one or two) is determined only when\n> >> examining roles in SimplePipelineHandler::generateConfiguration.\n> >> \n> >> In theory, software ISP could produce multiple processed streams but\n> >> this is out of scope of this patch series.  Hence two streams are\n> >> sufficient at the moment.\n> >> \n> >> When software ISP is not enabled, the camera won't be able to produce\n> >> multiple streams (assuming there's no hardware converter) and only\n> >> single stream should be allocated as before.  The simple pipeline\n> >> handler assumes there's a linear pipeline from the camera sensor to a\n> >> video capture device, and only supports a single stream.  Branches in\n> >> the hardware pipeline that would allow capturing multiple streams from\n> >> the same camera sensor are not supported.  We have no plan to change\n> >> that, as a device that can produce multiple streams will likely be\n> >> better supported by a dedicated pipeline handler.\n> >> \n> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> >> ---\n> >>  src/libcamera/pipeline/simple/simple.cpp | 13 ++++++++++++-\n> >>  1 file changed, 12 insertions(+), 1 deletion(-)\n> >> \n> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> >> index d45480fe7..06532ed26 100644\n> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> >> @@ -1723,7 +1723,18 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)\n> >>  \t\t}\n> >>  \t}\n> >>  \n> >> -\tswIspEnabled_ = info->swIspEnabled;\n> >> +\tif (info->swIspEnabled) {\n> >> +\t\t/*\n> >> +\t\t * When the software ISP is enabled, the simple pipeline handler\n> >> +\t\t * exposes the raw stream, giving a total of two streams. This\n> >> +\t\t * is mutally exclusive with the presence of a converter.\n> >> +\t\t */\n> >> +\t\tASSERT(!converter_);\n> >> +\t\tnumStreams = 2;\n> >> +\t\tswIspEnabled_ = true;\n> >> +\t} else {\n> >> +\t\tswIspEnabled_ = false;\n> >> +\t}\n> >\n> > simply assign swIspEnabled_ to false, at construction time and get rid\n> > of else block. This is fixed up in my branch.\n> \n> I think assigning it here is both clearer and safer -- the decision\n> point is here, not in the construction time.\n\nI see this as just a matter of caching the info->swIspEnabled boolean\npassed in supportedDevices[]. I don't see this as any kind of decision point.\n\n> \n> >>  \t/* Locate the sensors. */\n> >>  \tstd::vector<MediaEntity *> sensors = locateSensors(media);\n> >> -- \n> >> 2.50.1\n> >> \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 40E8ABDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Jul 2025 05:57:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 575E96901C;\n\tTue, 22 Jul 2025 07:57:40 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D706614EE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Jul 2025 07:57:38 +0200 (CEST)","from [49.36.71.87] (helo=uajain) by fanzine2.igalia.com with\n\tesmtpsa \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1ue60P-00213o-3R; Tue, 22 Jul 2025 07:57:37 +0200"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=igalia.com header.i=@igalia.com\n\theader.b=\"oiJSgnbT\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;\n\ts=20170329;\n\th=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:\n\tSubject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:\n\tContent-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc\n\t:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:\n\tList-Post:List-Owner:List-Archive;\n\tbh=gE3Wx6/z3Sge4zc6zLjvnjjrmC5jN5ZBukXNjQs5D5Q=;\n\tb=oiJSgnbT3lK/3za1G59i3yO6U0\n\tnMrQEJHa5vURlWCgyTZzUuFEZKPpGVQp6BotQWDo0IOZc1FFyoDaU3Xjlxp/CFa+ca6qGdvaw3Ro1\n\tCYn02oU2OTCnCNlexL5BN3J2+aj7KSa6rStQ4ggWLPPwJooSfsXVurNiCw0ARWAOUjI1gOp08dsZR\n\tvMtBa94xJk0rGk3ivZ0KVayN6tAyPqwQxRLyPnPjYuaR30tJREprAI/5mr+uDUr4OkHh/G3p7c0vp\n\tvYib3mlvdAaIxZORLugVtOg7PTeI4YDl/xFDb4KXcDjxa3U6YOhfrH4GId/1OdN8HF/JH5e/K9Nbp\n\t8TOJyn0g==;","Date":"Tue, 22 Jul 2025 11:27:39 +0530","From":"Umang Jain <uajain@igalia.com>","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>, Paul Elder\n\t<paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","Message-ID":"<bxlx5d5boifzujitxeiknunxx4tnt5nrs5lg7omyrpdwr3g4n6@5ayqk33nwxms>","References":"<20250711175345.90318-1-mzamazal@redhat.com>\n\t<20250711175345.90318-3-mzamazal@redhat.com>\n\t<ykbrqd3klawee6zwzbqya3xnijsbgue7ad274hzs76cjhidkzg@7uoxapinckqw>\n\t<85frepbal5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<85frepbal5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"NeoMutt/20250510-dirty","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":35009,"web_url":"https://patchwork.libcamera.org/comment/35009/","msgid":"<85bjpcr6bn.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-07-22T08:13:48","subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Umang Jain <uajain@igalia.com> writes:\n\n> On Mon, Jul 21, 2025 at 09:36:06PM +0200, Milan Zamazal wrote:\n>> Hi Umang,\n>> \n>\n>> Umang Jain <uajain@igalia.com> writes:\n>> \n>> > On Fri, Jul 11, 2025 at 07:53:35PM +0200, Milan Zamazal wrote:\n>> >> When software ISP is enabled, we want to be able to provide a raw stream\n>> >> in addition to the processed stream.  For this purpose, we need two\n>> >\n>> >> streams.  If only the processed stream is requested, it doesn't harm to\n>> >> allocate two.\n>> >> \n>> >> This is a hack for the lack of a better easy option.  The number of\n>> >> streams is determined as a camera property in the pipeline matching.\n>> >> The actual number of streams needed (one or two) is determined only when\n>> >> examining roles in SimplePipelineHandler::generateConfiguration.\n>> >> \n>> >> In theory, software ISP could produce multiple processed streams but\n>> >> this is out of scope of this patch series.  Hence two streams are\n>> >> sufficient at the moment.\n>> >> \n>> >> When software ISP is not enabled, the camera won't be able to produce\n>> >> multiple streams (assuming there's no hardware converter) and only\n>> >> single stream should be allocated as before.  The simple pipeline\n>> >> handler assumes there's a linear pipeline from the camera sensor to a\n>> >> video capture device, and only supports a single stream.  Branches in\n>> >> the hardware pipeline that would allow capturing multiple streams from\n>> >> the same camera sensor are not supported.  We have no plan to change\n>> >> that, as a device that can produce multiple streams will likely be\n>> >> better supported by a dedicated pipeline handler.\n>> >> \n>> >> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> >> ---\n>> >>  src/libcamera/pipeline/simple/simple.cpp | 13 ++++++++++++-\n>> >>  1 file changed, 12 insertions(+), 1 deletion(-)\n>> >> \n>> >> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> >> index d45480fe7..06532ed26 100644\n>> >> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> >> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> >> @@ -1723,7 +1723,18 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)\n>> >>  \t\t}\n>> >>  \t}\n>> >>  \n>> >> -\tswIspEnabled_ = info->swIspEnabled;\n>> >> +\tif (info->swIspEnabled) {\n>> >> +\t\t/*\n>> >> +\t\t * When the software ISP is enabled, the simple pipeline handler\n>> >> +\t\t * exposes the raw stream, giving a total of two streams. This\n>> >> +\t\t * is mutally exclusive with the presence of a converter.\n>> >> +\t\t */\n>> >> +\t\tASSERT(!converter_);\n>> >> +\t\tnumStreams = 2;\n>> >> +\t\tswIspEnabled_ = true;\n>> >> +\t} else {\n>> >> +\t\tswIspEnabled_ = false;\n>> >> +\t}\n>> >\n>> > simply assign swIspEnabled_ to false, at construction time and get rid\n>> > of else block. This is fixed up in my branch.\n>> \n>> I think assigning it here is both clearer and safer -- the decision\n>> point is here, not in the construction time.\n>\n> I see this as just a matter of caching the info->swIspEnabled boolean\n> passed in supportedDevices[]. I don't see this as any kind of decision point.\n\nYes, but there is no idea about the value at the construction time, it\ncould be set to true there as well; if it was set to a particular value\njust to avoid having an `else' branch in a completely different place,\nit'd only indicate it shouldn't be set at the construction time at all.\n\n>> \n>> >>  \t/* Locate the sensors. */\n>> >>  \tstd::vector<MediaEntity *> sensors = locateSensors(media);\n>> >> -- \n>> >> 2.50.1\n>> >> \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 2D71ABDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 22 Jul 2025 08:13:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4D4F86901E;\n\tTue, 22 Jul 2025 10:13:56 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F51068FAC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Jul 2025 10:13:54 +0200 (CEST)","from mail-wm1-f72.google.com (mail-wm1-f72.google.com\n\t[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-225-30AoVN0nOR2ejV6zzZQmAA-1; Tue, 22 Jul 2025 04:13:51 -0400","by mail-wm1-f72.google.com with SMTP id\n\t5b1f17b1804b1-45526e19f43so20747565e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 22 Jul 2025 01:13:50 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb ([85.93.96.130])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-3b61ca24224sm12787399f8f.8.2025.07.22.01.13.48\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 22 Jul 2025 01:13:48 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"XwIe7n6L\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1753172033;\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\tin-reply-to:in-reply-to:references:references;\n\tbh=LlJDTEtloxwgDZWhajOWfFshqynuoclwiMtTdnEPJ2M=;\n\tb=XwIe7n6LO4xXhpciAHo/lnHnEWrr6zS9D3xi3J2dIsMyJ4BX0wJcJ7NJJXyK5KoZXzwqZi\n\tAejFdzsCVKdTWsj/pKYQJXY5iVnBbdXrNRgvWNW1hnR9Ao3dTi2MnO125OLbjnDqo2BOn2\n\t1gEz2NCM5EdvlPUton6WYrt3FnKrjk0=","X-MC-Unique":"30AoVN0nOR2ejV6zzZQmAA-1","X-Mimecast-MFC-AGG-ID":"30AoVN0nOR2ejV6zzZQmAA_1753172030","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1753172030; x=1753776830;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=LlJDTEtloxwgDZWhajOWfFshqynuoclwiMtTdnEPJ2M=;\n\tb=UgnNYs/JwKEqBzwEzrKMye6eIThyVPUINrnyyvlQAysmxKP2l7JXMo4OeqJYpHwTV2\n\t6ENivmO6CXnxtiRLuBNQW2OUCec45UzDPuegCxaS8/PESeYmYw16zIctq1a5ATRlGSLy\n\t2umGIkdcQg+TyPeFcsBvCcCUT2zOsw0WuzrCUrohns/tkXA+bXZ+os54k3niNbRMZMWB\n\t6j8I7CrIEpytEGzslFd93iHKNX1FLnZP1XdmGeLDrlf/Ezb8Ra9oytNcsmEFTHy8blXJ\n\tdQnPlE3KwR+VyrUOAOlBrw8sZO9kVvn9jMKc5AUtaD2TwVpFf6Hw+Ua9u338FARVx0nS\n\thmOg==","X-Gm-Message-State":"AOJu0Yyl683/rcCR3+CMMwRPMxqvZXEoHqAO03ga70YMor4xAeGTbDRe\n\t582LOV/q476TN638LJS5gm7S8oGBppXWrOYtGCeMM2AG1Tu5utb/wIstHbjLx8Nuz94YOlYOxKx\n\tvEoBgJevJddfKPvCPgjZ45vtwhvmqXhjvlBlG4hvp490EM3hdABpgqASazyJT8mynxDewQf9/74\n\tI=","X-Gm-Gg":"ASbGncsGRPcwIrnpXqYdUq3u/s4fJ2EOKnHJlGABZA8f8zt5lzLhUN8Yx15l3l9iYQJ\n\tu1wnaBT7Q/Y8luFwyymJna65pBQNGnGdOVqwfa2c7UV8BvqpaxOzJr0k+XMynRR7HdMvgOSEHt2\n\tBF7KpCq2dqzH+sjnVSWlew/MEAqaC204ki7wz4ZuiO0kWZNDm8wJXsqLBjy+op2XyufFs8G0ccw\n\tuMNSee+rGA5TW4/IJIkATtwcEyRRBRPnOFmxzKpmLolBYsI5kgJ3wOhleSOM3/oiodPeoMEsoTp\n\t9dhmYopLFJpqEXCYWUPPak+xTJy9nP2ql6Kw1y5RxrGp9BmZvhlgIU74E+rPrwHt","X-Received":["by 2002:a05:600c:64c5:b0:442:f4a3:b5ec with SMTP id\n\t5b1f17b1804b1-4563b89f065mr128620185e9.4.1753172029865; \n\tTue, 22 Jul 2025 01:13:49 -0700 (PDT)","by 2002:a05:600c:64c5:b0:442:f4a3:b5ec with SMTP id\n\t5b1f17b1804b1-4563b89f065mr128619985e9.4.1753172029408; \n\tTue, 22 Jul 2025 01:13:49 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IHFI61Ruf/SU2sxACGpK4nSPUelyUvfBKJv5Mwp/l87xRtOP5Ci9c5RPIRNJIObzKFpO+EQNg==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"Umang Jain <uajain@igalia.com>","Cc":"libcamera-devel@lists.libcamera.org,  Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?=\n\t<barnabas.pocze@ideasonboard.com>, Paul Elder\n\t<paul.elder@ideasonboard.com>","Subject":"Re: [PATCH v10 2/8] libcamera: simple: Set the number of software\n\tISP streams to 2","In-Reply-To":"<bxlx5d5boifzujitxeiknunxx4tnt5nrs5lg7omyrpdwr3g4n6@5ayqk33nwxms>\n\t(Umang Jain's message of \"Tue, 22 Jul 2025 11:27:39 +0530\")","References":"<20250711175345.90318-1-mzamazal@redhat.com>\n\t<20250711175345.90318-3-mzamazal@redhat.com>\n\t<ykbrqd3klawee6zwzbqya3xnijsbgue7ad274hzs76cjhidkzg@7uoxapinckqw>\n\t<85frepbal5.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<bxlx5d5boifzujitxeiknunxx4tnt5nrs5lg7omyrpdwr3g4n6@5ayqk33nwxms>","Date":"Tue, 22 Jul 2025 10:13:48 +0200","Message-ID":"<85bjpcr6bn.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":"9iP9A99uvNJb2IBEZiAkQaWh24dwceK5cYsblrTMgPw_1753172030","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","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>"}}]