From patchwork Thu Jul 15 18:15:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vedant Paranjape X-Patchwork-Id: 12967 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 0621EC3225 for ; Thu, 15 Jul 2021 18:15:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4581D6852A; Thu, 15 Jul 2021 20:15:50 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="cOGigy2f"; dkim-atps=neutral Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 56A6C6059F for ; Thu, 15 Jul 2021 20:15:48 +0200 (CEST) Received: by mail-pf1-x42f.google.com with SMTP id a127so6231781pfa.10 for ; Thu, 15 Jul 2021 11:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SYfOqql/X7mpZA5XQyiXNpSfKtZrj8HFScSnM6oKiGk=; b=cOGigy2fAbCBjLAKut90unKDx+d7hk/+HUyreuGUb1wfsfKb7m5oEQTWge9weouRGI VTwN4BFwLjeCP7GKDH4BiBA4h7tqmW81pABEIM/qmLCA9s+RiV5HyksU5dbiIhSAx72P 3KhMZEPNeULlxyA3wB71PNcVp9ll3azA+Mx9vJ0bts8FN21+xLXRUBLnUDmuHxRGX6dV 6w+IY1xHVnAJ3jKH1gdlbYovP/1CVas1GCwggqXRaF/i98zp4XlvFVtmmPf3E6eLL15R 8yiM2etVJIp/3H1lUMnqy0KBm2/fcooPz0T0xCgzMKo/DIGos7NezEgX387Pd6rB4ewO ichA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SYfOqql/X7mpZA5XQyiXNpSfKtZrj8HFScSnM6oKiGk=; b=lMl9W0+WlknNBcRyW67ZEJxyAPgY105hmKbQhvwjFNoHSVVU7g9yt+NJGxDPiDH1Jt MbmmaksjHzF5KSqirOGw5BydniUyMFhzAWszyD/XV4R+2xC/i2JeZlOmQktp/1/yi2hL HfqoyNSZAQl5qFL9s+pkj4mtjCBtxZhZauOgCACIWml4nqBkcB4PAf0ufQcXYhZvoe2S B6NzKf3woG9U04gaDTqyxVT0VxvQZqjHRHLWhtwMvSxxNt6zhE7OqtZellt2Z1iavMpv tfFqF6/1p585cq3V7+y90IbqDy360JGL4lewlwJ/q6qmtpeSWYnSl7VbIAPAjzi82GP4 EFbQ== X-Gm-Message-State: AOAM532az75AiRh0Pe10BEvYHsgt8fhU5rDyCDkUlndHE8PlKtfTqkIY B6yc6kKadXDMuERnZG7Rl8WbtnI1lIFRuivI2e0= X-Google-Smtp-Source: ABdhPJyBVMevx+yZla0Bv079wJ6SGCuYRSdCXeitQTmQTqnZ67rLvSvfH5QWFjTIvuV7ccy5f3WKew== X-Received: by 2002:a05:6a00:158e:b029:32b:9de5:a198 with SMTP id u14-20020a056a00158eb029032b9de5a198mr6019200pfk.3.1626372946282; Thu, 15 Jul 2021 11:15:46 -0700 (PDT) Received: from localhost.localdomain ([1.186.167.37]) by smtp.googlemail.com with ESMTPSA id b3sm7358293pfi.179.2021.07.15.11.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 11:15:45 -0700 (PDT) From: Vedant Paranjape To: libcamera-devel@lists.libcamera.org Date: Thu, 15 Jul 2021 23:45:21 +0530 Message-Id: <20210715181522.273606-1-vedantparanjape160201@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/2] Fixes: 4fd6bb33 ("libcamera: Add support for XRGB8888 and XBGR8888") 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: , Cc: Vedant Paranjape Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This patch fixes V4L2 pixel format for formats::XBGR8888 by updating the existing matching to V4L2_PIX_FMT_RGBX32 Signed-off-by: Vedant Paranjape Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart --- src/libcamera/formats.cpp | 2 +- src/libcamera/v4l2_pixelformat.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp index 59a34853..578ac4af 100644 --- a/src/libcamera/formats.cpp +++ b/src/libcamera/formats.cpp @@ -198,7 +198,7 @@ const std::map pixelFormatInfo{ { formats::XBGR8888, { .name = "XBGR8888", .format = formats::XBGR8888, - .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XRGB32), + .v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGBX32), .bitsPerPixel = 32, .colourEncoding = PixelFormatInfo::ColourEncodingRGB, .packed = false, diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp index 87d728fe..59a01e02 100644 --- a/src/libcamera/v4l2_pixelformat.cpp +++ b/src/libcamera/v4l2_pixelformat.cpp @@ -52,7 +52,7 @@ const std::map vpf2pf{ { V4L2PixelFormat(V4L2_PIX_FMT_RGB24), formats::BGR888 }, { V4L2PixelFormat(V4L2_PIX_FMT_BGR24), formats::RGB888 }, { V4L2PixelFormat(V4L2_PIX_FMT_XBGR32), formats::XRGB8888 }, - { V4L2PixelFormat(V4L2_PIX_FMT_XRGB32), formats::XBGR8888 }, + { V4L2PixelFormat(V4L2_PIX_FMT_RGBX32), formats::XBGR8888 }, { V4L2PixelFormat(V4L2_PIX_FMT_RGBA32), formats::ABGR8888 }, { V4L2PixelFormat(V4L2_PIX_FMT_ABGR32), formats::ARGB8888 }, { V4L2PixelFormat(V4L2_PIX_FMT_ARGB32), formats::BGRA8888 },