Show a patch.

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

{
    "id": 19114,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19114/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19114/",
    "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": "<20231006132000.23504-13-naush@raspberrypi.com>",
    "date": "2023-10-06T13:19:52",
    "name": "[libcamera-devel,12/20] pipeline: rpi: Add SW downscale status to RPi::Stream",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "648bd9de0aa3afb13c4f2fb5ffbd368e0f0df8dd",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/19114/mbox/",
    "series": [
        {
            "id": 4047,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4047/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4047",
            "date": "2023-10-06T13:19:40",
            "name": "Raspberry Pi: Preliminary PiSP support",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4047/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19114/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19114/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 C6D0AC32BD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  6 Oct 2023 13:20:14 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 59C126298B;\n\tFri,  6 Oct 2023 15:20:14 +0200 (CEST)",
            "from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com\n\t[IPv6:2a00:1450:4864:20::42b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 715EE62976\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  6 Oct 2023 15:20:12 +0200 (CEST)",
            "by mail-wr1-x42b.google.com with SMTP id\n\tffacd0b85a97d-3247cefa13aso1927495f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 06 Oct 2023 06:20:12 -0700 (PDT)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tm8-20020a056000180800b00321773bb933sm1639478wrh.77.2023.10.06.06.20.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 06 Oct 2023 06:20:11 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1696598414;\n\tbh=id5qaN0AlQ0dZvG0XNQj6kDyQVGgWcUJ0yI/mdjCs2A=;\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=eBzxkSNNIcrk6JFN3CdgaW5N9qLn0g5Ys/lkgZLqajIae9AHKa1el8wlNmhJF+QTl\n\tyktXAyj+qqybzd68Cj3J1UvZ5N5iflfeGXsGoApmCl03hu8ZwVufeJ70sCY9HiaVEU\n\tZPPo6i9u9MXDO6xcI787UqHuMgs3EDfhrdXIIgMiVNBgJyR95ncLn/xyJdqWoXdb/l\n\tuPjI/XBAiHa2uA1JPkWjLZ0RNJQf6RI3sXqOYgiL+v6NeIhcKU3GqpftM9zJEU/Xdq\n\tyDoatWrLiXtJ1UES3kVpNbl9RZECFGrOuCo+/imWizIbo1eWP6+157U60ZKOhZHB3S\n\t8/PSLlV5xbVYQ==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1696598412; x=1697203212;\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=tBYDcv/H5q0eN5pmy8TnArjyUVyQOyyVCfr4S8C4GtY=;\n\tb=N95pZuTd09whPZ+jOg5Sm/w7tOe22MVNJ5onx5XU+vReErmiMYRjWDUGiD/5vRKDTX\n\t2auhTZT6QJZUVDOQKX7PcYIj22PKprlqcVSZx7cGM7pQEtSr1KDunmrVNmo6RMuvXCik\n\t33zdhTIv7QllZ978DAQ+V+eR5jMHMMg7K4JdUAEH6Crf1B92vDVASermY9EWokFYuft1\n\t1aGN5O+djh0rn8HQP6uQY4lTKxAo/9ciuMwooAB1M25GVlOSTRtYxlUdO55lzjm59Jut\n\tF78IEvJ0lNvC1g0oW1ikn8d6nOSRVQhhSSg9QswUdq9vCe5Yrw+wJ1QankZY0QiHa8ct\n\tQLCQ=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"N95pZuTd\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1696598412; x=1697203212;\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=tBYDcv/H5q0eN5pmy8TnArjyUVyQOyyVCfr4S8C4GtY=;\n\tb=B2B2HFIP6i3RyMc/FBZvPLfTLWp2sIJq1qNo32tYqQHhVah1KFWR/r8o2KiAZKshgv\n\tU/mjs2PRyHIgoFcfFq1g1c8X6tKuDvfqhz4Cl9oyitKdqzbAsrXT1gCQbWNnFQi1hyHF\n\tuq7iaQhjkuv7uEGaUzo4nRKrDMNQm0h9cU6ZwUr2eRUdegDKUL5uD1xlfP2UgH79I9rh\n\t4Pn6Wga2X8AHL82U5U9+WSYQsvKw1MazXjEMPHT8FXJlYIM7xdyyhahBVdPA7Nu+cRHJ\n\tUK+SmddyYG/ieQLVqCr78FlxQf09UFIYCDuDWCM3EDEvN1QD0OBK+L2AuaQn8/mvjHQk\n\tYVSg==",
        "X-Gm-Message-State": "AOJu0YzVgFOKLbA6wPGPgqam7GMW4/xGlslSGXX0hB/tnxrhOY2SJCYs\n\tC4orWVI0n4hwZ8g6i8cvrU1EalvLHWnD5fUFMUKkyA==",
        "X-Google-Smtp-Source": "AGHT+IHcZw9MlEC43NBmgnItQ2wOyGmdoFLGb2xHhk52tTtMlYO/bDi2b3SSQeSrbCKZg4MmohToRQ==",
        "X-Received": "by 2002:a5d:6b82:0:b0:319:5677:f832 with SMTP id\n\tn2-20020a5d6b82000000b003195677f832mr6828786wrx.62.1696598411882; \n\tFri, 06 Oct 2023 06:20:11 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri,  6 Oct 2023 14:19:52 +0100",
        "Message-Id": "<20231006132000.23504-13-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231006132000.23504-1-naush@raspberrypi.com>",
        "References": "<20231006132000.23504-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 12/20] pipeline: rpi: Add SW downscale\n\tstatus to RPi::Stream",
        "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": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Naushir Patuck <naush@raspberrypi.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Record if additional software downscaling is needed for a particular\nstream in the RPi::Stream class. Additional software downscaling may be\nneeded if the user required downscale factor is greater than what the\nISP hardware is capable of.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/libcamera/pipeline/rpi/common/rpi_stream.cpp | 10 ++++++++++\n src/libcamera/pipeline/rpi/common/rpi_stream.h   | 11 +++++++++--\n 2 files changed, 19 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\nindex fd6f2efc6e27..25e6a4383bf6 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n@@ -57,6 +57,16 @@ const std::string &Stream::name() const\n \treturn name_;\n }\n \n+unsigned int Stream::swDownscale() const\n+{\n+\treturn swDownscale_;\n+}\n+\n+void Stream::setSwDownscale(unsigned int swDownscale)\n+{\n+\tswDownscale_ = swDownscale;\n+}\n+\n void Stream::resetBuffers()\n {\n \t/* Add all internal buffers to the queue of usable buffers. */\ndiff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\nindex c5e35d134926..fc2bdfe25d4a 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.h\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n@@ -86,13 +86,14 @@ public:\n \tusing StreamFlags = Flags<StreamFlag>;\n \n \tStream()\n-\t\t: flags_(StreamFlag::None), id_(0)\n+\t\t: flags_(StreamFlag::None), id_(0), swDownscale_(0)\n \t{\n \t}\n \n \tStream(const char *name, MediaEntity *dev, StreamFlags flags = StreamFlag::None)\n \t\t: flags_(flags), name_(name),\n-\t\t  dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(0)\n+\t\t  dev_(std::make_unique<V4L2VideoDevice>(dev)), id_(0),\n+\t\t  swDownscale_(0)\n \t{\n \t}\n \n@@ -104,6 +105,9 @@ public:\n \tconst std::string &name() const;\n \tvoid resetBuffers();\n \n+\tunsigned int swDownscale() const;\n+\tvoid setSwDownscale(unsigned int swDownscale);\n+\n \tvoid setExportedBuffers(std::vector<std::unique_ptr<FrameBuffer>> *buffers);\n \tconst BufferMap &getBuffers() const;\n \tunsigned int getBufferId(FrameBuffer *buffer) const;\n@@ -139,6 +143,9 @@ private:\n \t/* Tracks a unique id key for the bufferMap_ */\n \tunsigned int id_;\n \n+\t/* Power of 2 greater than one if software downscaling will be required. */\n+\tunsigned int swDownscale_;\n+\n \t/* All frame buffers associated with this device stream. */\n \tBufferMap bufferMap_;\n \n",
    "prefixes": [
        "libcamera-devel",
        "12/20"
    ]
}