From patchwork Thu Jul 15 20:46:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vedant Paranjape X-Patchwork-Id: 12969 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 92869C3225 for ; Thu, 15 Jul 2021 20:46:45 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0AAC468539; Thu, 15 Jul 2021 22:46:45 +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="oXrEPIZY"; dkim-atps=neutral Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4BD4E6059F for ; Thu, 15 Jul 2021 22:46:43 +0200 (CEST) Received: by mail-pj1-x1029.google.com with SMTP id d9-20020a17090ae289b0290172f971883bso7346397pjz.1 for ; Thu, 15 Jul 2021 13:46:43 -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=kQ3i2Qx61kPbBNSobc8acCysjHGsv1SIi5SzjCT28JY=; b=oXrEPIZYiYrc/0RuSbMlNeXuqhntLLz5Vkt/xJoo9LWzgsqEXafHqA6lrNMh7RalL1 ki1vVarp91VnHkXYAz6JRVr4OgxOoT2/AENJB77f1yas+qgnfSvN6/iykbe7+XMuZSse xyslBle73r2JIZXNsVbznMncS91MIp4f/ISxVibTamWA1twmtnP1v9cY4K3F6TR3T2eo eElEGQBQKtdP2O18a1OKm4CDSV6ssbYoeYSbD6aY9I9gYDhughGRnsvodlOdWEl4Za3W n7eLC5VveWXgUWO4gE9760XHDRGC8+LiSf7nYqBL6/PWOXPIFeGfBihnc2MhQ3IaRNAN 4w6w== 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=kQ3i2Qx61kPbBNSobc8acCysjHGsv1SIi5SzjCT28JY=; b=KjcHLQtR50jlo3HYc+4GqchYNpCoysprF9qh364wdmJBjuscly2hVqJkaG6GAIvFF3 1L30eu40R9YteeY8Oo/d3cPwLkHgYJ7dVRZ65Pagj65LDtkKpKN3mnMaTS4KKW9ebipK g+UrNRO6FaZb4mkj+msi2EJXumYdV+Q9LTGqpC3sXM3WcTjUofVbIOVriwa/CK1eRuUX rwvo2jHDKYyoZk2pYbuZ282vbQIelSSic7PmYAy3VAFW0zDQAGPCNVvOPH4mZUiHJHeq DQ9yEBYrwqFBfEfPFjYTOrvsNAAR5ef25gBxjR5fDu+bRQAUP/0VNEc5/GFeE4Kg51dk YzAg== X-Gm-Message-State: AOAM533X7BpDN+nPZcshBA32+VkunWLuuSPwHerqu4ZzhwEwfQ/iunjl UZgMurWxu55YP8PC5zxveMLAfkIDIwSoEBaNWrQ= X-Google-Smtp-Source: ABdhPJwxLA3CRWNHG/K8GnaDXcwmSn7FV5lGDmTafcllEVy+/DzaWsYy4HT4HoX6U+i8oko9HEbcQQ== X-Received: by 2002:a17:902:8d98:b029:129:18e5:8c31 with SMTP id v24-20020a1709028d98b029012918e58c31mr4770139plo.3.1626382001376; Thu, 15 Jul 2021 13:46:41 -0700 (PDT) Received: from localhost.localdomain ([1.186.167.37]) by smtp.googlemail.com with ESMTPSA id c12sm7545796pfl.27.2021.07.15.13.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 13:46:41 -0700 (PDT) From: Vedant Paranjape To: libcamera-devel@lists.libcamera.org Date: Fri, 16 Jul 2021 02:16:16 +0530 Message-Id: <20210715204617.20140-1-vedantparanjape160201@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 1/2] libcamera: Fix the V4L2 pixel format for formats::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 Fixes: 4fd6bb33 ("libcamera: Add support for XRGB8888 and XBGR8888") 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 },