Show a patch.

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

{
    "id": 26191,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/26191/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/26191/",
    "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": "<20260218213030.479743-1-dev@fredfunk.tech>",
    "date": "2026-02-18T21:30:49",
    "name": "gstreamer: Add CSI-2 packed Bayer format mappings",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "35a0e71cd940e3de3504b8b8ed76fd8cdbea6438",
    "submitter": {
        "id": 260,
        "url": "https://patchwork.libcamera.org/api/1.1/people/260/?format=api",
        "name": "Frederic Laing",
        "email": "dev@fredfunk.tech"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/26191/mbox/",
    "series": [
        {
            "id": 5800,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5800/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5800",
            "date": "2026-02-18T21:30:49",
            "name": "gstreamer: Add CSI-2 packed Bayer format mappings",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5800/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/26191/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/26191/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 B28B0C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 18 Feb 2026 21:30:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0547662222;\n\tWed, 18 Feb 2026 22:30:58 +0100 (CET)",
            "from mail-4396.protonmail.ch (mail-4396.protonmail.ch\n\t[185.70.43.96])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BCFDF620FA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 18 Feb 2026 22:30:55 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=fredfunk.tech header.i=@fredfunk.tech\n\theader.b=\"vzzyy2sm\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=fredfunk.tech;\n\ts=protonmail; t=1771450255; x=1771709455;\n\tbh=zpO7gVGsX63AVmAVEWho4FlkmN6dhm0/JYXPf48IvRI=;\n\th=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:\n\tSubject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;\n\tb=vzzyy2smsj6IwPcj2jhyecf3S6QlgLJqTBVh58O5n2AfONMLlQQAJycnHEBDfWEi1\n\tP+IFWqv5M1mceDQrwUnolWRPH0uTrzITMJEEg4l6CjNHgJvpPyNqrRCms66A6LgZoz\n\tItflg3tKQpwp9lJbobhBziMmkA6MhwCsTIo3iFse/APxBeCgz6uKFkdD2KG4xRZUiX\n\tV1ze/c2xLX4ST2r4ODpkie2tKtxZtJ5P2xNqq8hXI80JUOvZ6ET2BCDvI2teDj4DzO\n\t7dnq7VI0kqjHij70zV6Z5n/t4xLnXfDd84yMqzYEfB8HwEe2Ch/YpJPEq0GJcXM2OJ\n\tZmS5Qpcz7pnww==",
        "Date": "Wed, 18 Feb 2026 21:30:49 +0000",
        "To": "libcamera-devel@lists.libcamera.org",
        "From": "Frederic Laing <dev@fredfunk.tech>",
        "Cc": "Frederic Laing <dev@fredfunk.tech>",
        "Subject": "[PATCH] gstreamer: Add CSI-2 packed Bayer format mappings",
        "Message-ID": "<20260218213030.479743-1-dev@fredfunk.tech>",
        "Feedback-ID": "182542373:user:proton",
        "X-Pm-Message-ID": "e6e57907d17423c87da1ca1491a81de9d84f505f",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=utf-8",
        "Content-Transfer-Encoding": "quoted-printable",
        "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 SRGGB/SBGGR/SGBRG/SGRBG 10/12/14-bit CSI-2 packed (CSI2P) format\nentries to both format_map and bayer_map in gstlibcamera-utils.cpp.\n\nMany camera sensors (e.g., IMX371, IMX376) natively output\nCSI-2 packed Bayer formats like SRGGB10_CSI2P. Without mappings for\nthese formats, GStreamer's libcamerasrc cannot negotiate raw Bayer\noutput (video/x-bayer caps) when the sensor only supports CSI2P\nvariants, causing caps negotiation to fail with empty caps.\n\nThis is particularly important handler where\ndual-stream (ViewFinder + Raw) capture requires the Raw stream to use\nthe sensor's native CSI2P format. The Software ISP processes only the\nViewFinder stream while the Raw stream bypasses it entirely, but\nGStreamer needs to be able to represent the Raw stream's format in caps.\n\nThe CSI2P formats are mapped to the same GStreamer Bayer format names\nas their unpacked counterparts (e.g., SRGGB10_CSI2P -> \"rggb10le\"),\nsince GStreamer's video/x-bayer caps describe the Bayer pattern and\nbit depth, not the byte packing.\n\nTested on OnePlus 6T (Qualcomm SDM845) with IMX371 front camera:\n- Single raw stream: 4656x3496 SRGGB10_CSI2P\n- Dual stream: 640x480 ABGR8888 (ViewFinder) + 4656x3496 SRGGB10_CSI2P\n\nSigned-off-by: Frederic Laing <dev@fredfunk.tech>\n---\n src/gstreamer/gstlibcamera-utils.cpp | 31 +++++++++++++++++++++++++++-\n 1 file changed, 30 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/src/gstreamer/gstlibcamera-utils.cpp b/src/gstreamer/gstlibcamera-utils.cpp\nindex bfb094c9..fb3a1411 100644\n--- a/src/gstreamer/gstlibcamera-utils.cpp\n+++ b/src/gstreamer/gstlibcamera-utils.cpp\n@@ -22,7 +22,7 @@ static const struct {\n \t/* Compressed */\n \t{ GST_VIDEO_FORMAT_ENCODED, formats::MJPEG },\n \n-\t/* Bayer formats */\n+\t/* Bayer formats - unpacked */\n \t{ GST_VIDEO_FORMAT_ENCODED, formats::SBGGR8 },\n \t{ GST_VIDEO_FORMAT_ENCODED, formats::SGBRG8 },\n \t{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG8 },\n@@ -44,6 +44,20 @@ static const struct {\n \t{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG16 },\n \t{ GST_VIDEO_FORMAT_ENCODED, formats::SRGGB16 },\n \n+\t/* Bayer formats - CSI-2 packed */\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SBGGR10_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SGBRG10_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG10_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SRGGB10_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SBGGR12_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SGBRG12_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG12_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SRGGB12_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SBGGR14_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SGBRG14_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SGRBG14_CSI2P },\n+\t{ GST_VIDEO_FORMAT_ENCODED, formats::SRGGB14_CSI2P },\n+\n \t/* Monochrome */\n \t{ GST_VIDEO_FORMAT_GRAY8, formats::R8 },\n \t{ GST_VIDEO_FORMAT_GRAY16_LE, formats::R16 },\n@@ -265,6 +279,7 @@ static const struct {\n \tPixelFormat format;\n \tconst gchar *name;\n } bayer_map[]{\n+\t/* Unpacked */\n \t{ formats::SBGGR8, \"bggr\" },\n \t{ formats::SGBRG8, \"gbrg\" },\n \t{ formats::SGRBG8, \"grbg\" },\n@@ -285,6 +300,20 @@ static const struct {\n \t{ formats::SGBRG16, \"gbrg16le\" },\n \t{ formats::SGRBG16, \"grbg16le\" },\n \t{ formats::SRGGB16, \"rggb16le\" },\n+\n+\t/* CSI-2 packed */\n+\t{ formats::SBGGR10_CSI2P, \"bggr10le\" },\n+\t{ formats::SGBRG10_CSI2P, \"gbrg10le\" },\n+\t{ formats::SGRBG10_CSI2P, \"grbg10le\" },\n+\t{ formats::SRGGB10_CSI2P, \"rggb10le\" },\n+\t{ formats::SBGGR12_CSI2P, \"bggr12le\" },\n+\t{ formats::SGBRG12_CSI2P, \"gbrg12le\" },\n+\t{ formats::SGRBG12_CSI2P, \"grbg12le\" },\n+\t{ formats::SRGGB12_CSI2P, \"rggb12le\" },\n+\t{ formats::SBGGR14_CSI2P, \"bggr14le\" },\n+\t{ formats::SGBRG14_CSI2P, \"gbrg14le\" },\n+\t{ formats::SGRBG14_CSI2P, \"grbg14le\" },\n+\t{ formats::SRGGB14_CSI2P, \"rggb14le\" },\n };\n \n static const gchar *\n",
    "prefixes": []
}