From patchwork Fri Sep 15 13:06:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19031 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 4F4C7C32B3 for ; Fri, 15 Sep 2023 13:07:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DCA7162939; Fri, 15 Sep 2023 15:07:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1694783241; bh=HdX7fPUe7yjplSewSAS8Lj7uy5T/cMNB0e+BsE0aDiM=; 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=QHNTVxVXhPwskDgFo3GgXTE7T9W8QmetON1dMqxIMgE2/QBsfBtOl8fbR8MZaalWI eJdB7CyUfuhB719+3BJrjK6B6ja4nbDYLwujwz3PjaJKc+o7ZC67adX8yAWB1bqq2C bSlEG5wjoMtyq+jbE/HUYW/kqkZnfNCRLN8BtiAKk/qvXQ26rsSOQVkaat4/e156l3 W8nSmyGqgog2ZkSM6aU8FPkXOko7buve9HIYf83yjAIlwpFEdKF3l13z2+XUKYp2kj Ic56BAuSIva2YJM+gZW5+aIkoiGhA5TEjCQC89rIGS6V9iXJHe44GvoSjihUgCbxx/ r0gjrLfwAbb9g== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8FA1562925 for ; Fri, 15 Sep 2023 15:07:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="gPfiVsNW"; 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 2704E12AE; Fri, 15 Sep 2023 15:05:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694783139; bh=HdX7fPUe7yjplSewSAS8Lj7uy5T/cMNB0e+BsE0aDiM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gPfiVsNW4xPEUD2kHTt+i6aUPykkUQrMOyJcK6TCnNrSDiwXQjyQxvBHKysM8JuAH 2OfCE+ah0j4ZOOOT0BWhhH3u4gVzGAD+maWl+EZzH+38KbFfd5mLTtp4ZCNsX56g7B kZ4TM4HAMMktArkLcswn3URN0B7yM//JUNWxcHvA= To: libcamera-devel@lists.libcamera.org Date: Fri, 15 Sep 2023 15:06:49 +0200 Message-ID: <20230915130650.35691-12-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230915130650.35691-1-jacopo.mondi@ideasonboard.com> References: <20230915130650.35691-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 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 d83811801460..0de91123ee50 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;