[{"id":29932,"web_url":"https://patchwork.libcamera.org/comment/29932/","msgid":"<171830657544.2248009.7580267685597031188@ping.linuxembedded.co.uk>","date":"2024-06-13T19:22:55","subject":"Re: [PATCH 1/7] libcamera: mali-c55: Limit max size to sensor\n\tresolution","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Daniel Scally (2024-06-13 16:59:43)\n> From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> \n> The Mali C55 ISP cannot upscale. The maximum allowed output size\n> is the sensor's resolution.\n> \n> For RAW streams this is already handled in adjustRawSizes(), while\n> for processed streams the maximum allowed resolution was wrongly\n> set to the ISP maximum output size (8192x8192).\n> \n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nWhen posting a patch authored by someone else, you still need to add a\nSigned-off-by: tag.\n\ngit-send-email -s does this for you I think.\n\n\n\n> ---\n>  src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> index 45c71c1d..9442d17c 100644\n> --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> @@ -342,7 +342,7 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate()\n>                 rawConfig = &config;\n>         }\n>  \n\ngiven the commit message, this looks like a good place to say:\n\n\t/*\n\t * The C55 can not upscale. Limit the configuration to the ISP\n\t * capabilities and the sensor resolution.\n\t */\n\nBut either way:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> -       Size maxSize = kMaliC55MaxSize;\n> +       Size maxSize = std::min(kMaliC55MaxSize, data_->resolution());\n>         if (rawConfig) {\n>                 /*\n>                  * \\todo Take into account the Bayer components ordering once\n> -- \n> 2.30.2\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 3727EC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 13 Jun 2024 19:23:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 289316548F;\n\tThu, 13 Jun 2024 21:23:00 +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 48B5C6548B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 13 Jun 2024 21:22:58 +0200 (CEST)","from pendragon.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 D81294CF;\n\tThu, 13 Jun 2024 21:22:43 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Wk7F+HFN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718306563;\n\tbh=/TtxtvvpoGdVXG9Zb1AsLJ7SrRunpBvU/D6eyZ3rO6I=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Wk7F+HFNYhuRDowjeza5QGex9aMKqeO8rlUGeC4vyPyYliA+O6/yVQJ4i3zWHWSxz\n\tt+MH1j1mgWz3kjWDRr3IzMeuW8whpjxlVH14nHZIsEDLqe5MukuEvzSqABc8Vmpk3D\n\tZsZTXx1EuQ9j80z+Up+JKkR9MqJnKLcHY5hsRQ8w=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240613155949.1041061-2-dan.scally@ideasonboard.com>","References":"<20240613155949.1041061-1-dan.scally@ideasonboard.com>\n\t<20240613155949.1041061-2-dan.scally@ideasonboard.com>","Subject":"Re: [PATCH 1/7] libcamera: mali-c55: Limit max size to sensor\n\tresolution","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"Daniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Thu, 13 Jun 2024 20:22:55 +0100","Message-ID":"<171830657544.2248009.7580267685597031188@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":29964,"web_url":"https://patchwork.libcamera.org/comment/29964/","msgid":"<20240617045653.GE28126@pendragon.ideasonboard.com>","date":"2024-06-17T04:56:53","subject":"Re: [PATCH 1/7] libcamera: mali-c55: Limit max size to sensor\n\tresolution","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Jun 13, 2024 at 08:22:55PM +0100, Kieran Bingham wrote:\n> Quoting Daniel Scally (2024-06-13 16:59:43)\n> > From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> > \n> > The Mali C55 ISP cannot upscale. The maximum allowed output size\n> > is the sensor's resolution.\n> > \n> > For RAW streams this is already handled in adjustRawSizes(), while\n> > for processed streams the maximum allowed resolution was wrongly\n> > set to the ISP maximum output size (8192x8192).\n> > \n> > Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n> \n> When posting a patch authored by someone else, you still need to add a\n> Signed-off-by: tag.\n> \n> git-send-email -s does this for you I think.\n> \n> > ---\n> >  src/libcamera/pipeline/mali-c55/mali-c55.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/src/libcamera/pipeline/mali-c55/mali-c55.cpp b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> > index 45c71c1d..9442d17c 100644\n> > --- a/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> > +++ b/src/libcamera/pipeline/mali-c55/mali-c55.cpp\n> > @@ -342,7 +342,7 @@ CameraConfiguration::Status MaliC55CameraConfiguration::validate()\n> >                 rawConfig = &config;\n> >         }\n> >  \n> \n> given the commit message, this looks like a good place to say:\n> \n> \t/*\n> \t * The C55 can not upscale. Limit the configuration to the ISP\n> \t * capabilities and the sensor resolution.\n> \t */\n> \n> But either way:\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > -       Size maxSize = kMaliC55MaxSize;\n> > +       Size maxSize = std::min(kMaliC55MaxSize, data_->resolution());\n\nIf the two sizes are not ordered the same way by width and height, this\nwill likely not give you what you expect. One option is to use\nSize::boundedTo(). You may need to consider the aspect ratio though.\n\n> >         if (rawConfig) {\n> >                 /*\n> >                  * \\todo Take into account the Bayer components ordering once","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 F397CC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 17 Jun 2024 04:57:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C06316548D;\n\tMon, 17 Jun 2024 06:57:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C08DE619F8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 17 Jun 2024 06:57:15 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BAEBB2D5;\n\tMon, 17 Jun 2024 06:56:58 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"EFBffQvG\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1718600218;\n\tbh=PZXnHAAksANt540MCJqbF4d1xIm7SOv/2w6XG0yWubY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EFBffQvG0HXiEXkCD4B+eAq7NWAmCR7VGRdVCdyN19+8f5DyIGvJ+kBEUgFayHwSH\n\t+tJK1cCb++ShBfqTnNSOonKUTahhhOV8sWyBgAhuRKb8vqdXKiNKGycqFczFowxBPT\n\tB+VkjFm6lDke4lcVwH6242lC1BXrrRmJi6jmJr+k=","Date":"Mon, 17 Jun 2024 07:56:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Daniel Scally <dan.scally@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>","Subject":"Re: [PATCH 1/7] libcamera: mali-c55: Limit max size to sensor\n\tresolution","Message-ID":"<20240617045653.GE28126@pendragon.ideasonboard.com>","References":"<20240613155949.1041061-1-dan.scally@ideasonboard.com>\n\t<20240613155949.1041061-2-dan.scally@ideasonboard.com>\n\t<171830657544.2248009.7580267685597031188@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<171830657544.2248009.7580267685597031188@ping.linuxembedded.co.uk>","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>"}}]