Show a patch.

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

{
    "id": 25197,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25197/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25197/",
    "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": "<20251125162851.2301793-19-stefan.klug@ideasonboard.com>",
    "date": "2025-11-25T16:28:30",
    "name": "[v3,18/29] pipeline: rksip1: Move isRaw up in scope",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0feb8b52c6efbbda39d941f1a996b28ec7362d6d",
    "submitter": {
        "id": 184,
        "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api",
        "name": "Stefan Klug",
        "email": "stefan.klug@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25197/mbox/",
    "series": [
        {
            "id": 5613,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5613/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5613",
            "date": "2025-11-25T16:28:12",
            "name": "Full dewarper support on imx8mp",
            "version": 3,
            "mbox": "https://patchwork.libcamera.org/series/5613/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25197/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25197/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 89D7CC333C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 Nov 2025 16:29:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3F61860AA9;\n\tTue, 25 Nov 2025 17:29:50 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 49F5460AA9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 Nov 2025 17:29:48 +0100 (CET)",
            "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:bae1:340c:573c:570b])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4814813DE; \n\tTue, 25 Nov 2025 17:27:39 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"c49g6m8j\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764088059;\n\tbh=HfLvjKiNNLE6G9AXy7i70zO8RwYQ/+PKMZMMvzip0xI=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=c49g6m8jUxw+bi79WTL1MYRDjsCev16RQP+Yh7xDKEH17i2SqzzMt5R1G/FMINJKB\n\tQhv5GIGC/mHqEbeDk4JVK4Q0JVv/SBXDLiOFrDLsaHjF6qN3mkmbys3yJhv9qycLON\n\t9euCljBdTGq9BtTvPXSCP9/0TPfcNvmDbgmQVIGc=",
        "From": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>",
        "Subject": "[PATCH v3 18/29] pipeline: rksip1: Move isRaw up in scope",
        "Date": "Tue, 25 Nov 2025 17:28:30 +0100",
        "Message-ID": "<20251125162851.2301793-19-stefan.klug@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20251125162851.2301793-1-stefan.klug@ideasonboard.com>",
        "References": "<20251125162851.2301793-1-stefan.klug@ideasonboard.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": "In raw mode the number of configurations is actively limited to 1. It is\ntherefore safe to move isRaw up one level to simplify the code and\nprepare for later use.\n\nDuring that rework it was noticed that the old code actually has a bug\nin that it reduces the number of configurations to 1 in case a raw\nconfig is found, but it doesn't reduce the config vector to that raw\nconfig, but the first config.\n\nChange that behavior to check the first config and either remove all\nremaining configs if the first is raw or drop all raw configs if the\nfirst is non-raw.\n\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\n---\n\nChanges in v3:\n- Added fix for cases where only one stream is requested\n- Fix adjustment in case of multiple configs\n- Small code cleanup\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 35 ++++++++++++------------\n 1 file changed, 17 insertions(+), 18 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 6256a67bc31e..a11d70849121 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -551,31 +551,30 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \t\tstatus = Adjusted;\n \n \t/*\n-\t * Simultaneous capture of raw and processed streams isn't possible. If\n-\t * there is any raw stream, cap the number of streams to one.\n+\t * Simultaneous capture of raw and processed streams isn't possible.\n+\t * Let the first stream decide on the type.\n \t */\n-\tif (config_.size() > 1) {\n-\t\tfor (const auto &cfg : config_) {\n-\t\t\tif (PixelFormatInfo::info(cfg.pixelFormat).colourEncoding ==\n+\tbool isRaw = (PixelFormatInfo::info(config_[0].pixelFormat).colourEncoding ==\n+\t\t      PixelFormatInfo::ColourEncodingRAW);\n+\tif (isRaw) {\n+\t\tif (config_.size() > 1) {\n+\t\t\tconfig_.resize(1);\n+\t\t\tstatus = Adjusted;\n+\t\t}\n+\t} else {\n+\t\t/* Drop all raw configs. */\n+\t\tfor (auto it = config_.begin(); it != config_.end();) {\n+\t\t\tif (PixelFormatInfo::info(it->pixelFormat).colourEncoding ==\n \t\t\t    PixelFormatInfo::ColourEncodingRAW) {\n-\t\t\t\tconfig_.resize(1);\n+\t\t\t\tit = config_.erase(it);\n \t\t\t\tstatus = Adjusted;\n-\t\t\t\tbreak;\n+\t\t\t\tcontinue;\n \t\t\t}\n+\t\t\t++it;\n \t\t}\n \t}\n \n-\tbool useDewarper = false;\n-\tif (pipe->dewarper_) {\n-\t\t/*\n-\t\t * Platforms with dewarper support, such as i.MX8MP, support\n-\t\t * only a single stream. We can inspect config_[0] only here.\n-\t\t */\n-\t\tbool isRaw = PixelFormatInfo::info(config_[0].pixelFormat).colourEncoding ==\n-\t\t\t     PixelFormatInfo::ColourEncodingRAW;\n-\t\tif (!isRaw)\n-\t\t\tuseDewarper = true;\n-\t}\n+\tbool useDewarper = (pipe->dewarper_ && !isRaw);\n \n \t/*\n \t * If there are more than one stream in the configuration figure out the\n",
    "prefixes": [
        "v3",
        "18/29"
    ]
}