From patchwork Wed Jul 6 09:06:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 16558 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 509BABE173 for ; Wed, 6 Jul 2022 09:06:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9888063313; Wed, 6 Jul 2022 11:06:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1657098411; bh=4H8szj5unF3MaQfrSbvXU2ognH+Z8Cb679dH4RcLzwc=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=MGR1xS4zY/WJWzkGo3LgdLnMrzJOva8WF87G4Mhm3HYpWpnIvrELE3Ej8vbCAD68N CjRDuAnUWGEZYRF0Q6zZRinBLqqZg4XJU1SbYjr+k7L7s3SUv0nnBZKh5UcS6/CCA3 2sSSAL3l8HzwpLPUBq4aAIwisHLdM+JJfotWns7xjKHch91a7BOddNfh7ai794Zl/4 rcFM60gr6sdWhZIU4bOtDCQ9bNR6Dw5uckXS5uaHhhYwNi41jxB5bkPQ6/7ocaZVSs uCpv2b7on4e9M/6GWyhPHp+J7AieVE0D/7frM1qjxU0nqd3MVyXcOdh4HhwyYp2TMh cc2hrlo8iS+mQ== 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 143436330F for ; Wed, 6 Jul 2022 11:06:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="aDjeajMF"; dkim-atps=neutral Received: from Monstersaurus.ksquared.org.uk.beta.tailscale.net (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AEB7F30A; Wed, 6 Jul 2022 11:06:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1657098407; bh=4H8szj5unF3MaQfrSbvXU2ognH+Z8Cb679dH4RcLzwc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aDjeajMFgX+PlK5l+1qdWBdOmkTpdBAkcdMAnrcOgzvUo9NkzZkwxtT6ve42N/DEx KAqNskO4tQvlRVyNP1EP9Uk3DAg64uUfHU6eAcpKIZWd+ynSHviyEpAL4+iam//tId sy+b80UbyNMh+E4NXY8PoNGG6lzxFaNfaLkEkW/o= To: libcamera devel Date: Wed, 6 Jul 2022 10:06:42 +0100 Message-Id: <20220706090642.2750987-4-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220706090642.2750987-1-kieran.bingham@ideasonboard.com> References: <20220706090642.2750987-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/3] qcam: viewfinder_qt: Support X RGB variants 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: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Support the X variants of the RGB pixel formats along side the equivalent Alpha component based versions. The Alpha channel is ignored by both QImage::Format_RGB32, and QImage::Format_RGBX8888. The existing use of QImage::Format_RGBA8888 is updated to use the QImage::Format_RGBX8888 variant to ensure that the image data is visible. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- v2: - Update to use QImage::Format_RGBX8888 over QImage::Format_RGBA8888 src/qcam/viewfinder_qt.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qcam/viewfinder_qt.cpp b/src/qcam/viewfinder_qt.cpp index 27955e3f9593..7a6a60c96393 100644 --- a/src/qcam/viewfinder_qt.cpp +++ b/src/qcam/viewfinder_qt.cpp @@ -27,9 +27,11 @@ static const QMap nativeFormats { #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) - { libcamera::formats::ABGR8888, QImage::Format_RGBA8888 }, + { libcamera::formats::ABGR8888, QImage::Format_RGBX8888 }, + { libcamera::formats::XBGR8888, QImage::Format_RGBX8888 }, #endif { libcamera::formats::ARGB8888, QImage::Format_RGB32 }, + { libcamera::formats::XRGB8888, QImage::Format_RGB32 }, #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) { libcamera::formats::RGB888, QImage::Format_BGR888 }, #endif