[{"id":24270,"web_url":"https://patchwork.libcamera.org/comment/24270/","msgid":"<20220801151828.5ymyikrcxv5mmfu5@uno.localdomain>","date":"2022-08-01T15:18:28","subject":"Re: [libcamera-devel] [PATCH 04/13] libcamera: formats: Add\n\tAVUY8888 and XVUY8888 formats","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Mon, Aug 01, 2022 at 03:05:34AM +0300, Laurent Pinchart via libcamera-devel wrote:\n> Add missing 32-bit packet YUV 4:4:4 formats. These formats are used by\n> the i.MX8 ISI driver.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n\n> ---\n>  src/libcamera/formats.cpp          | 26 ++++++++++++++++++++++++++\n>  src/libcamera/formats.yaml         |  4 ++++\n>  src/libcamera/v4l2_pixelformat.cpp |  4 ++++\n>  3 files changed, 34 insertions(+)\n>\n> diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\n> index 283ecb3d89d8..24739c01c928 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -363,6 +363,32 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.pixelsPerGroup = 2,\n>  \t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n>  \t} },\n> +\t{ formats::AVUY8888, {\n> +\t\t.name = \"AVUY8888\",\n> +\t\t.format = formats::AVUY8888,\n> +\t\t.v4l2Formats = {\n> +\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YUVA32),\n> +\t\t\t.multi = V4L2PixelFormat(),\n> +\t\t},\n> +\t\t.bitsPerPixel = 32,\n> +\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\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::XVUY8888, {\n> +\t\t.name = \"XVUY8888\",\n> +\t\t.format = formats::XVUY8888,\n> +\t\t.v4l2Formats = {\n> +\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_YUVX32),\n> +\t\t\t.multi = V4L2PixelFormat(),\n> +\t\t},\n> +\t\t.bitsPerPixel = 32,\n> +\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> +\t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n> +\t} },\n>\n>  \t/* YUV planar formats. */\n>  \t{ formats::NV12, {\n> diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\n> index 7dda01325f33..d3fbf5f47211 100644\n> --- a/src/libcamera/formats.yaml\n> +++ b/src/libcamera/formats.yaml\n> @@ -49,6 +49,10 @@ formats:\n>        fourcc: DRM_FORMAT_UYVY\n>    - VYUY:\n>        fourcc: DRM_FORMAT_VYUY\n> +  - AVUY8888:\n> +      fourcc: DRM_FORMAT_AVUY8888\n> +  - XVUY8888:\n> +      fourcc: DRM_FORMAT_XVUY8888\n>\n>    - NV12:\n>        fourcc: DRM_FORMAT_NV12\n> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n> index bdcdc3be4e0c..53ac9399130a 100644\n> --- a/src/libcamera/v4l2_pixelformat.cpp\n> +++ b/src/libcamera/v4l2_pixelformat.cpp\n> @@ -81,6 +81,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{\n>  \t\t{ formats::UYVY, \"UYVY 4:2:2\" } },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_VYUY),\n>  \t\t{ formats::VYUY, \"VYUY 4:2:2\" } },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YUVA32),\n> +\t\t{ formats::AVUY8888, \"32-bit YUVA 8-8-8-8\" } },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YUVX32),\n> +\t\t{ formats::XVUY8888, \"32-bit YUVX 8-8-8-8\" } },\n>\n>  \t/* YUV planar formats. */\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_NV16),\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 23531C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Aug 2022 15:18:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 788986330F;\n\tMon,  1 Aug 2022 17:18:32 +0200 (CEST)","from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::228])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B2345603E8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Aug 2022 17:18:30 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id E996D1BF20C;\n\tMon,  1 Aug 2022 15:18:29 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1659367112;\n\tbh=fRME0YtmRcU/+/QldUzI123xB9QRhJaJipg1aKDNV9U=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=kqmePW2EmuuK8vgld2SjKsNUVkUpsiEhDJqEMHdmMcpIKLFAvZ+yU17A6+slFDg2H\n\t/3m52rc1LBYCLWiCkct5gLS9UC9USuOrNI/ZKJfCCPPlLaK53ngCvJQme2Xx3QEBUM\n\tDC494HCmUlqc+0f3sJCyri+rqnP7lhS1c6/nc6bw5P24errPLopUz2sRiWX/msd0KF\n\tXxG+obPN+d+u2WZkYlFdto0molOYVEuH4JBhZSTnLFGCkXu0SfwddCXgOGU23JJBY2\n\tPduwcW0/J++7vI2ABPKDMwymiP20Vh54bngP62xpLZ7qLS5un/BJ21ZhSHPs0fEHEp\n\tCLF5bCy28VIIg==","Date":"Mon, 1 Aug 2022 17:18:28 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220801151828.5ymyikrcxv5mmfu5@uno.localdomain>","References":"<20220801000543.3501-1-laurent.pinchart@ideasonboard.com>\n\t<20220801000543.3501-5-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220801000543.3501-5-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 04/13] libcamera: formats: Add\n\tAVUY8888 and XVUY8888 formats","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>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo@jmondi.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]