From patchwork Sat Sep 16 12:19:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19049 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 55E86C32B2 for ; Sat, 16 Sep 2023 12:19:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0196662921; Sat, 16 Sep 2023 14:19:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694866791; bh=14pKWXs3hK4uBwqI3dUv64hTKoGiK05/80YGxK+toS8=; 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=q/8C1srEMMQs+8I0dIdSP9DwSZ/Bpo6WNqoTpSAL/0C/gdxkwWYlTYMHv4jIGURnf 9jPhPn5TmcFDKuK/R0y+D0+oKF8L8UwZahBmVgc4sMLiefY/t3tHy1JqPvJ1BUwhGR xTgQ+4D6P924maZJYuPEAzssUEIdMY+tINGxlsabExL006spx8UEZtUoO2qAy0BBm/ VnNzmPRifYEjj8eTZftVvIAN9jbg+rHPKjx9zXP94CP38etpukD+bIwHz9o2XTAHdj Mjg+WpKTvRXvwM0bSguAqCFoWobxgB/d10oM9PM61FJ3dG1TiP9NHsCIzAKDvQvK6X s+sFtqori+8xw== 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 17EF36291C for ; Sat, 16 Sep 2023 14:19:42 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vMl0cfgH"; dkim-atps=neutral Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E6C1C1812; Sat, 16 Sep 2023 14:18:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694866688; bh=14pKWXs3hK4uBwqI3dUv64hTKoGiK05/80YGxK+toS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vMl0cfgH7eSfYOA6l9jwgW230nz6nOdgaGW7l4e9IZfh4iPYNPRQDlk3g7QUFAWpS ZoAvdxhEDaFfP4e8jwqAQvCLlqb9/iLIiPvQrQ9JAh5EKlb+5d4sKAcEKDxt82/sWg 5hYNhxeXHCOSt0hL+kZG2ItCz0lDC/Q229nFQE9M= To: libcamera-devel@lists.libcamera.org Date: Sat, 16 Sep 2023 14:19:29 +0200 Message-ID: <20230916121930.29490-12-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230916121930.29490-1-jacopo.mondi@ideasonboard.com> References: <20230916121930.29490-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 11/12] 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 9e4411f22902..c69e076aac71 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -264,7 +264,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; } @@ -427,7 +427,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 @@ -461,7 +461,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, SpanispFormats(); - pixelFormat = formats::ARGB8888; + pixelFormat = formats::XRGB8888; colorSpace = ColorSpace::Sycc; size = { 800, 600 }; bufferCount = 4;