From patchwork Thu Sep 21 16:55:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19075 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 545FCC326C for ; Thu, 21 Sep 2023 16:56:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E96B262951; Thu, 21 Sep 2023 18:56:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1695315374; bh=+ORVoFtWp9TDl0RMo01WYqmvHdIpoxAqgffn9ObCinY=; 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=M3RONvqQutRhc8ZOdJ89DmsDgjewbcO4RowUh3vq66ba2EEovwQDfg6pOduEbUPbR DQaykHmsE6pWRFNIfb6oWk1UyRj8A7+vEcXob/GKFe/rl6Z/xBGQHQcxgGS1b3qDK/ og3q5JhSGzJGjYjSzTaNIuutnnYQa9bF1K8oJddZJAw3ahL4abCEZQzgzEThf1+TNi LuNV9OPnOL4CqU4RO7nXEX3hpzknlx6PU2pCoNTDHe6yRmtIpD2Zfvzt9UhOuzyGXC N/jkTO4JvRasRcxOlwRV5ou2syFoglKYrX3dBzU3FwOwZ+iQC5kKaxjPctcGAxugSF MU0+INVxpk2rw== 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 E048C62944 for ; Thu, 21 Sep 2023 18:56:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rWLxlt/2"; dkim-atps=neutral Received: from uno.lan (93-46-82-201.ip106.fastwebnet.it [93.46.82.201]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 53E831257; Thu, 21 Sep 2023 18:54:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695315268; bh=+ORVoFtWp9TDl0RMo01WYqmvHdIpoxAqgffn9ObCinY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rWLxlt/2Lwg++7GfsEYZ9DlF4P8vyWd+7t/x2w7Se5z8K7WWyk5A0qC0Ir97JBPQe EX/jRpZu9mnj2+BHpc7x5lNOGhVkya7nqGdc5pQH6uwZKATIkzhGBbrkFGnXl+rXGI +yCKArWATFv9299mAVGWbJ/XM0iRrQTlQo7HTxfk= To: libcamera-devel@lists.libcamera.org Date: Thu, 21 Sep 2023 18:55:48 +0200 Message-ID: <20230921165550.50956-12-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230921165550.50956-1-jacopo.mondi@ideasonboard.com> References: <20230921165550.50956-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v5 11/13] libcamera: rpi: Change default stream formats 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 Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Naushir Patuck Switch to XRGB8888 as a default Viewfinder role output format, and YUV420 as a default output format for everything else. Signed-off-by: Naushir Patuck Reviewed-by: Jacopo Mondi Signed-off-by: Jacopo Mondi --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index c560e48c12fb..f8e8e13dc837 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -268,7 +268,7 @@ CameraConfiguration::Status RPiCameraConfiguration::validate() if (fmts.find(out.dev->toV4L2PixelFormat(cfgPixFmt)) == fmts.end()) { /* If we cannot find a native format, use a default one. */ - cfgPixFmt = formats::NV12; + cfgPixFmt = formats::YUV420; status = Adjusted; } @@ -431,7 +431,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, SpanispFormats(); - pixelFormat = formats::NV12; + pixelFormat = formats::YUV420; /* * Still image codecs usually expect the sYCC color space. * Even RGB codecs will be fine as the RGB we get with the @@ -465,7 +465,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, SpanispFormats(); - pixelFormat = formats::ARGB8888; + pixelFormat = formats::XRGB8888; colorSpace = ColorSpace::Sycc; size = { 800, 600 }; bufferCount = 4;