Show a patch.

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

{
    "id": 17126,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/17126/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/17126/",
    "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": "<20220815141637.4159-2-david.plowman@raspberrypi.com>",
    "date": "2022-08-15T14:16:37",
    "name": "[libcamera-devel,1/1] pipeline: raspberrypi: Detect monochrome \"R\" formats as being raw",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "413b4fc5f2bade8f350109949df8cdf108358028",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/1.1/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/17126/mbox/",
    "series": [
        {
            "id": 3417,
            "url": "https://patchwork.libcamera.org/api/1.1/series/3417/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3417",
            "date": "2022-08-15T14:16:36",
            "name": "Raspberry Pi: handle monochrome raw formats correctly",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3417/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/17126/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/17126/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 126E3C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Aug 2022 14:16:45 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 471AB61FC3;\n\tMon, 15 Aug 2022 16:16:44 +0200 (CEST)",
            "from mail-wr1-x434.google.com (mail-wr1-x434.google.com\n\t[IPv6:2a00:1450:4864:20::434])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C910261FB9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Aug 2022 16:16:41 +0200 (CEST)",
            "by mail-wr1-x434.google.com with SMTP id p10so9234373wru.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Aug 2022 07:16:41 -0700 (PDT)",
            "from pi4-davidp.pitowers.org\n\t([2a00:1098:3142:14:e4a2:3070:eea4:e434])\n\tby smtp.gmail.com with ESMTPSA id\n\tbk12-20020a0560001d8c00b0021f0ff1bc6csm7294282wrb.41.2022.08.15.07.16.40\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 15 Aug 2022 07:16:40 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660573004;\n\tbh=rIIajOFKp9ZjL0mcrvMOoRmPXcgEIbo4XaxMju+7nYA=;\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=DXi63At4tl3hFqaXVixgfIfXnXWd+IhZIZkzNhC2Mtw0hKA0vY9j5WEnoTdpaSV7c\n\tw1Tc1g10tFmM8qJ0AWqLjrgKNNFs29wvvH1WjTe40KIVCllj8oB0o0lNG6wiugajyQ\n\tQ7t9iYyQvdBg1CbNXDNh7dce3HKpIr4Q8LSLggxrf+pwFmSFv3E5dqV6c/PWqu3qUP\n\thKMA5PvV/aMhCu7vyM9tBTx3emAUwtTTGCO8l3saNS937BNybWd/hJK0vBW2lezOuQ\n\tHfOm4P1x2vNGzeTqIyCP4RAriOW+5aulGsbZnxez6lKZcgF1BcwG7Gk4baUi8HNt3O\n\tIngGQlvvN1usw==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc;\n\tbh=WqJMQJDQa8+nipPssOgsvURKS1sR066j+Z99ngQ+u8E=;\n\tb=e46ATPYliZCMvRUUFxZb+EITQ2M7bjRbXSznDYXbI8xUCPtnw0kCxyqbXrd39wNSsX\n\tJFE/VU0CC1lB542tOOfCfovERqS1ndQtFsi8OfQVjOXVzfjj+KEmQ28JiXGD1TyoSBQD\n\tPJR8BChGVuEuoGOnIPT7v7XhescLO5VCteNHVTn6dbRiLaG8zxjPrh4Io2PaNTvmCgaT\n\t2FO1nfCQm3liabei3owLCXEXpainkSeGurcrrPwnZWiVnJOU5hb+GOuC7A/Xwnrzcdqy\n\thYEFpVaT52tY/xQT339y8jn7P9/W1WqtJ2CqOq7/2PqOAfWE+IQs4f9sWcVjW5O4MjDN\n\tY3sw=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"e46ATPYl\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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\tbh=WqJMQJDQa8+nipPssOgsvURKS1sR066j+Z99ngQ+u8E=;\n\tb=1IPsN49fDq/ZxPnFZAXf1RsjTaaLwmiKXHDNE6+sjmVdidXo9zcOr1hRzRysegfe9A\n\tEJtJWsnhzcYbhXlILucVDHgHV8oBLmKU1YXPZ3YcAL+7k9mo6CseOXebzLrq6xkFZBJr\n\t6mYN69c24aqsegNE/sl8F7mhO0CdqphMMiQsKF2zexZcLRqweJGSSat5qPaJbh4HI8vg\n\tm12ypLArvIjJeT/PI+dzgoo6SpoeSlzCDN4OMiQ52wsbjiBZX24T+1TpXKh5WYD6VyBz\n\t/E1MRkvRbnJw9lnjZTAx1OIqVswwug4XRw/ncZcU027ino06s6SeeDOy4gLs1ffDMQ6Y\n\t2SeA==",
        "X-Gm-Message-State": "ACgBeo1WvfzGOemunCoaSr4Tx3v3B5xh7AXvvA68iuQe248W3HImsi9x\n\t+XGFzgNWV5MwPtxwbc1fnrulo4TQ4LzmHw==",
        "X-Google-Smtp-Source": "AA6agR73ru1PSXPtjZMZ6xKc0WIpuUsO4jm3UjUKJGzkTfnCsZZoTTY8kJwOM2G9xvtctdTqM+oaQA==",
        "X-Received": "by 2002:a5d:61c4:0:b0:21e:e00c:f8b4 with SMTP id\n\tq4-20020a5d61c4000000b0021ee00cf8b4mr8453386wrv.145.1660573001282; \n\tMon, 15 Aug 2022 07:16:41 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 15 Aug 2022 15:16:37 +0100",
        "Message-Id": "<20220815141637.4159-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20220815141637.4159-1-david.plowman@raspberrypi.com>",
        "References": "<20220815141637.4159-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 1/1] pipeline: raspberrypi: Detect\n\tmonochrome \"R\" formats as being raw",
        "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": "David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>",
        "Reply-To": "David Plowman <david.plowman@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "The \"R\" pixel formats (R8, R10, R10_CSI2P etc.) record the associated\ncolour space as being YUV rather than RAW, meaning that the code was\nnot detecting them as being raw formats.\n\nIn the case of Raspberry Pi, we deal only with raw formats, so the\nrevised test must work correctly for both these and the standard Bayer\nformats.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 14 ++------------\n 1 file changed, 2 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex e895584d..fae8e45e 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -105,18 +105,8 @@ V4L2DeviceFormat toV4L2DeviceFormat(const V4L2VideoDevice *dev,\n \n bool isRaw(const PixelFormat &pixFmt)\n {\n-\t/*\n-\t * The isRaw test might be redundant right now the pipeline handler only\n-\t * supports RAW sensors. Leave it in for now, just as a sanity check.\n-\t */\n-\tif (!pixFmt.isValid())\n-\t\treturn false;\n-\n-\tconst PixelFormatInfo &info = PixelFormatInfo::info(pixFmt);\n-\tif (!info.isValid())\n-\t\treturn false;\n-\n-\treturn info.colourEncoding == PixelFormatInfo::ColourEncodingRAW;\n+\t/* This test works for both Bayer and raw mono formats. */\n+\treturn BayerFormat::fromPixelFormat(pixFmt).isValid();\n }\n \n double scoreFormat(double desired, double actual)\n",
    "prefixes": [
        "libcamera-devel",
        "1/1"
    ]
}