[{"id":26541,"web_url":"https://patchwork.libcamera.org/comment/26541/","msgid":"<ZAGwd9kJlrohWKcV@pyrite.rasen.tech>","date":"2023-03-03T08:31:51","subject":"Re: [libcamera-devel] [PATCH v2 1/4] libcamera: rkisp1: Generate\n\tconfig using main path","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Wed, Feb 22, 2023 at 04:19:14PM +0100, Jacopo Mondi via libcamera-devel wrote:\n> The generateConfiguration() implementation in the Rockchip RkISP1\n> pipeline handler uses by default the self path (if available) for\n> the Viewfinder and VideoRecording StreamRoles.\n> \n> The validate() implementation, at the contrary, prefers using the main\n> path, when available, for all streams.\n> \n> As the self-path is limited in output resolution to 1920x1920,\n> generating a configuration using the self path limits the maximum\n> stream size to 1920x1920, while higher resolutions can be obtained by\n> using the main path.\n> \n> Align the generateConfiguration() implementation to the validate() one\n> by using the main path by default if available.\n> \n> Bug: https://bugs.libcamera.org/show_bug.cgi?id=180\n> Reported-by: libcamera@luigi311.com\n> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 +--------\n>  1 file changed, 1 insertion(+), 8 deletions(-)\n> \n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 8a30fe061d04..569fb8ecb629 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -630,23 +630,19 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n>  \t * first stream and use it for all streams.\n>  \t */\n>  \tstd::optional<ColorSpace> colorSpace;\n> -\n>  \tbool mainPathAvailable = true;\n> -\tbool selfPathAvailable = data->selfPath_;\n>  \n>  \tfor (const StreamRole role : roles) {\n> -\t\tbool useMainPath;\n> +\t\tbool useMainPath = mainPathAvailable;\n>  \n>  \t\tswitch (role) {\n>  \t\tcase StreamRole::StillCapture:\n> -\t\t\tuseMainPath = mainPathAvailable;\n>  \t\t\t/* JPEG encoders typically expect sYCC. */\n>  \t\t\tif (!colorSpace)\n>  \t\t\t\tcolorSpace = ColorSpace::Sycc;\n>  \t\t\tbreak;\n>  \n>  \t\tcase StreamRole::Viewfinder:\n> -\t\t\tuseMainPath = !selfPathAvailable;\n>  \t\t\t/*\n>  \t\t\t * sYCC is the YCbCr encoding of sRGB, which is commonly\n>  \t\t\t * used by displays.\n> @@ -656,7 +652,6 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n>  \t\t\tbreak;\n>  \n>  \t\tcase StreamRole::VideoRecording:\n> -\t\t\tuseMainPath = !selfPathAvailable;\n>  \t\t\t/* Rec. 709 is a good default for HD video recording. */\n>  \t\t\tif (!colorSpace)\n>  \t\t\t\tcolorSpace = ColorSpace::Rec709;\n> @@ -669,7 +664,6 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n>  \t\t\t\treturn nullptr;\n>  \t\t\t}\n>  \n> -\t\t\tuseMainPath = true;\n>  \t\t\tcolorSpace = ColorSpace::Raw;\n>  \t\t\tbreak;\n>  \n> @@ -686,7 +680,6 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera,\n>  \t\t\tmainPathAvailable = false;\n>  \t\t} else {\n>  \t\t\tpath = data->selfPath_;\n> -\t\t\tselfPathAvailable = false;\n>  \t\t}\n>  \n>  \t\tStreamConfiguration cfg =\n> -- \n> 2.39.0\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 ADA5ABE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  3 Mar 2023 08:32:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EBAD9626E4;\n\tFri,  3 Mar 2023 09:32:00 +0100 (CET)","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 3AD8E62662\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  3 Mar 2023 09:31:59 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4C80D735;\n\tFri,  3 Mar 2023 09:31:56 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677832320;\n\tbh=nVFESlqbJ/E6Nl0RxY2FWn7+sco4nn0RqXSobIOOmEI=;\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=H0Hn6dcSX8JxaLGAkKbWltuotBr8+FMPHT0aYlv1qY9yaE2FRULFreNgAiAYdGqyO\n\tO1kaz8B+HGiKEFY8d92igzt15t2W/2Y+7R61Nd18Z7yEFJbbI2g7IVT2DvlEkjpezJ\n\tLhFoetRqCigrCMkVh8rbcI5KNnpDi4XnhnhxzoNcY/uPkDijDxRPJVPMk3pwRz4mTk\n\tGzV+hPLyuHuXEXiTFIHAJwnJr5Jk9g3yG2iWBNTxARbuKWbNumtJQY2JHPDNEQ0yhL\n\tFmekIwXEnjgd2F41m4xxXpSXqCUcE7iZhsx8jJq29UKASlHDecwI2rnpomvCC+PA02\n\tUel0RaIWQNwBQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677832318;\n\tbh=nVFESlqbJ/E6Nl0RxY2FWn7+sco4nn0RqXSobIOOmEI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=W2AFL5oUMe2cofXeoEfUpWuF3lf4/w8+O7nlPM3iK6T1M4FHUvK9VYnJT2sjIh+XD\n\tjTHq2w47Gx6yhMm4MFJ3rtDk2hs+UUWjsMdrPaJQe+rqygkfgAUzEhVJBEyTx5JuFM\n\t/OfSfXznCW5cMfD9uOdYfjg08TQ1BUI/1oHJ8Mbw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"W2AFL5oU\"; dkim-atps=neutral","Date":"Fri, 3 Mar 2023 17:31:51 +0900","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<ZAGwd9kJlrohWKcV@pyrite.rasen.tech>","References":"<20230222151917.669526-1-jacopo.mondi@ideasonboard.com>\n\t<20230222151917.669526-2-jacopo.mondi@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20230222151917.669526-2-jacopo.mondi@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 1/4] libcamera: rkisp1: Generate\n\tconfig using main path","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@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>"}}]