[{"id":36464,"web_url":"https://patchwork.libcamera.org/comment/36464/","msgid":"<fc2iyhi3tptybpk2rcevy3puoc7hw4fi74yz34pc5rb67oxuvk@cwj4cakztxac>","date":"2025-10-25T12:48:58","subject":"Re: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope","submitter":{"id":232,"url":"https://patchwork.libcamera.org/api/people/232/","name":"Umang Jain","email":"uajain@igalia.com"},"content":"On Thu, Oct 23, 2025 at 04:48:25PM +0200, Stefan Klug wrote:\n> In raw mode the number of configurations is actively limited to 1. It is\n> therefore safe to move isRaw up one level to simplify the code and\n> prepare for later use.\n\nI think this is not the case. This patch will only set isRaw = true,\nonly [config_.size() > 1] and there is a raw stream. When only 1 stream\nis requested  [config_.size() == 1] which is a raw one,\nisRaw will remain to false.\n\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 14 ++++----------\n>  1 file changed, 4 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 0b31b8077c8d..35cb54c812bc 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -559,28 +559,22 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n>  \t * Simultaneous capture of raw and processed streams isn't possible. If\n>  \t * there is any raw stream, cap the number of streams to one.\n>  \t */\n> +\tbool isRaw = false;\n>  \tif (config_.size() > 1) {\n>  \t\tfor (const auto &cfg : config_) {\n>  \t\t\tif (PixelFormatInfo::info(cfg.pixelFormat).colourEncoding ==\n>  \t\t\t    PixelFormatInfo::ColourEncodingRAW) {\n>  \t\t\t\tconfig_.resize(1);\n>  \t\t\t\tstatus = Adjusted;\n> +\t\t\t\tisRaw = true;\n>  \t\t\t\tbreak;\n>  \t\t\t}\n>  \t\t}\n>  \t}\n>  \n>  \tbool useDewarper = false;\n> -\tif (pipe->dewarper_) {\n> -\t\t/*\n> -\t\t * Platforms with dewarper support, such as i.MX8MP, support\n> -\t\t * only a single stream. We can inspect config_[0] only here.\n> -\t\t */\n> -\t\tbool isRaw = PixelFormatInfo::info(config_[0].pixelFormat).colourEncoding ==\n> -\t\t\t     PixelFormatInfo::ColourEncodingRAW;\n> -\t\tif (!isRaw)\n> -\t\t\tuseDewarper = true;\n> -\t}\n> +\tif (pipe->dewarper_ && !isRaw)\n> +\t\tuseDewarper = true;\n>  \n>  \t/*\n>  \t * If there are more than one stream in the configuration figure out the\n> -- \n> 2.48.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 BE03CC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 25 Oct 2025 12:48:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 07AAD606AC;\n\tSat, 25 Oct 2025 14:48:31 +0200 (CEST)","from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA99760697\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 25 Oct 2025 14:48:29 +0200 (CEST)","from amazon1-vf-gw.lnd.cw.net ([195.89.103.118] 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 1vCdh7-00F6fo-3x; Sat, 25 Oct 2025 14:48:29 +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=\"h+OoQbrp\"; 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=zVLadFEulqGJQsBpFFxEa+bFK9pQOJdN6q6FS65nW+8=;\n\tb=h+OoQbrpjtafGDpfl0RZHjIwL8\n\tLNW5eoetSPEdcP3Tb/SlM16HqEkHmFhuPF7+1SApTx5oaXnMFGyNbZa3wcF+FbvcricJ71Rjnq1lm\n\t1OUJq7aHHGIWcKpSLfe/fXtZfNacPKXq7Zv8GVC8LLxMpr4chM3KauFmO9puKE0+VD+++mwWOk9p5\n\tPiZwYVgzU7twzgcAnl+ZCeBn976agE8UYRkpQx6JFqagC6/ZnH3nTcVtTo0a0aTCnRN41nBd1xt5w\n\tCMmkxLp8+EW6tGnWtAJyGjAuaAJFg0o3WupK5Lh4y/+Dz4C5zhhflIwSMgjvl22d0wVxaGrbLc3cj\n\tvlkdmMxw==;","Date":"Sat, 25 Oct 2025 13:48:58 +0100","From":"Umang Jain <uajain@igalia.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope","Message-ID":"<fc2iyhi3tptybpk2rcevy3puoc7hw4fi74yz34pc5rb67oxuvk@cwj4cakztxac>","References":"<20251023144841.403689-1-stefan.klug@ideasonboard.com>\n\t<20251023144841.403689-25-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20251023144841.403689-25-stefan.klug@ideasonboard.com>","User-Agent":"NeoMutt/20250905-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":36490,"web_url":"https://patchwork.libcamera.org/comment/36490/","msgid":"<861e61b7-c214-4b65-a1ee-100abb5d1caa@ideasonboard.com>","date":"2025-10-27T15:02:46","subject":"Re: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 10. 23. 16:48 keltezéssel, Stefan Klug írta:\n> In raw mode the number of configurations is actively limited to 1. It is\n> therefore safe to move isRaw up one level to simplify the code and\n> prepare for later use.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> ---\n>   src/libcamera/pipeline/rkisp1/rkisp1.cpp | 14 ++++----------\n>   1 file changed, 4 insertions(+), 10 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 0b31b8077c8d..35cb54c812bc 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -559,28 +559,22 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n>   \t * Simultaneous capture of raw and processed streams isn't possible. If\n>   \t * there is any raw stream, cap the number of streams to one.\n>   \t */\n> +\tbool isRaw = false;\n>   \tif (config_.size() > 1) {\n>   \t\tfor (const auto &cfg : config_) {\n>   \t\t\tif (PixelFormatInfo::info(cfg.pixelFormat).colourEncoding ==\n>   \t\t\t    PixelFormatInfo::ColourEncodingRAW) {\n>   \t\t\t\tconfig_.resize(1);\n>   \t\t\t\tstatus = Adjusted;\n> +\t\t\t\tisRaw = true;\n>   \t\t\t\tbreak;\n>   \t\t\t}\n>   \t\t}\n>   \t}\n> \n>   \tbool useDewarper = false;\n\n  = pipe->dewarper_ && !isRaw\n\n?\n\n> -\tif (pipe->dewarper_) {\n> -\t\t/*\n> -\t\t * Platforms with dewarper support, such as i.MX8MP, support\n> -\t\t * only a single stream. We can inspect config_[0] only here.\n> -\t\t */\n> -\t\tbool isRaw = PixelFormatInfo::info(config_[0].pixelFormat).colourEncoding ==\n> -\t\t\t     PixelFormatInfo::ColourEncodingRAW;\n> -\t\tif (!isRaw)\n> -\t\t\tuseDewarper = true;\n> -\t}\n> +\tif (pipe->dewarper_ && !isRaw)\n> +\t\tuseDewarper = true;\n> \n>   \t/*\n>   \t * If there are more than one stream in the configuration figure out the\n> --\n> 2.48.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 A07A8BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 27 Oct 2025 15:02:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 77EF960758;\n\tMon, 27 Oct 2025 16:02:52 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E08F16069A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 27 Oct 2025 16:02:50 +0100 (CET)","from [192.168.33.25] (185.182.215.162.nat.pool.zt.hu\n\t[185.182.215.162])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DC2A31122;\n\tMon, 27 Oct 2025 16:01:02 +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=\"haA3a8zk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1761577263;\n\tbh=iEj7qcVyJPGXijsptrQcwRpa6WrIQf6WndE8AUh4wP4=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=haA3a8zk9oJZ05JZMLfRqpMGegpijEG1HDQLpj/yVhJ61vE8UIC6eaLsLqoUswsXQ\n\tYReRmNSG6+69udTEanYuAQJCzL+DNN1aI6Mgn8XG/uO85+Q4pdPattK0UiNbNt2+FC\n\tOmwBwwR0XC5w1rd+gRWS0LSPQ0GdNGjZRfpdBn2U=","Message-ID":"<861e61b7-c214-4b65-a1ee-100abb5d1caa@ideasonboard.com>","Date":"Mon, 27 Oct 2025 16:02:46 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope","To":"Stefan Klug <stefan.klug@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20251023144841.403689-1-stefan.klug@ideasonboard.com>\n\t<3yhac5sLsP-Kcbgs4n9uWRBXRRJXeGIGXbWnPf8M2QzpdRrFaH6m5hlSvnOG8OFWXUDM5W5Q_EgjF-vzTUXWDg==@protonmail.internalid>\n\t<20251023144841.403689-25-stefan.klug@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20251023144841.403689-25-stefan.klug@ideasonboard.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":37048,"web_url":"https://patchwork.libcamera.org/comment/37048/","msgid":"<176408248032.1350675.6269202899111724549@localhost>","date":"2025-11-25T14:54:40","subject":"Re: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the review.\n\nQuoting Umang Jain (2025-10-25 14:48:58)\n> On Thu, Oct 23, 2025 at 04:48:25PM +0200, Stefan Klug wrote:\n> > In raw mode the number of configurations is actively limited to 1. It is\n> > therefore safe to move isRaw up one level to simplify the code and\n> > prepare for later use.\n> \n> I think this is not the case. This patch will only set isRaw = true,\n> only [config_.size() > 1] and there is a raw stream. When only 1 stream\n> is requested  [config_.size() == 1] which is a raw one,\n> isRaw will remain to false.\n\nThanks for spotting this. I fixed it in v3.\n\nBest regards,\nStefan\n\n> \n> > \n> > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n> > ---\n> >  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 14 ++++----------\n> >  1 file changed, 4 insertions(+), 10 deletions(-)\n> > \n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > index 0b31b8077c8d..35cb54c812bc 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> > @@ -559,28 +559,22 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n> >        * Simultaneous capture of raw and processed streams isn't possible. If\n> >        * there is any raw stream, cap the number of streams to one.\n> >        */\n> > +     bool isRaw = false;\n> >       if (config_.size() > 1) {\n> >               for (const auto &cfg : config_) {\n> >                       if (PixelFormatInfo::info(cfg.pixelFormat).colourEncoding ==\n> >                           PixelFormatInfo::ColourEncodingRAW) {\n> >                               config_.resize(1);\n> >                               status = Adjusted;\n> > +                             isRaw = true;\n> >                               break;\n> >                       }\n> >               }\n> >       }\n> >  \n> >       bool useDewarper = false;\n> > -     if (pipe->dewarper_) {\n> > -             /*\n> > -              * Platforms with dewarper support, such as i.MX8MP, support\n> > -              * only a single stream. We can inspect config_[0] only here.\n> > -              */\n> > -             bool isRaw = PixelFormatInfo::info(config_[0].pixelFormat).colourEncoding ==\n> > -                          PixelFormatInfo::ColourEncodingRAW;\n> > -             if (!isRaw)\n> > -                     useDewarper = true;\n> > -     }\n> > +     if (pipe->dewarper_ && !isRaw)\n> > +             useDewarper = true;\n> >  \n> >       /*\n> >        * If there are more than one stream in the configuration figure out the\n> > -- \n> > 2.48.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 2A631C326B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Nov 2025 14:54:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E014260A9E;\n\tTue, 25 Nov 2025 15:54:45 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 37369609D8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Nov 2025 15:54:44 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:bae1:340c:573c:570b])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 084062C5;\n\tTue, 25 Nov 2025 15:52:34 +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=\"R/p9Vy+L\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764082355;\n\tbh=4+lKqdIPL9UBB2qktvNd6Moy6Pvk2eXiL+GO15s4tek=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=R/p9Vy+LJsUk2D/NvvvwHEJAAfXjcPxGT4FIS7RoV38dfagmP08W5yBFe/j160YXm\n\t8KzvUxNDkbuySSGMyqikCRr7d+gurztZr5csS3jqGomZoPs3HWk9knnEoOAC+egaHv\n\t6GR7zeSyDoJHKsWC0SSvf28VvJ/sIKUQzlG94bEo=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<fc2iyhi3tptybpk2rcevy3puoc7hw4fi74yz34pc5rb67oxuvk@cwj4cakztxac>","References":"<20251023144841.403689-1-stefan.klug@ideasonboard.com>\n\t<20251023144841.403689-25-stefan.klug@ideasonboard.com>\n\t<fc2iyhi3tptybpk2rcevy3puoc7hw4fi74yz34pc5rb67oxuvk@cwj4cakztxac>","Subject":"Re: [PATCH v2 24/35] pipeline: rksip1: Move isRaw up in scope","From":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","To":"Umang Jain <uajain@igalia.com>","Date":"Tue, 25 Nov 2025 15:54:40 +0100","Message-ID":"<176408248032.1350675.6269202899111724549@localhost>","User-Agent":"alot/0.12.dev8+g2c003385c862.d20250602","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>"}}]