Show a patch.

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

{
    "id": 3848,
    "url": "https://patchwork.libcamera.org/api/patches/3848/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/3848/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20200522145459.16836-10-laurent.pinchart@ideasonboard.com>",
    "date": "2020-05-22T14:54:56",
    "name": "[libcamera-devel,PATCH/RFC,08/11] v4l2: Replace explicit DRM FourCCs with libcamera formats",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "1a6813ab5ec4595821c82853f66e74cad7cb077a",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/3848/mbox/",
    "series": [
        {
            "id": 923,
            "url": "https://patchwork.libcamera.org/api/series/923/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=923",
            "date": "2020-05-22T14:54:47",
            "name": "Introduce formats:: namespace for libcamera pixel formats",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/923/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/3848/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/3848/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<laurent.pinchart@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 35F1661080\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 May 2020 16:55:22 +0200 (CEST)",
            "from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D2237528\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 22 May 2020 16:55:21 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"nDYkLPS8\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1590159322;\n\tbh=LV6EivWD6EkXkHQJ2rEecT0NHLBMB4eBAWio0Aia/HI=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=nDYkLPS8wYDK+B3D3AcH3rLbfViO+U6yLl2l/6QiDEVd1+jcLa6+8RCrgLt3qCKTE\n\tLbmpbAm4cmznA6hPDB8cmxosIKcveu9c0OK+KeU+IUMqp/K8w6yonEz/SXykAf/mKb\n\t4nsoFlIJCV3CInUVVt/MTDQY+rpVtWz6qJCVeIHI=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 22 May 2020 17:54:56 +0300",
        "Message-Id": "<20200522145459.16836-10-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.26.2",
        "In-Reply-To": "<20200522145459.16836-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20200522145459.16836-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH/RFC 08/11] v4l2: Replace explicit DRM\n\tFourCCs with libcamera 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>",
        "X-List-Received-Date": "Fri, 22 May 2020 14:55:25 -0000"
    },
    "content": "Use the new pixel format constants to replace usage of macros from\ndrm_fourcc.h.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/v4l2/v4l2_camera_proxy.cpp | 27 ++++++++++++++-------------\n 1 file changed, 14 insertions(+), 13 deletions(-)",
    "diff": "diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\nindex 19e8f6d3b98d..f440882aae00 100644\n--- a/src/v4l2/v4l2_camera_proxy.cpp\n+++ b/src/v4l2/v4l2_camera_proxy.cpp\n@@ -15,6 +15,7 @@\n #include <sys/mman.h>\n \n #include <libcamera/camera.h>\n+#include <libcamera/formats.h>\n #include <libcamera/object.h>\n \n #include \"libcamera/internal/log.h\"\n@@ -536,21 +537,21 @@ namespace {\n \n static const std::array<PixelFormatInfo, 13> pixelFormatInfo = {{\n \t/* RGB formats. */\n-\t{ PixelFormat(DRM_FORMAT_RGB888),\tV4L2_PIX_FMT_BGR24,\t1, {{ { 24, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_BGR888),\tV4L2_PIX_FMT_RGB24,\t1, {{ { 24, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_BGRA8888),\tV4L2_PIX_FMT_ARGB32,\t1, {{ { 32, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::RGB888,\tV4L2_PIX_FMT_BGR24,\t1, {{ { 24, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::BGR888,\tV4L2_PIX_FMT_RGB24,\t1, {{ { 24, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::BGRA8888,\tV4L2_PIX_FMT_ARGB32,\t1, {{ { 32, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n \t/* YUV packed formats. */\n-\t{ PixelFormat(DRM_FORMAT_UYVY),\t\tV4L2_PIX_FMT_UYVY,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_VYUY),\t\tV4L2_PIX_FMT_VYUY,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_YUYV),\t\tV4L2_PIX_FMT_YUYV,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_YVYU),\t\tV4L2_PIX_FMT_YVYU,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::UYVY,\tV4L2_PIX_FMT_UYVY,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::VYUY,\tV4L2_PIX_FMT_VYUY,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::YUYV,\tV4L2_PIX_FMT_YUYV,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n+\t{ formats::YVYU,\tV4L2_PIX_FMT_YVYU,\t1, {{ { 16, 1, 1 }, {  0, 0, 0 }, {  0, 0, 0 } }} },\n \t/* YUY planar formats. */\n-\t{ PixelFormat(DRM_FORMAT_NV12),\t\tV4L2_PIX_FMT_NV12,\t2, {{ {  8, 1, 1 }, { 16, 2, 2 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_NV21),\t\tV4L2_PIX_FMT_NV21,\t2, {{ {  8, 1, 1 }, { 16, 2, 2 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_NV16),\t\tV4L2_PIX_FMT_NV16,\t2, {{ {  8, 1, 1 }, { 16, 2, 1 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_NV61),\t\tV4L2_PIX_FMT_NV61,\t2, {{ {  8, 1, 1 }, { 16, 2, 1 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_NV24),\t\tV4L2_PIX_FMT_NV24,\t2, {{ {  8, 1, 1 }, { 16, 2, 1 }, {  0, 0, 0 } }} },\n-\t{ PixelFormat(DRM_FORMAT_NV42),\t\tV4L2_PIX_FMT_NV42,\t2, {{ {  8, 1, 1 }, { 16, 1, 1 }, {  0, 0, 0 } }} },\n+\t{ formats::NV12,\tV4L2_PIX_FMT_NV12,\t2, {{ {  8, 1, 1 }, { 16, 2, 2 }, {  0, 0, 0 } }} },\n+\t{ formats::NV21,\tV4L2_PIX_FMT_NV21,\t2, {{ {  8, 1, 1 }, { 16, 2, 2 }, {  0, 0, 0 } }} },\n+\t{ formats::NV16,\tV4L2_PIX_FMT_NV16,\t2, {{ {  8, 1, 1 }, { 16, 2, 1 }, {  0, 0, 0 } }} },\n+\t{ formats::NV61,\tV4L2_PIX_FMT_NV61,\t2, {{ {  8, 1, 1 }, { 16, 2, 1 }, {  0, 0, 0 } }} },\n+\t{ formats::NV24,\tV4L2_PIX_FMT_NV24,\t2, {{ {  8, 1, 1 }, { 16, 2, 1 }, {  0, 0, 0 } }} },\n+\t{ formats::NV42,\tV4L2_PIX_FMT_NV42,\t2, {{ {  8, 1, 1 }, { 16, 1, 1 }, {  0, 0, 0 } }} },\n }};\n \n } /* namespace */\n",
    "prefixes": [
        "libcamera-devel",
        "PATCH/RFC",
        "08/11"
    ]
}