Show a patch.

GET /api/1.1/patches/14437/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 14437,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/14437/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14437/",
    "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": "<20211101091510.23204-3-naush@raspberrypi.com>",
    "date": "2021-11-01T09:15:01",
    "name": "[libcamera-devel,v5,02/11] libcamera: formats: Add R10 and R12 formats",
    "commit_ref": "264a673d287c3dafac590ac8f5ac9472d51fa04b",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "6d814e18bb7dbe85096c33104580c03035f3b018",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14437/mbox/",
    "series": [
        {
            "id": 2684,
            "url": "https://patchwork.libcamera.org/api/1.1/series/2684/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2684",
            "date": "2021-11-01T09:14:59",
            "name": "Raspberry Pi: Conversion to media controller",
            "version": 5,
            "mbox": "https://patchwork.libcamera.org/series/2684/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14437/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14437/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 04367BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  1 Nov 2021 09:15:20 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 18A2760125;\n\tMon,  1 Nov 2021 10:15:17 +0100 (CET)",
            "from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1022F600BF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  1 Nov 2021 10:15:15 +0100 (CET)",
            "by mail-wr1-x436.google.com with SMTP id r8so14352900wra.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 01 Nov 2021 02:15:15 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:3a2b:9d8c:92b9:ece6])\n\tby smtp.gmail.com with ESMTPSA id\n\tw10sm13168849wrq.88.2021.11.01.02.15.13\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 01 Nov 2021 02:15:14 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"jLGi/aCm\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=RG3zcG/cyCZQubLgG1F5CIX3ibyjzBGfN4/E1yy8ruU=;\n\tb=jLGi/aCmhSCQk8/fgy9+QcXhjWeYj+jclttvdJz0BvsZAhrnID08trusMCpgLgeBdi\n\tTLR/G5LWKZn+0X2U13lUSYH+MnPRCQDqjXHFw5cqNgJwwIwn24ISl6taXNreJBmHvWEB\n\tPFu9Sg1Plm5pBlK33Y5PzPKBEFzA8OXsNmJT3Z0c15luNvYxuJFBQqZ43ubG3RHKde9J\n\tSjVVvQZhO8DwqwhuAKPMEmCLVwutoBie8ejyzo5Lf0vp5ow8xHjUYGlFrZVzAQcIcm4O\n\tIk925Nf/bY6E4t0PIGrctpS+0YgYANYnyS7/fxeAak1oDqflRiBPHoxM0r/M/Jpb7Rv0\n\tY6yA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=RG3zcG/cyCZQubLgG1F5CIX3ibyjzBGfN4/E1yy8ruU=;\n\tb=e/myiRDJNCQ5WZOU3FIvETS3VBIkGoPpqfmetIXCQJyk5UUOluHqMaVabLNfUek53z\n\tyKlNNEemC9Si5c5irwBo0ZgAJjcCjKsYfVrtIBgB51XHyd695105mkZL9NYQYHliQGXb\n\tBAICb2hNj8X4OhKQaeO8tE3lS3ctFjwBgtnOD3R/f34nfVvX8zb1ny4sYReb9T8RRB9b\n\tfgUdiOGo4ZehcFn252IL3eIlD31vPydELsUcWOyPy7RfJXS5WhjG4MZa+b+kCgXqfIVf\n\tNIRD7a1frYhefMPRXGqyZ4U5STzRYbED+XSDREfYJxj3pEV5/Jwkz58fjSRBjvxsc6za\n\tXfnA==",
        "X-Gm-Message-State": "AOAM531UL46vruTpy0aXFcY9lUHB1X4GqwYJIKv+7nIzJa3EPNVio19m\n\t+zm2WgEoebgHH+Vp/JPNCpWvxEU9xqiCl/ej",
        "X-Google-Smtp-Source": "ABdhPJx/V4+SKPprUDTKMDsHvAjwq1+SyZeAehJmUyLcGtk6h+stj4BPZU47ByZRnUUdLoH7Lr53kg==",
        "X-Received": "by 2002:a05:6000:1a86:: with SMTP id\n\tf6mr36444997wry.343.1635758114621; \n\tMon, 01 Nov 2021 02:15:14 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon,  1 Nov 2021 09:15:01 +0000",
        "Message-Id": "<20211101091510.23204-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20211101091510.23204-1-naush@raspberrypi.com>",
        "References": "<20211101091510.23204-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v5 02/11] libcamera: formats: Add R10 and\n\tR12 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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nThese new formats corresponds to the V4L2 V4L2_PIX_FMT_Y10 and\nV4L2_PIX_FMT_Y12 formats, and are the little-endian version of the\nDRM_FORMAT_R10 and DRM_FORMAT_R12 formats.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\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(+)",
    "diff": "diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex 1c29e1f2c5ab..d4781dfb3874 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -484,6 +484,32 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.pixelsPerGroup = 1,\n \t\t.planes = {{ { 1, 1 }, { 0, 0 }, { 0, 0 } }},\n \t} },\n+\t{ formats::R10, {\n+\t\t.name = \"R10\",\n+\t\t.format = formats::R10,\n+\t\t.v4l2Formats = {\n+\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_Y10),\n+\t\t\t.multi = V4L2PixelFormat(),\n+\t\t},\n+\t\t.bitsPerPixel = 10,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n+\t\t.packed = false,\n+\t\t.pixelsPerGroup = 1,\n+\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n+\t{ formats::R12, {\n+\t\t.name = \"R12\",\n+\t\t.format = formats::R12,\n+\t\t.v4l2Formats = {\n+\t\t\t.single = V4L2PixelFormat(V4L2_PIX_FMT_Y12),\n+\t\t\t.multi = V4L2PixelFormat(),\n+\t\t},\n+\t\t.bitsPerPixel = 12,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingYUV,\n+\t\t.packed = false,\n+\t\t.pixelsPerGroup = 1,\n+\t\t.planes = {{ { 2, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n \n \t/* Bayer formats. */\n \t{ formats::SBGGR8, {\ndiff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\nindex 43b5877e08f2..22a8e473a183 100644\n--- a/src/libcamera/formats.yaml\n+++ b/src/libcamera/formats.yaml\n@@ -7,6 +7,10 @@\n formats:\n   - R8:\n       fourcc: DRM_FORMAT_R8\n+  - R10:\n+      fourcc: DRM_FORMAT_R10\n+  - R12:\n+      fourcc: DRM_FORMAT_R12\n \n   - RGB565:\n       fourcc: DRM_FORMAT_RGB565\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 3649c6002620..0e0da3f0df07 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -117,6 +117,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{\n \t/* Greyscale formats. */\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_GREY),\n \t\t{ formats::R8, \"8-bit Greyscale\" } },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_Y10),\n+\t\t{ formats::R10, \"10-bit Greyscale\" } },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_Y12),\n+\t\t{ formats::R12, \"12-bit Greyscale\" } },\n \n \t/* Bayer formats. */\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_SBGGR8),\n",
    "prefixes": [
        "libcamera-devel",
        "v5",
        "02/11"
    ]
}