[{"id":22879,"web_url":"https://patchwork.libcamera.org/comment/22879/","msgid":"<20220506120854.neukd5w34p2y7hvl@uno.localdomain>","date":"2022-05-06T12:08:54","subject":"Re: [libcamera-devel] [PATCH 2/5] libcamera: formats: Add YUV444\n\tand YVU444 pixel formats","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent\n\nOn Wed, May 04, 2022 at 04:15:55PM +0300, Laurent Pinchart via libcamera-devel wrote:\n> Extend planar YUV format support with 4:4:4 formats. Those formats are\n> used by the i.MX8 ISI driver that will be supported by the simple\n> pipeline handler.\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 c5cca37b02c2..e205df0529ba 100644\n> --- a/src/libcamera/formats.cpp\n> +++ b/src/libcamera/formats.cpp\n> @@ -482,6 +482,32 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n>  \t\t.pixelsPerGroup = 2,\n>  \t\t.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},\n>  \t} },\n> +\t{ formats::YUV444, {\n> +\t\t.name = \"YUV444\",\n> +\t\t.format = formats::YUV444,\n> +\t\t.v4l2Formats = {\n> +\t\t\t.single = V4L2PixelFormat(),\n> +\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),\n> +\t\t},\n> +\t\t.bitsPerPixel = 24,\n> +\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> +\t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 1, 1 }, { 1, 1 } }},\n> +\t} },\n> +\t{ formats::YVU444, {\n> +\t\t.name = \"YVU444\",\n> +\t\t.format = formats::YVU444,\n> +\t\t.v4l2Formats = {\n> +\t\t\t.single = V4L2PixelFormat(),\n> +\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU444M),\n> +\t\t},\n> +\t\t.bitsPerPixel = 24,\n> +\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n> +\t\t.packed = false,\n> +\t\t.pixelsPerGroup = 1,\n> +\t\t.planes = {{ { 1, 1 }, { 1, 1 }, { 1, 1 } }},\n> +\t} },\n>\n>  \t/* Greyscale formats. */\n>  \t{ formats::R8, {\n> diff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\n> index 0b527dbefe32..7dda01325f33 100644\n> --- a/src/libcamera/formats.yaml\n> +++ b/src/libcamera/formats.yaml\n> @@ -71,6 +71,10 @@ formats:\n>        fourcc: DRM_FORMAT_YUV422\n>    - YVU422:\n>        fourcc: DRM_FORMAT_YVU422\n> +  - YUV444:\n> +      fourcc: DRM_FORMAT_YUV444\n> +  - YVU444:\n> +      fourcc: DRM_FORMAT_YVU444\n>\n>    - MJPEG:\n>        fourcc: DRM_FORMAT_MJPEG\n> diff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\n> index 818bd1037e14..8d409943e2d3 100644\n> --- a/src/libcamera/v4l2_pixelformat.cpp\n> +++ b/src/libcamera/v4l2_pixelformat.cpp\n> @@ -115,6 +115,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{\n>  \t\t{ formats::YUV422, \"Planar YUV 4:2:2 (N-C)\" } },\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV422M),\n>  \t\t{ formats::YVU422, \"Planar YVU 4:2:2 (N-C)\" } },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),\n> +\t\t{ formats::YUV444, \"Planar YUV 4:4:4 (N-C)\" } },\n> +\t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV444M),\n> +\t\t{ formats::YVU444, \"Planar YVU 4:4:4 (N-C)\" } },\n>\n>  \t/* Greyscale formats. */\n>  \t{ V4L2PixelFormat(V4L2_PIX_FMT_GREY),\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 C5076C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 May 2022 12:08:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF0EF65646;\n\tFri,  6 May 2022 14:08:57 +0200 (CEST)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n\t[IPv6:2001:4b98:dc4:8::227])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 889E7604A3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 May 2022 14:08:56 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id F02A22000C;\n\tFri,  6 May 2022 12:08:55 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1651838937;\n\tbh=UGXFU1kQGPNm0c5cUgt6Vc0rARepq9fCoijCc6lySXY=;\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=RKqMLxXL0GQ3q02CRJcwR0rE1Kf2rp6y7UJ3nayKPaebAkAaqyLSrRBq/HqpmT/O4\n\tkM/BInmB2eKGfzV1h/7ZSbl79pR6zu/XVg+iU19lvbEEM9eI/CxqsefsLO9wnnHVvb\n\tW2z22gYI4sAFZHGGffxJ8vcek5Hy1pmP0QVp/I+i5LA0+ZenVstCcppSRpEKzLjNzj\n\tRd1rd8xdip08z+iKCN5l8f3E1HA7tsDJ22UPvV8ePhQPLS5qpVRe1wSevmtchE/yaA\n\ty8GKywPhovF66EvnAKzZXlvGcS+ykWKi162nuD9JZ9KYn4tMGELSuwLp6Qa3VE60RZ\n\tY+b2/vnaXprSA==","Date":"Fri, 6 May 2022 14:08:54 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<20220506120854.neukd5w34p2y7hvl@uno.localdomain>","References":"<20220504131558.9498-1-laurent.pinchart@ideasonboard.com>\n\t<20220504131558.9498-3-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220504131558.9498-3-laurent.pinchart@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 2/5] libcamera: formats: Add YUV444\n\tand YVU444 pixel 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>"}}]