{"id":12623,"url":"https://patchwork.libcamera.org/api/patches/12623/?format=json","web_url":"https://patchwork.libcamera.org/patch/12623/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210616204844.429936-1-vedantparanjape160201@gmail.com>","date":"2021-06-16T20:48:44","name":"[libcamera-devel,v1] libcamera: Update v4l2 pixel format to libcamera pixel format mapping","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"7ceda77cee58e57f1092cce0dc5d68fc43c53fc9","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/people/85/?format=json","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/12623/mbox/","series":[{"id":2144,"url":"https://patchwork.libcamera.org/api/series/2144/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2144","date":"2021-06-16T20:48:44","name":"[libcamera-devel,v1] libcamera: Update v4l2 pixel format to libcamera pixel format mapping","version":1,"mbox":"https://patchwork.libcamera.org/series/2144/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12623/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12623/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 813E0BD78E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Jun 2021 20:49:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC9136892F;\n\tWed, 16 Jun 2021 22:49:06 +0200 (CEST)","from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com\n\t[IPv6:2607:f8b0:4864:20::102c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 443046029A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jun 2021 22:49:06 +0200 (CEST)","by mail-pj1-x102c.google.com with SMTP id\n\tx21-20020a17090aa395b029016e25313bfcso2521347pjp.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Jun 2021 13:49:06 -0700 (PDT)","from localhost.localdomain ([1.186.76.76])\n\tby smtp.googlemail.com with ESMTPSA id\n\tz14sm3014926pfn.11.2021.06.16.13.49.01\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 16 Jun 2021 13:49:03 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"d5QPulLF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=o64f1eWWPk868TPqM+iZw1V9RuKLSP0N6osBNUWshYs=;\n\tb=d5QPulLFILlQTC/DRySGqInZkbQ0SoT2XgoGinQQL2mXxNNx2WU6ncVcCdonOOn9Yf\n\tVE9pLMeckzAOeFdwbH4t3lLo4deDz+myUNOR7BOq4HITiTwawA3JFlwZYVwpwFZl85je\n\tm6U93VCN2Hz6CnuoPff/Tn+0z4QSrcLrI5rNIf6BQ1vTdcbuxJLA2UCz/VHra9AUnKvz\n\teQWIWx4v0vdxacdlgD00s00chuURe+GWDrHv0KQxj1y9UMUaq0bhJCgUjKhhDVLcvXHw\n\t29mw+PmSUxHiQ1mhUeNnliPaAwg5eaIIJ47e04ThulmLTbZfSWFvjfivWCNKpgDfH5E8\n\tGThQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=o64f1eWWPk868TPqM+iZw1V9RuKLSP0N6osBNUWshYs=;\n\tb=XSwAhF3DfL/Z+igKSjEMWfeUfI6a6tkxZF0howSUOFDtXeFLLBrEU0ChWS0xA3ebqt\n\tmUCVW4FIY/Nwh7Pw7IM7lP9e/XI0n3pFVwCRh40mVuPkaY6ANVbEywl9ZjckEeQUt4Ac\n\tHYvIAwVOAYz1rqpAASrD+ByzIEAGzFi3pM6zleSfOeB6lPCPbnlDFU9Ef3EhcAgHCYEp\n\t1OAM9efgjIi3AVavx4+DyJm1bOicS7XBZAmVLQyi0obp7ibFQyYChz/Fihj0VasykX2r\n\tgY9X9lwqRyeXR7ja7T5lCSBjW5YKKtUeFU5FQE/KlqaWWWixkyV8Qb/8kYiegpOZxwJy\n\tCUVw==","X-Gm-Message-State":"AOAM533TYyYB5us4UuClNHjDcJzbH8hJjcb2C7l+QWSvtQtuT0N5uAM7\n\tQSHfF6xWwssjXZqYJ1/qSm4NX8oFwFo4zsK5","X-Google-Smtp-Source":"ABdhPJxO8l4oY5Q+kBHJnz8WuGYDVUcqCEvrM5TlK/PxkiB5s3tojhC2JRpoO8LebXiLzXDALmfvgA==","X-Received":"by 2002:a17:903:22c9:b029:11f:4529:70ac with SMTP id\n\ty9-20020a17090322c9b029011f452970acmr1318418plg.54.1623876543981; \n\tWed, 16 Jun 2021 13:49:03 -0700 (PDT)","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 17 Jun 2021 02:18:44 +0530","Message-Id":"<20210616204844.429936-1-vedantparanjape160201@gmail.com>","X-Mailer":"git-send-email 2.25.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v1] libcamera: Update v4l2 pixel format to\n\tlibcamera pixel format mapping","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"Vedant Paranjape <vedantparanjape160201@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"According to DRM FourCCs and linux kernel docs V4L2_PIX_FMT_XRGB32\nis BX24, but it was mapped to formats::XBGR8888, which is XB24.\n\nThis patch fixes the mismatch of V4L2_PIX_FMT_XRGB32, i.e, matches it to\nformats::BGRX8888. Furthermore, this patch adds V4L2_PIX_FMT_RBGX32 pixel\nformat which is represented by XB24, and maps V4L2_PIX_FMT_RGBX32\nto formats::XBGR8888\n\nLinux kernel pixel format docs: https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-rgb.html#bits-per-component\nDRM FourCC pixel format docs: https://elixir.bootlin.com/linux/latest/source/include/uapi/drm/drm_fourcc.h#L150\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\n---\n src/libcamera/v4l2_pixelformat.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 166d93cf..e86788ed 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -51,7 +51,8 @@ const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_RGB24), formats::BGR888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_BGR24), formats::RGB888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_XBGR32), formats::XRGB8888 },\n-\t{ V4L2PixelFormat(V4L2_PIX_FMT_XRGB32), formats::XBGR8888 },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_RGBX32), formats::XBGR8888 },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_XRGB32), formats::BGRX8888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_RGBA32), formats::ABGR8888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_ABGR32), formats::ARGB8888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_ARGB32), formats::BGRA8888 },\n","prefixes":["libcamera-devel","v1"]}