Patch Detail
Show a patch.
GET /api/1.1/patches/15768/?format=api
{ "id": 15768, "url": "https://patchwork.libcamera.org/api/1.1/patches/15768/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15768/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220504131558.9498-2-laurent.pinchart@ideasonboard.com>", "date": "2022-05-04T13:15:54", "name": "[libcamera-devel,1/5] libcamera: formats: Add YVU422 pixel format", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "af6ee3378229f8566a4f411e775ce88dc837710c", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/1.1/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15768/mbox/", "series": [ { "id": 3089, "url": "https://patchwork.libcamera.org/api/1.1/series/3089/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3089", "date": "2022-05-04T13:15:53", "name": "libcamera: Support additional pixel formats and media bus codes", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3089/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15768/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15768/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 30EA0C326C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 4 May 2022 13:16:08 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8A6806564A;\n\tWed, 4 May 2022 15:16:06 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2B52E65641\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 4 May 2022 15:16:04 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BD75B835\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 4 May 2022 15:16:03 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1651670166;\n\tbh=01wWz7uXaGAOnjr8VOez3q9MtUO9GTK+uO99FM5XhZE=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=neksaW3U3YeIau8p5FT7OeCvmRSVvLwCj1d4misd/HNY6FOKNg4ceiDO2rwBraVR5\n\tbeHZ/aW4RuSV+OkqhoakdhKaq00oOt2s6gNWSxfv7aBsj9cDOHrwFmioxILTRrOmJK\n\tAE17IyIaQAQPM87KJ8yUweE6bjOkukYaGxCBW6PwNk4ECzyTZOo/vuyb5V8IQfC+xR\n\traJyvAaDAUeSALoIE/xkjRcSkYcn8YOHs7DA/oCiOtB0GDrWh6ifvy9X0awj1nAzlT\n\tkack04FN8xyKE4KxZitMZJwyq9gBTLk9my/AHUtxPobD3sYIX89i4Fb/esP9wZ1gxd\n\t9RdzeLh3frEYw==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1651670163;\n\tbh=01wWz7uXaGAOnjr8VOez3q9MtUO9GTK+uO99FM5XhZE=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=qE6Y/NUXih9EaKk+BayJlQxyXLbEyiPrixRWJATCug9QgEPX3/Bt+zR3kZ4Y/kc2X\n\tplYYdafrlReLLkqUXRNlhIEB3iZMd9g5K1+EEjGBUd1oR/2eOHouztT/Szj5TaHgjx\n\t7o+sqpIQgkkGcnZ5sMBxlsB7ufHxNN4nXgzL3qIc=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"qE6Y/NUX\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 4 May 2022 16:15:54 +0300", "Message-Id": "<20220504131558.9498-2-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.35.1", "In-Reply-To": "<20220504131558.9498-1-laurent.pinchart@ideasonboard.com>", "References": "<20220504131558.9498-1-laurent.pinchart@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/5] libcamera: formats: Add YVU422 pixel\n\tformat", "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": "Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The YVU422 pixel format is defined in both DRM and V4L2. libcamera\nalready supports YUV422, add support for the opposite chroma order.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/formats.cpp | 13 +++++++++++++\n src/libcamera/formats.yaml | 2 ++\n src/libcamera/v4l2_pixelformat.cpp | 2 ++\n 3 files changed, 17 insertions(+)", "diff": "diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex afcaabc519f7..c5cca37b02c2 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -469,6 +469,19 @@ 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::YVU422, {\n+\t\t.name = \"YVU422\",\n+\t\t.format = formats::YVU422,\n+\t\t.v4l2Formats = {\n+\t\t\t.single = V4L2PixelFormat(),\n+\t\t\t.multi = V4L2PixelFormat(V4L2_PIX_FMT_YVU422M),\n+\t\t},\n+\t\t.bitsPerPixel = 16,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n+\t\t.packed = false,\n+\t\t.pixelsPerGroup = 2,\n+\t\t.planes = {{ { 2, 1 }, { 1, 1 }, { 1, 1 } }},\n+\t} },\n \n \t/* Greyscale formats. */\n \t{ formats::R8, {\ndiff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\nindex 1f3f043302c3..0b527dbefe32 100644\n--- a/src/libcamera/formats.yaml\n+++ b/src/libcamera/formats.yaml\n@@ -69,6 +69,8 @@ formats:\n fourcc: DRM_FORMAT_YVU420\n - YUV422:\n fourcc: DRM_FORMAT_YUV422\n+ - YVU422:\n+ fourcc: DRM_FORMAT_YVU422\n \n - MJPEG:\n fourcc: DRM_FORMAT_MJPEG\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 1dd93baa7a64..818bd1037e14 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -113,6 +113,8 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{\n \t\t{ formats::YUV422, \"Planar YUV 4:2:2\" } },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_YUV422M),\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 \n \t/* Greyscale formats. */\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_GREY),\n", "prefixes": [ "libcamera-devel", "1/5" ] }