Show a patch.

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

{
    "id": 20037,
    "url": "https://patchwork.libcamera.org/api/patches/20037/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20037/",
    "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": "<20240510100208.12188-3-naush@raspberrypi.com>",
    "date": "2024-05-10T10:02:03",
    "name": "[v3,2/7] libcamera: formats: Add RGB48 formats",
    "commit_ref": "1659e68cdce084ea38d55f51f4664c8c35c27df3",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "e20c513ade09e6e46575d47550139e9e2c5bf8a2",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/20037/mbox/",
    "series": [
        {
            "id": 4305,
            "url": "https://patchwork.libcamera.org/api/series/4305/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4305",
            "date": "2024-05-10T10:02:01",
            "name": "Pre Raspberry Pi 5 support changes",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/4305/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20037/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20037/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 E751FBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 May 2024 10:02:22 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C290363464;\n\tFri, 10 May 2024 12:02:17 +0200 (CEST)",
            "from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com\n\t[IPv6:2a00:1450:4864:20::32e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E5E36345E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 May 2024 12:02:13 +0200 (CEST)",
            "by mail-wm1-x32e.google.com with SMTP id\n\t5b1f17b1804b1-41ba0bb5837so12880385e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 May 2024 03:02:13 -0700 (PDT)",
            "from localhost.localdomain ([188.39.149.98])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-41fccee9318sm57936385e9.30.2024.05.10.03.02.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 10 May 2024 03:02:12 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Zrv59scR\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1715335333; x=1715940133;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=8EqzroIAQoi+6KeMfKrXGaZOdJttqi872UhOH/ydd0I=;\n\tb=Zrv59scR8veRrNLast9BCFglLDa3CUV4q0CntmkVz9o3NLcRLuRG2SI8/H80yUUZsl\n\tc1Uhy1/QusbZnNNvztfMjfDraoA3z0pxXWFFt6ZLP+RrA5PLxKqAWzJZg+/OoFa5fyWO\n\tnEWMHd9xvhoBIwUOUbzrVWni38kCoLvSa80GtcpmPKiPhrQ6tbzmHkqeKpA+TEtmQ8Z8\n\tJbqh1QPJD1n0g9Aw5PyPZKNenY7d3WlACVs6lTo8TbmUwnbxYG8wLlOVO8JqJSTaVREG\n\tn6f+ti+4vtV1wuBAlfev+A8LriYvDVs8msOlfvZzfhXNcrL6ycXlG5NvetgCcqFQs9zj\n\tVgGQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1715335333; x=1715940133;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=8EqzroIAQoi+6KeMfKrXGaZOdJttqi872UhOH/ydd0I=;\n\tb=SX0mF0JVUOQFJQ0/vQ2oxvgH4xO/wkZOxlciNPicibdlLrjIAmplUZ6kKq6tDpJbXD\n\tM4a9JurHI4TeAUNi+d2Oh6C/jZzhlrxdRUQiIObr7rVrA9pK6N1jE9YUIbGxTEc6aex7\n\txbsORpyxHphyXUhsgm+8+ytqXCf/jgIAIaZTNQIouOK8+QgB5ogZZyntH4KopUdGkIzS\n\tK6yMY/SZxZkL9g9FvJojph2soaKD9PkYJpc/2PbP7zcqxf7iYWprMHZZUi5IWemXwTE0\n\ttvA6FCgk/qNIdR2sdEonJLSO1/gPX6xyODvJW1q8vB5G6hO+/YpkitHQo4Zh7wRNvKtU\n\tKwiQ==",
        "X-Gm-Message-State": "AOJu0YzncI3N1p4DJtGWEreXKMrrmcBJtLWz7FrfC+C+wB0BhiR0vn2r\n\t99WhjxHA0OvEkjNSKsIL5AViSJT3tl+J+yTFbdCqq/AjBOlQvNqUJgX9JNZ+NwblMFZbKiRj+P1\n\tO",
        "X-Google-Smtp-Source": "AGHT+IFX4ink8DW3kch+mMewf5SS6hQWMxvugE2x0Qw8jUw6pH6Lb3rdVVjCuopGC4S/S8+chuoTKA==",
        "X-Received": "by 2002:a05:600c:3548:b0:419:f3f9:8ee3 with SMTP id\n\t5b1f17b1804b1-41fea93a80amr18045885e9.5.1715335332497; \n\tFri, 10 May 2024 03:02:12 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>,\n\tJacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH v3 2/7] libcamera: formats: Add RGB48 formats",
        "Date": "Fri, 10 May 2024 11:02:03 +0100",
        "Message-Id": "<20240510100208.12188-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240510100208.12188-1-naush@raspberrypi.com>",
        "References": "<20240510100208.12188-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "Add support for 16-bps (48-bpp) RGB output formats to libcamera. These\nnew formats are defined for the RGB and BGR ordering.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/formats.cpp          | 20 ++++++++++++++++++++\n src/libcamera/formats.yaml         |  5 +++++\n src/libcamera/v4l2_pixelformat.cpp |  4 ++++\n 3 files changed, 29 insertions(+)",
    "diff": "diff --git a/src/libcamera/formats.cpp b/src/libcamera/formats.cpp\nindex e6dea719d69e..e2d292c232a5 100644\n--- a/src/libcamera/formats.cpp\n+++ b/src/libcamera/formats.cpp\n@@ -270,6 +270,26 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{\n \t\t.pixelsPerGroup = 1,\n \t\t.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},\n \t} },\n+\t{ formats::BGR161616, {\n+\t\t.name = \"BGR161616\",\n+\t\t.format = formats::BGR161616,\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_RGB48), },\n+\t\t.bitsPerPixel = 48,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n+\t\t.packed = false,\n+\t\t.pixelsPerGroup = 1,\n+\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n+\t{ formats::RGB161616, {\n+\t\t.name = \"RGB161616\",\n+\t\t.format = formats::RGB161616,\n+\t\t.v4l2Formats = { V4L2PixelFormat(V4L2_PIX_FMT_BGR48), },\n+\t\t.bitsPerPixel = 48,\n+\t\t.colourEncoding = PixelFormatInfo::ColourEncodingRGB,\n+\t\t.packed = false,\n+\t\t.pixelsPerGroup = 1,\n+\t\t.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},\n+\t} },\n \n \t/* YUV packed formats. */\n \t{ formats::YUYV, {\ndiff --git a/src/libcamera/formats.yaml b/src/libcamera/formats.yaml\nindex d8a379923b56..bde2cc803b98 100644\n--- a/src/libcamera/formats.yaml\n+++ b/src/libcamera/formats.yaml\n@@ -43,6 +43,11 @@ formats:\n   - BGRA8888:\n       fourcc: DRM_FORMAT_BGRA8888\n \n+  - RGB161616:\n+      fourcc: DRM_FORMAT_RGB161616\n+  - BGR161616:\n+      fourcc: DRM_FORMAT_BGR161616\n+\n   - YUYV:\n       fourcc: DRM_FORMAT_YUYV\n   - YVYU:\ndiff --git a/src/libcamera/v4l2_pixelformat.cpp b/src/libcamera/v4l2_pixelformat.cpp\nindex 1ca5ef92c39d..d3a882dc69a5 100644\n--- a/src/libcamera/v4l2_pixelformat.cpp\n+++ b/src/libcamera/v4l2_pixelformat.cpp\n@@ -71,6 +71,10 @@ const std::map<V4L2PixelFormat, V4L2PixelFormat::Info> vpf2pf{\n \t\t{ formats::BGRA8888, \"32-bit ARGB 8-8-8-8\" } },\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_BGRA32),\n \t\t{ formats::RGBA8888, \"32-bit ABGR 8-8-8-8\" } },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_RGB48),\n+\t\t{ formats::BGR161616, \"48-bit RGB 16-16-16\" } },\n+\t{ V4L2PixelFormat(V4L2_PIX_FMT_BGR48),\n+\t\t{ formats::RGB161616, \"48-bit BGR 16-16-16\" } },\n \n \t/* YUV packed formats. */\n \t{ V4L2PixelFormat(V4L2_PIX_FMT_YUYV),\n",
    "prefixes": [
        "v3",
        "2/7"
    ]
}