From patchwork Wed Feb 22 15:19:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 18295 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id DCA3CC3259 for ; Wed, 22 Feb 2023 15:19:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2F57D6265E; Wed, 22 Feb 2023 16:19:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1677079171; bh=+1iyV2gHAn7SrlN9e6NHWLjBt6ZCa0hB+kgYjP2c0ps=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Tep6dzi9DkobP+53rFFcBgEFwsit27MFOoKCtfWekHqtScrCGzE2U6CgL/YEwQ2wn 8Pp818NLsgu5mHE2XMXuXN+botneG4WpkZKs00GpElXL3LJdC3sNSDw4XT7NYQ0HGN zUvTaJKRvtU7yL25MB4cFw5V1zzOJxBfD39kgddJOGpZxNp7VYRNdrnD5Mm79YliyZ wBkqYKrDTFHxr/DfBAAzuuXUARkMw3RphWJ6q8Hd/ZrB7nOHqtZFCFmr+DPeZnLfP6 0NryzDUzdUGBf8HSeAMUAmEKYSIKkfdcu5l7Xa6TMfm+3Mon/JaQCzDnmMf2UiGh0A pn/be1ZVi7chA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A67F61EE3 for ; Wed, 22 Feb 2023 16:19:29 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="c9g6F5vh"; dkim-atps=neutral Received: from uno.homenet.telecomitalia.it (host-87-16-53-160.retail.telecomitalia.it [87.16.53.160]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id EB6259DE; Wed, 22 Feb 2023 16:19:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1677079169; bh=+1iyV2gHAn7SrlN9e6NHWLjBt6ZCa0hB+kgYjP2c0ps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c9g6F5vhCl24gpiggut3J92riDWFZvwKJXaStI35p3tyCOvcw51FuLlQ6lFmgOyul I62JejampdlVBQwt/JT9UHNRgq/uukgi2xHELyZk2gf4jjS+XSuGN+8jEBs3g4x+JH JEOIQx+Lro3XNTxeXzsqsIhcdBJwe6yY9iveNdIo= To: libcamera-devel@lists.libcamera.org Date: Wed, 22 Feb 2023 16:19:14 +0100 Message-Id: <20230222151917.669526-2-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230222151917.669526-1-jacopo.mondi@ideasonboard.com> References: <20230222151917.669526-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/4] libcamera: rkisp1: Generate config using main path X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi , libcamera@luigi311.com Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The generateConfiguration() implementation in the Rockchip RkISP1 pipeline handler uses by default the self path (if available) for the Viewfinder and VideoRecording StreamRoles. The validate() implementation, at the contrary, prefers using the main path, when available, for all streams. As the self-path is limited in output resolution to 1920x1920, generating a configuration using the self path limits the maximum stream size to 1920x1920, while higher resolutions can be obtained by using the main path. Align the generateConfiguration() implementation to the validate() one by using the main path by default if available. Bug: https://bugs.libcamera.org/show_bug.cgi?id=180 Reported-by: libcamera@luigi311.com Signed-off-by: Jacopo Mondi Reviewed-by: Paul Elder --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 8a30fe061d04..569fb8ecb629 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -630,23 +630,19 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera, * first stream and use it for all streams. */ std::optional colorSpace; - bool mainPathAvailable = true; - bool selfPathAvailable = data->selfPath_; for (const StreamRole role : roles) { - bool useMainPath; + bool useMainPath = mainPathAvailable; switch (role) { case StreamRole::StillCapture: - useMainPath = mainPathAvailable; /* JPEG encoders typically expect sYCC. */ if (!colorSpace) colorSpace = ColorSpace::Sycc; break; case StreamRole::Viewfinder: - useMainPath = !selfPathAvailable; /* * sYCC is the YCbCr encoding of sRGB, which is commonly * used by displays. @@ -656,7 +652,6 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera, break; case StreamRole::VideoRecording: - useMainPath = !selfPathAvailable; /* Rec. 709 is a good default for HD video recording. */ if (!colorSpace) colorSpace = ColorSpace::Rec709; @@ -669,7 +664,6 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera, return nullptr; } - useMainPath = true; colorSpace = ColorSpace::Raw; break; @@ -686,7 +680,6 @@ PipelineHandlerRkISP1::generateConfiguration(Camera *camera, mainPathAvailable = false; } else { path = data->selfPath_; - selfPathAvailable = false; } StreamConfiguration cfg =