[{"id":35304,"web_url":"https://patchwork.libcamera.org/comment/35304/","msgid":"<pi2c6ppj2g22fw6yk5lwax2xkfz6g54t4gv7gno6stpnphzrlh@by2kxvyhraco>","date":"2025-08-08T04:42:04","subject":"Re: [PATCH v12 6/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, Aug 04, 2025 at 06:38:09PM +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> The number of streams is determined as a camera property in the pipeline\n> matching.  To be able to produce both raw and processed output, two\n> streams must be provided.  The actual number of streams needed (one or\n> two) is determined only when examining roles in\n> SimplePipelineHandler::generateConfiguration.\n\nThe last sentence should be changed. A application can easily bypass\ngenerateConfiguration and hand craft CameraConfiguration, passing it to\nvalidate(). So I think no. of streams needed is deterministically\nevaluated at validation phase.\n\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 | 10 ++++++++++\n>  1 file changed, 10 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 12fbe533e..46c316fd7 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -1789,6 +1789,16 @@ bool SimplePipelineHandler::matchDevice(MediaDevice *media,\n>  \t\t}\n>  \t}\n>  \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\ns/mutally/mutually/\n\nReviewed-by: Umang Jain <uajain@igalia.com>\n\n> +\t\t */\n> +\t\tASSERT(!converter_);\n> +\t\tnumStreams = 2;\n> +\t}\n> +\n>  \tswIspEnabled_ = info.swIspEnabled;\n>  \n>  \t/* Locate the sensors. */\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 416C8BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  8 Aug 2025 04:41:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 15C596921F;\n\tFri,  8 Aug 2025 06:41:57 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2BEDF61460\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  8 Aug 2025 06:41:55 +0200 (CEST)","from [49.36.71.143] (helo=uajain)\n\tby fanzine2.igalia.com with esmtpsa \n\t(Cipher TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim) id 1ukEvR-00BLjH-Vk; Fri, 08 Aug 2025 06:41:54 +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=\"QLuCvhNb\"; 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=ds8G3O1Dji1bilbKfJoAVoqTnRGbdJjQBVzvqLfjcjw=;\n\tb=QLuCvhNbFF9owsW3IuIXyT+OC6\n\tU+Azdl6c4Pd0AY7H1CBA3lsK7zl7VuWNHAOWFIpxvdWB4GBxGhHDB9UKfk9Y0Ai9DpTHIHoKTgwwD\n\tgsvMHIOiRmn4tRQ48sE0FKWqTlxOsIrR+/Lqrzvi+ddoj47KERJ7LUpFoymbX9S10KvwgRGpg3spP\n\tJYJ5nembj4JCuGCgoAhn1RgJuOBHbVtXZ79+pN3DbWGgEgCc4YnW4dIGJzZwJSY5J/taGQDTCfX/x\n\tcoiN61D3TkKHtfmCkF0aPnA0qUErHi893GzOV69FnwmEK4mocs1FicGeX1aGGQvuQaN8l7dJNaNs9\n\tsxbp8Flw==;","Date":"Fri, 8 Aug 2025 10:12:04 +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 v12 6/8] libcamera: simple: Set the number of software\n\tISP streams to 2","Message-ID":"<pi2c6ppj2g22fw6yk5lwax2xkfz6g54t4gv7gno6stpnphzrlh@by2kxvyhraco>","References":"<20250804163812.126022-1-mzamazal@redhat.com>\n\t<20250804163812.126022-7-mzamazal@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20250804163812.126022-7-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":35375,"web_url":"https://patchwork.libcamera.org/comment/35375/","msgid":"<854iubzed8.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-08-13T10:48:35","subject":"Re: [PATCH v12 6/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 Mon, Aug 04, 2025 at 06:38:09PM +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>> The number of streams is determined as a camera property in the pipeline\n>> matching.  To be able to produce both raw and processed output, two\n>> streams must be provided.  The actual number of streams needed (one or\n>> two) is determined only when examining roles in\n>> SimplePipelineHandler::generateConfiguration.\n>\n> The last sentence should be changed. A application can easily bypass\n> generateConfiguration and hand craft CameraConfiguration, passing it to\n> validate(). So I think no. of streams needed is deterministically\n> evaluated at validation phase.\n\nRight, I'll change it.\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 | 10 ++++++++++\n>>  1 file changed, 10 insertions(+)\n>> \n>> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n>> index 12fbe533e..46c316fd7 100644\n>> --- a/src/libcamera/pipeline/simple/simple.cpp\n>> +++ b/src/libcamera/pipeline/simple/simple.cpp\n>> @@ -1789,6 +1789,16 @@ bool SimplePipelineHandler::matchDevice(MediaDevice *media,\n>>  \t\t}\n>>  \t}\n>>  \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>\n> s/mutally/mutually/\n\nOh, flyspell-prog-mode not enabled.  I'll fix both.\n\n> Reviewed-by: Umang Jain <uajain@igalia.com>\n>\n>> +\t\t */\n>> +\t\tASSERT(!converter_);\n>> +\t\tnumStreams = 2;\n>> +\t}\n>> +\n>>  \tswIspEnabled_ = info.swIspEnabled;\n>>  \n>>  \t/* Locate the sensors. */\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 7539BBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 13 Aug 2025 10:48:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C76069250;\n\tWed, 13 Aug 2025 12:48:42 +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 E3CAC69249\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Aug 2025 12:48:39 +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-360-6TMM0HLJObyBlDNsSBAFSw-1; Wed, 13 Aug 2025 06:48:38 -0400","by mail-wr1-f71.google.com with SMTP id\n\tffacd0b85a97d-3b78a034d25so3349655f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 13 Aug 2025 03:48:37 -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-45a16ddb5c9sm26683565e9.10.2025.08.13.03.48.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 13 Aug 2025 03:48:35 -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=\"PY7YFPhm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1755082119;\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=hrtSugeN2B/ATsomS912fn7+V/U/4gwpo+xtdVJaorw=;\n\tb=PY7YFPhmpV16Yc8RxYCUdPbFQbOaGcdn9TJb3RQuMtLxpgbcQXCXyiFOfIu3oasMbkoVmF\n\thHXnBQRyF4sbhFOOI8mxMKpMRXLhQ0OxS+y7jRWeBGpmx4R2VtLQcXjJEdUrN18Do0cBfL\n\tYSqK1/9gF2zJ7MHncsS3/u9u3r/F71Y=","X-MC-Unique":"6TMM0HLJObyBlDNsSBAFSw-1","X-Mimecast-MFC-AGG-ID":"6TMM0HLJObyBlDNsSBAFSw_1755082117","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1755082117; x=1755686917;\n\th=mime-version:message-id:date:user-agent: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=hrtSugeN2B/ATsomS912fn7+V/U/4gwpo+xtdVJaorw=;\n\tb=jbCFsNQbBSHjJFxume6ZRVNPPc4yYyv6NLGIKUmdkU5yz2lOfO2FmuEuifKhyk0dfX\n\tVsTy83pNJkct/lcWx08jujuYKs0N9CrOaKZElDsPL14J0pYgEWGEoQrnCzQYMzZYzJ5U\n\tD0AD0H/lToo2m1b2cewJ3HVBXAnGsCIWpJpG0lv8SoKkSzKL/jvSpnvtrb/ieLQY0vMu\n\tcqz2SaLuMBGtdYx9TDfOBFjQXqGTi569pxBy7Z2MWJIBcSUATOTGNYKzrIJ2XtBhY/NG\n\t0JIbpl8lbj1hfRQZN7x8PSjOmNW/KFP8TNWW2YBltYs5Xs3r4ivYHJHGNc+XjX52efOY\n\tbf7A==","X-Gm-Message-State":"AOJu0YzmL4jVjfEJYxb/OHlRTTuntVOB57xRNbqAyZo+QAKcQp5AI9Y9\n\t98uoysfOmZd5EC4gA18vXNEb9Y6QWBmsl3m6oxgDxPkYGEdfb84OYTshZYgA8kYcPtBwRGThvZ1\n\tXnkNtQGwsX8wziO0NsjO2dna2ldUjvr7WTJngNCkB3SZBHBfo8mLOMibkLSBxon4y2gQ/FtOZhX\n\tY=","X-Gm-Gg":"ASbGncv9luOTMAEdOm3i+LMLayLr86zA6/NWaF01WxbVmudjtMns612XZPBxqt41wxd\n\tRAaIE1QDE/9jvCL2nIASE78Ip9JCNRiQ6vleZRtKUJ9EtS+QHkymPUrez4Vz8s3DTRDDvf3mziv\n\tgMwOG90hP7Gk/Yr77zbQ5dWZ+YEnd/SitByAomffPzHX6bf9wS/dBjcvAuACer9KSXE879qdnEs\n\tNYiA217Bu77Jv7vteJt0zK750aURasZX9ZI8Yf55c114DkKA30sgK6jtLPapmC/l80AxW5j+iSs\n\tt9D6Nohvox5imgZbxql+9EKJ+K1XtEa7/Kb51QgNDsDhTy93KEX8sV9kP8i8CENb/IEfl1n+vIu\n\t8TVIv1MwF4cnCPV4I","X-Received":["by 2002:a05:6000:2501:b0:3b7:8473:31c3 with SMTP id\n\tffacd0b85a97d-3b917d29c2dmr2158022f8f.9.1755082116657; \n\tWed, 13 Aug 2025 03:48:36 -0700 (PDT)","by 2002:a05:6000:2501:b0:3b7:8473:31c3 with SMTP id\n\tffacd0b85a97d-3b917d29c2dmr2158001f8f.9.1755082116193; \n\tWed, 13 Aug 2025 03:48:36 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IEDTKfshnj2n+VxfOJOcwp5rVSUNM98eVqAx+Ul6XbcnIdW7LA51KPHNh3Ump8Ca1MCZ4NWyQ==","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 v12 6/8] libcamera: simple: Set the number of software\n\tISP streams to 2","In-Reply-To":"<pi2c6ppj2g22fw6yk5lwax2xkfz6g54t4gv7gno6stpnphzrlh@by2kxvyhraco>\n\t(Umang Jain's message of \"Fri, 8 Aug 2025 10:12:04 +0530\")","References":"<20250804163812.126022-1-mzamazal@redhat.com>\n\t<20250804163812.126022-7-mzamazal@redhat.com>\n\t<pi2c6ppj2g22fw6yk5lwax2xkfz6g54t4gv7gno6stpnphzrlh@by2kxvyhraco>","User-Agent":"Gnus/5.13 (Gnus v5.13)","Date":"Wed, 13 Aug 2025 12:48:35 +0200","Message-ID":"<854iubzed8.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"eUfvIXpEpSPb7yt09GerkHWyg81eZ1vrxbozWHfGzJE_1755082117","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>"}}]