{"id":12968,"url":"https://patchwork.libcamera.org/api/1.1/patches/12968/?format=json","web_url":"https://patchwork.libcamera.org/patch/12968/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20210715181522.273606-2-vedantparanjape160201@gmail.com>","date":"2021-07-15T18:15:22","name":"[libcamera-devel,v2,2/2] libcamera: Add pixel format BGRX8888","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"fa58de41c3737bf6639fb6fb3ff460e1d725fb06","submitter":{"id":85,"url":"https://patchwork.libcamera.org/api/1.1/people/85/?format=json","name":"Vedant Paranjape","email":"vedantparanjape160201@gmail.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/12968/mbox/","series":[{"id":2240,"url":"https://patchwork.libcamera.org/api/1.1/series/2240/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2240","date":"2021-07-15T18:15:21","name":"[libcamera-devel,v2,1/2] Fixes: 4fd6bb33 (\"libcamera: Add support for XRGB8888 and XBGR8888\")","version":2,"mbox":"https://patchwork.libcamera.org/series/2240/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12968/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12968/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 03D86C3225\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 15 Jul 2021 18:15:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ACA036853E;\n\tThu, 15 Jul 2021 20:15:52 +0200 (CEST)","from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com\n\t[IPv6:2607:f8b0:4864:20::62c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A08C168538\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 Jul 2021 20:15:51 +0200 (CEST)","by mail-pl1-x62c.google.com with SMTP id h1so3832479plf.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 15 Jul 2021 11:15:51 -0700 (PDT)","from localhost.localdomain ([1.186.167.37])\n\tby smtp.googlemail.com with ESMTPSA id\n\tb3sm7358293pfi.179.2021.07.15.11.15.48\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 15 Jul 2021 11:15:49 -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=\"rNXqHZrv\"; 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:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=79q8nTRra8BB2hCmCIawmyGF4lHQ73LVIqBfkVcd7fE=;\n\tb=rNXqHZrvVbexc2QM24+axgB4Ks27CJqDo2oYHLdFFix4wGn5naiwMAbarosoR4xcXp\n\tTGf3x0IG2WnfQJ2S1QTEvn/vKsU3hBtDwqEXDY3IzaHqa8dofEfp/dkUKkl4urmhXwmU\n\tQ5dMqeYwnUct14OmyU2RgTMuZ9ks5E8UC3AVa9NVeLFDdcaITfZh5UB401ydVs22XTkc\n\tuNMeU4KJGK0XGawrmULyZqutM0WnY4xIKmlxRnjUMytt4n9vImjqVzeB0wqo1PQmLgwR\n\tNmnFdRS/xHUs5g26tXhNbycpFJ2FPyUlkTNBbVjftXIy8Cl93v0CFz/T15IJy/bvb5Sm\n\tWdTg==","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:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=79q8nTRra8BB2hCmCIawmyGF4lHQ73LVIqBfkVcd7fE=;\n\tb=ayuOdkF3NAVY4Prk6OvSE90hNcVO3X/Q4VfNKjJEKyERObEOdBHcPOEJ29dKganMEZ\n\ttgIBNMUj2nAKI8t6ZMrihQapenKs2NlwOM/2N65Cp++aVbZlXydDkwDXrmJJnIO7ViOi\n\tFPpj1qE5MgRryF/8eC7BJUn59F6VCQRdQeu7epLjkJlMt8yjJiT7bn6d4odmM+/39mdc\n\t89AafwKlWdenTeay5Zt5HBLh1pEooRmIKwmHAEUj7IKS9wO5bkuwvKrRQ6pfEe0NvyIc\n\tRjAiaUNpAyDtIbCZZbwWJDWiE0akDTRW/7B0F81YcZ90YzzO6JtuoYID+VihlcRO0bF4\n\t7vxA==","X-Gm-Message-State":"AOAM5315Zcy/6wD0EzlYCdViV5qUR5fAvP6B+m75u3xFeRGXMv1mhVeN\n\tXKuB1xsVE2Y2CKU7FsTYWyhMVoljzcRnUBaymQI=","X-Google-Smtp-Source":"ABdhPJxI4YO9osAkWBTdl/0iHV7FhGNZDbBSwYsdfDSTg2m2TfKigLwsdponxi5NxYJVJkbTf/t58w==","X-Received":"by 2002:a17:902:7085:b029:114:eb3f:fe29 with SMTP id\n\tz5-20020a1709027085b0290114eb3ffe29mr4408821plk.40.1626372950010; \n\tThu, 15 Jul 2021 11:15:50 -0700 (PDT)","From":"Vedant Paranjape <vedantparanjape160201@gmail.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 15 Jul 2021 23:45:22 +0530","Message-Id":"<20210715181522.273606-2-vedantparanjape160201@gmail.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20210715181522.273606-1-vedantparanjape160201@gmail.com>","References":"<20210715181522.273606-1-vedantparanjape160201@gmail.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 2/2] libcamera: Add pixel format\n\tBGRX8888","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":"This patch adds pixel format BGRX8888 to libcamera. Additionally adds\nmapping of V4L2 pixel format (V4L2_PIX_FMT_XRGB32) to BGRX8888.\n\nSigned-off-by: Vedant Paranjape <vedantparanjape160201@gmail.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/formats.cpp          | 10 ++++++++++\n src/libcamera/v4l2_pixelformat.cpp |  1 +\n 2 files changed, 11 insertions(+)","diff":"diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex 578ac4af..8f1197de 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -205,6 +205,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.pixelsPerGroup = 1,\n \t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n \t} },\n+\t{ formats::BGRX8888, {\n+\t\t.name = \"BGRX8888\",\n+\t\t.format = formats::BGRX8888,\n+\t\t.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_XRGB32),\n+\t\t.bitsPerPixel = 32,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n+\t\t.packed = false,\n+\t\t.pixelsPerGroup = 1,\n+\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n \t{ formats::ABGR8888, {\n \t\t.name = \"ABGR8888\",\n \t\t.format = formats::ABGR8888,\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 59a01e02..93fc4446 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -52,6 +52,7 @@ 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::BGRX8888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_RGBX32), formats::XBGR8888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_RGBA32), formats::ABGR8888 },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_ABGR32), formats::ARGB8888 },\n","prefixes":["libcamera-devel","v2","2/2"]}