[{"id":27103,"web_url":"https://patchwork.libcamera.org/comment/27103/","msgid":"<293f0825-2d1f-5eea-14e9-66fb628b3480@ideasonboard.com>","date":"2023-05-16T05:48:44","subject":"Re: [libcamera-devel] [PATCH v4 4/4] libcamera: rkisp1: Fix\n\tenumeration of RAW formats","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch\n\nOn 3/21/23 10:50 PM, Jacopo Mondi via libcamera-devel wrote:\n> The current implementation enumerates a single RAW format (the sensor's\n> resolution) and does that regardless of what role the\n> CameraConfiguration has been generated for.\n>\n> Fix this by:\n> - Enumerate RAW StreamFormats only when the requested role is\n>    StreamRole::Raw\n> - Add all the sensor's provided resolutions that fit the video device\n>    output maximum size\n>\n> Before this patch, a single RAW size was enumerated in stream formats\n>\n>   * Pixelformat: SRGGB10 (4208x3120)-(4208x3120)/(+1,+1)\n>    - 4208x3120\n>\n> With this patch applied all sensor's supported resolutions are\n> enumerated but only when the stream role RAW is explicitly requested\n>\n>   * Pixelformat: SRGGB10 (1048x780)-(4208x3120)/(+0,+0)\n>    - 1048x780\n>    - 2104x1560\n>    - 4032x3024\n>    - 4208x3120\n>\n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>   src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 19 +++++++++++++++++--\n>   1 file changed, 17 insertions(+), 2 deletions(-)\n>\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> index cca593b84260..8d606de7880f 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> @@ -150,18 +150,33 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor,\n>   \tfor (const auto &format : streamFormats_) {\n>   \t\tconst PixelFormatInfo &info = PixelFormatInfo::info(format);\n>   \n> +\t\t/* Populate stream formats for non-RAW configurations. */\n>   \t\tif (info.colourEncoding != PixelFormatInfo::ColourEncodingRAW) {\n> +\t\t\tif (role == StreamRole::Raw)\n> +\t\t\t\tcontinue;\n> +\n>   \t\t\tstreamFormats[format] = { { minResolution, maxResolution } };\n>   \t\t\tcontinue;\n>   \t\t}\n\n\n                 /* Populate stream formats for non-RAW configurations. */\n                 if (role != StreamRole::Raw &&\n                     info.colourEncoding != \nPixelFormatInfo::ColourEncodingRAW) {\n                         streamFormats[format] = { { minResolution, \nmaxResolution } };\n                         continue;\n                 }\nPossibly?\n\nRest looks good to me\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n>   \n> -\t\t/* Skip raw formats not supported by the sensor. */\n> +\t\t/* Skip RAW formats for non-raw roles. */\n> +\t\tif (role != StreamRole::Raw)\n> +\t\t\tcontinue;\n> +\n> +\t\t/* Populate stream formats for RAW configurations. */\n>   \t\tuint32_t mbusCode = formatToMediaBus.at(format);\n>   \t\tif (std::find(mbusCodes.begin(), mbusCodes.end(), mbusCode) ==\n>   \t\t    mbusCodes.end())\n> +\t\t\t/* Skip formats not supported by sensor. */\n>   \t\t\tcontinue;\n>   \n> -\t\tstreamFormats[format] = { { resolution, resolution } };\n> +\t\t/* Add all the RAW sizes the sensor can produce for this code. */\n> +\t\tfor (const auto &rawSize : sensor->sizes(mbusCode)) {\n> +\t\t\tif (rawSize > maxResolution_)\n> +\t\t\t\tcontinue;\n> +\n> +\t\t\tstreamFormats[format].push_back({ rawSize, rawSize });\n> +\t\t}\n>   \n>   \t\t/*\n>   \t\t * Store the raw format with the highest bits per pixel for","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 5C8D6BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 16 May 2023 05:48:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CD63E627CD;\n\tTue, 16 May 2023 07:48:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5F39360545\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 May 2023 07:48:50 +0200 (CEST)","from [192.168.1.106] (unknown [103.86.18.166])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A1A2FB;\n\tTue, 16 May 2023 07:48:38 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1684216131;\n\tbh=bw6r1lSx0E/sXhuWD4OM04Bu4bnkSSeMGQkoqg/PDz4=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=b6j5uhGA+1bbKJaOsRddpVr6n9S0hks94GTK2PYtY3+EbeCoa6NngbdYiwijmdAjN\n\tUHSOgjpAGMq7kGi81mpxU+qKr61VJOSKaU1yH0/05rNYNeWh45gHctpbfOF88Q8dlF\n\tF4EzapplFHiOzsssaFvcDtzQ5h4x19AgV8oDe4pT1xB/PN4ZMaqb1ECk0uAC5ireM1\n\teFYx36Bs61g/h1mCvAq+JQIuyC1LboFlHq1XvRSn2FU/cdtZVsLSXzK8TMf53/uCBt\n\tJb8FdNPg0HHd9ggXNAZ3RQQq1uzUyOKmhGmcITSFRkTEhU4b7DEu+jOcLQYQZLF3mM\n\tyEolvVhlfJhrQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1684216119;\n\tbh=bw6r1lSx0E/sXhuWD4OM04Bu4bnkSSeMGQkoqg/PDz4=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=XmysCwAmiTfUAQkgDxkRLJgqqbEV2FK6Cgj/1tH8Ck6/FRqsIJYM/yXD0OCVFbi4Z\n\tJiW6OXKfwdKE3y7B0YVavky2Go+uJa8pfeN2aZUvnszeVyDv5Pt4PrOyDjsZLvBwkL\n\tdzJU+6nb7CF/OD7XxEqBVCowHMOqdoA+k8LUAiDk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"XmysCwAm\"; dkim-atps=neutral","Message-ID":"<293f0825-2d1f-5eea-14e9-66fb628b3480@ideasonboard.com>","Date":"Tue, 16 May 2023 11:18:44 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.7.1","Content-Language":"en-US","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20230321172004.176852-1-jacopo.mondi@ideasonboard.com>\n\t<20230321172004.176852-5-jacopo.mondi@ideasonboard.com>","In-Reply-To":"<20230321172004.176852-5-jacopo.mondi@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v4 4/4] libcamera: rkisp1: Fix\n\tenumeration of RAW formats","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>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Cc":"libcamera@luigi311.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27259,"web_url":"https://patchwork.libcamera.org/comment/27259/","msgid":"<20230605144639.GE31538@pendragon.ideasonboard.com>","date":"2023-06-05T14:46:39","subject":"Re: [libcamera-devel] [PATCH v4 4/4] libcamera: rkisp1: Fix\n\tenumeration of RAW formats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nOn Tue, May 16, 2023 at 11:18:44AM +0530, Umang Jain via libcamera-devel wrote:\n> On 3/21/23 10:50 PM, Jacopo Mondi via libcamera-devel wrote:\n> > The current implementation enumerates a single RAW format (the sensor's\n> > resolution) and does that regardless of what role the\n> > CameraConfiguration has been generated for.\n> >\n> > Fix this by:\n> > - Enumerate RAW StreamFormats only when the requested role is\n> >    StreamRole::Raw\n> > - Add all the sensor's provided resolutions that fit the video device\n> >    output maximum size\n> >\n> > Before this patch, a single RAW size was enumerated in stream formats\n> >\n> >   * Pixelformat: SRGGB10 (4208x3120)-(4208x3120)/(+1,+1)\n> >    - 4208x3120\n> >\n> > With this patch applied all sensor's supported resolutions are\n> > enumerated but only when the stream role RAW is explicitly requested\n> >\n> >   * Pixelformat: SRGGB10 (1048x780)-(4208x3120)/(+0,+0)\n> >    - 1048x780\n> >    - 2104x1560\n> >    - 4032x3024\n> >    - 4208x3120\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> > ---\n> >   src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 19 +++++++++++++++++--\n> >   1 file changed, 17 insertions(+), 2 deletions(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> > index cca593b84260..8d606de7880f 100644\n> > --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> > +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> > @@ -150,18 +150,33 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor,\n> >   \tfor (const auto &format : streamFormats_) {\n> >   \t\tconst PixelFormatInfo &info = PixelFormatInfo::info(format);\n> >   \n> > +\t\t/* Populate stream formats for non-RAW configurations. */\n> >   \t\tif (info.colourEncoding != PixelFormatInfo::ColourEncodingRAW) {\n> > +\t\t\tif (role == StreamRole::Raw)\n> > +\t\t\t\tcontinue;\n> > +\n> >   \t\t\tstreamFormats[format] = { { minResolution, maxResolution } };\n> >   \t\t\tcontinue;\n> >   \t\t}\n> \n> \n>                  /* Populate stream formats for non-RAW configurations. */\n>                  if (role != StreamRole::Raw &&\n>                      info.colourEncoding != PixelFormatInfo::ColourEncodingRAW) {\n>                          streamFormats[format] = { { minResolution, maxResolution } };\n>                          continue;\n>                  }\n> Possibly?\n\nThat's a different behaviour. Consider what happens if\ninfo.colourEncoding != PixelFormatInfo::ColourEncodingRAW && role ==\nStreamRole::Raw without and with this change.\n\n> Rest looks good to me\n> \n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> \n> >   \n> > -\t\t/* Skip raw formats not supported by the sensor. */\n> > +\t\t/* Skip RAW formats for non-raw roles. */\n> > +\t\tif (role != StreamRole::Raw)\n> > +\t\t\tcontinue;\n> > +\n> > +\t\t/* Populate stream formats for RAW configurations. */\n> >   \t\tuint32_t mbusCode = formatToMediaBus.at(format);\n> >   \t\tif (std::find(mbusCodes.begin(), mbusCodes.end(), mbusCode) ==\n> >   \t\t    mbusCodes.end())\n> > +\t\t\t/* Skip formats not supported by sensor. */\n> >   \t\t\tcontinue;\n> >   \n> > -\t\tstreamFormats[format] = { { resolution, resolution } };\n> > +\t\t/* Add all the RAW sizes the sensor can produce for this code. */\n> > +\t\tfor (const auto &rawSize : sensor->sizes(mbusCode)) {\n> > +\t\t\tif (rawSize > maxResolution_)\n> > +\t\t\t\tcontinue;\n> > +\n> > +\t\t\tstreamFormats[format].push_back({ rawSize, rawSize });\n> > +\t\t}\n> >   \n> >   \t\t/*\n> >   \t\t * Store the raw format with the highest bits per pixel for","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 61579C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jun 2023 14:46:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDE6762886;\n\tMon,  5 Jun 2023 16:46:42 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CA976287D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jun 2023 16:46:41 +0200 (CEST)","from pendragon.ideasonboard.com (om126156242094.26.openmobile.ne.jp\n\t[126.156.242.94])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 60110BC;\n\tMon,  5 Jun 2023 16:46:15 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685976402;\n\tbh=wfyitCsLu5sABXwhCNFJkiMBtOW+hYAmn6MCKFwJjFY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=MebG+2yCtd0aP72uuc2uXt3S4KCTkgbyA1WhmuOuK05O62TRyIvsLzQRRup3Y5lSU\n\tnBPXDypmLKNttEvX9xUgOlCCUwFcSoQ2WNRa8dAwKRgtwolPRsRw8rklrQdmhwCtYC\n\tMNlR7PSoBe4Ii83+Ij5FDYl2ajqrvQJg97YKZa8L3CsqIWhJ7cIqGOWLVKf93/ZHJx\n\tkgPx0wyCu1Y/GkaiZ7mUoxYxqQonFgNScrCXcd+kY0R003B6cz104hmCuQkHG0W3//\n\tKPeHI+wks5Xa2AMzC3ftn8QQikMFWDtYGhlb1oN0iAa3O6aZBHkDma5fiyLt06fwP6\n\tEV44Zj/l1n9uQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1685976376;\n\tbh=wfyitCsLu5sABXwhCNFJkiMBtOW+hYAmn6MCKFwJjFY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=MWm4dbVkHfEPXVr8028g5OGwSpq7cPi2avpYGKO1OQAcEASJIqUYBgbHOAsNygXkJ\n\tbOEBV/v/U0tJn9p4KL1POtvhXUBhLwr/DvMO1PqzGS/AnjZhx1iqJeSl1zYwSssPiv\n\teJyQ04+JMBKzCOK40olDlcDaMsFoehrXU3c6x6Nc="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"MWm4dbVk\"; dkim-atps=neutral","Date":"Mon, 5 Jun 2023 17:46:39 +0300","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20230605144639.GE31538@pendragon.ideasonboard.com>","References":"<20230321172004.176852-1-jacopo.mondi@ideasonboard.com>\n\t<20230321172004.176852-5-jacopo.mondi@ideasonboard.com>\n\t<293f0825-2d1f-5eea-14e9-66fb628b3480@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<293f0825-2d1f-5eea-14e9-66fb628b3480@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v4 4/4] libcamera: rkisp1: Fix\n\tenumeration of RAW formats","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, libcamera@luigi311.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27260,"web_url":"https://patchwork.libcamera.org/comment/27260/","msgid":"<20230605150641.GF31538@pendragon.ideasonboard.com>","date":"2023-06-05T15:06:41","subject":"Re: [libcamera-devel] [PATCH v4 4/4] libcamera: rkisp1: Fix\n\tenumeration of RAW formats","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nThank you for the patch.\n\nOn Tue, Mar 21, 2023 at 06:20:04PM +0100, Jacopo Mondi via libcamera-devel wrote:\n> The current implementation enumerates a single RAW format (the sensor's\n> resolution) and does that regardless of what role the\n> CameraConfiguration has been generated for.\n> \n> Fix this by:\n> - Enumerate RAW StreamFormats only when the requested role is\n>   StreamRole::Raw\n> - Add all the sensor's provided resolutions that fit the video device\n>   output maximum size\n> \n> Before this patch, a single RAW size was enumerated in stream formats\n> \n>  * Pixelformat: SRGGB10 (4208x3120)-(4208x3120)/(+1,+1)\n>   - 4208x3120\n> \n> With this patch applied all sensor's supported resolutions are\n> enumerated but only when the stream role RAW is explicitly requested\n> \n>  * Pixelformat: SRGGB10 (1048x780)-(4208x3120)/(+0,+0)\n>   - 1048x780\n>   - 2104x1560\n>   - 4032x3024\n>   - 4208x3120\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 19 +++++++++++++++++--\n>  1 file changed, 17 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> index cca593b84260..8d606de7880f 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1_path.cpp\n> @@ -150,18 +150,33 @@ RkISP1Path::generateConfiguration(const CameraSensor *sensor,\n>  \tfor (const auto &format : streamFormats_) {\n>  \t\tconst PixelFormatInfo &info = PixelFormatInfo::info(format);\n>  \n> +\t\t/* Populate stream formats for non-RAW configurations. */\n>  \t\tif (info.colourEncoding != PixelFormatInfo::ColourEncodingRAW) {\n> +\t\t\tif (role == StreamRole::Raw)\n> +\t\t\t\tcontinue;\n> +\n>  \t\t\tstreamFormats[format] = { { minResolution, maxResolution } };\n>  \t\t\tcontinue;\n>  \t\t}\n>  \n> -\t\t/* Skip raw formats not supported by the sensor. */\n> +\t\t/* Skip RAW formats for non-raw roles. */\n> +\t\tif (role != StreamRole::Raw)\n> +\t\t\tcontinue;\n> +\n> +\t\t/* Populate stream formats for RAW configurations. */\n>  \t\tuint32_t mbusCode = formatToMediaBus.at(format);\n>  \t\tif (std::find(mbusCodes.begin(), mbusCodes.end(), mbusCode) ==\n>  \t\t    mbusCodes.end())\n> +\t\t\t/* Skip formats not supported by sensor. */\n>  \t\t\tcontinue;\n>  \n> -\t\tstreamFormats[format] = { { resolution, resolution } };\n> +\t\t/* Add all the RAW sizes the sensor can produce for this code. */\n> +\t\tfor (const auto &rawSize : sensor->sizes(mbusCode)) {\n> +\t\t\tif (rawSize > maxResolution_)\n> +\t\t\t\tcontinue;\n\nIn the review of the previous version, I mentioned that I think you need\nto test the width and height independently (see how Size::operator>() is\ndefined). You \"acked\" that, have you kept the code as-is on purpose, or\nwas it an oversight ?\n\n> +\n> +\t\t\tstreamFormats[format].push_back({ rawSize, rawSize });\n> +\t\t}\n>  \n>  \t\t/*\n>  \t\t * Store the raw format with the highest bits per pixel for","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 8177AC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  5 Jun 2023 15:06:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0BB562885;\n\tMon,  5 Jun 2023 17:06:46 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 88EE762709\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  5 Jun 2023 17:06:45 +0200 (CEST)","from pendragon.ideasonboard.com (om126156242094.26.openmobile.ne.jp\n\t[126.156.242.94])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8B6707EC;\n\tMon,  5 Jun 2023 17:06:19 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1685977606;\n\tbh=GdK2SOEKqJhSVSr0HvdIbHGo2/KQnKrfaTrIAv58FyU=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=wCOGRYFNTLGkwpsytc7ggQW2VMrjlOwCIwZHCFqjR2ThiwRCykSHyQ29OH7Cc0/0b\n\tTgidyCJoSY6Fw2xOmpPFVqVeav4WJA2K5Axshfh7e0M5h5LcIFZuisGBMHFFKghMpE\n\tiWCJf7MjF06ywZBDqkD2YZmaJyempxnIQhbdVo+IQJeTf0fTtdvzDcM37HUGtyDwra\n\tyZJemr3Uy3ni5RexdzIHx1Uw+RjXvzWB2YPgqCzJ/J9qcE76nwFSt0vIeNgvsCPPbW\n\t7uN1ip3kY0ZrOwvghF4k+pBv/YJdQQwxGPHymPIdFbojd3jVEK15+LVEhsKSzX6bg8\n\tHkS4l2CyOs7Iw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1685977580;\n\tbh=GdK2SOEKqJhSVSr0HvdIbHGo2/KQnKrfaTrIAv58FyU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=N0nO3olMEkuJD6PRbV59yfBXf9KDzYy1/ZXAoumfPxAB/1J9IbmHtn9q/AHZHeN3q\n\ttjziUO+ncjeCyBH+4HlvDCBu7HeTG9UgZ8lKXG+1MZH76VZMHnnwJ9051BVENsIUHy\n\tE8mJH6kYA7TSW58YxPnHfXChtqeoVTA/Xtl+YmHs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"N0nO3olM\"; dkim-atps=neutral","Date":"Mon, 5 Jun 2023 18:06:41 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<20230605150641.GF31538@pendragon.ideasonboard.com>","References":"<20230321172004.176852-1-jacopo.mondi@ideasonboard.com>\n\t<20230321172004.176852-5-jacopo.mondi@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230321172004.176852-5-jacopo.mondi@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v4 4/4] libcamera: rkisp1: Fix\n\tenumeration of RAW formats","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>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, libcamera@luigi311.com","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]