Show a patch.

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

{
    "id": 20832,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/20832/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/20832/",
    "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": "<20240808102346.13065-2-naush@raspberrypi.com>",
    "date": "2024-08-08T10:23:40",
    "name": "[v1,1/7] controls: rpi: Add a vendor rpi::ScalerCrops control",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2b2f1ec4d7b96402658e0e6d37c6186093be671c",
    "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/20832/mbox/",
    "series": [
        {
            "id": 4501,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4501/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4501",
            "date": "2024-08-08T10:23:39",
            "name": "Raspberry Pi: Add controls::rpi::ScalerCrops",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4501/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/20832/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/20832/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 E7058C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Aug 2024 10:23:57 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E506A633AC;\n\tThu,  8 Aug 2024 12:23:51 +0200 (CEST)",
            "from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D7E16337F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Aug 2024 12:23:47 +0200 (CEST)",
            "by mail-wr1-x435.google.com with SMTP id\n\tffacd0b85a97d-368712acb8dso447233f8f.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 08 Aug 2024 03:23:47 -0700 (PDT)",
            "from naush-laptop.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-36d272290c2sm1404234f8f.92.2024.08.08.03.23.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 08 Aug 2024 03:23:46 -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=\"lOSO9bNo\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1723112627; x=1723717427;\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=+/STe4ThVU9OKTfydcOuaJT8p+RpiuamPQ1PRGTFiSM=;\n\tb=lOSO9bNot3HWVatkkTg7LYpeoXZsEO3bz2is4znVz/GJUEeiiI3p7pl7hBSdUSdN3W\n\tVa1veh/vbonC/WSCndK9Jx4cabnJm8isKe/E5hwu7oj5lrWjVbVmg3tFuILK8E8HskdE\n\ttKqT4E49WprPnPGLGGbIC994Bv8TfH852FhsNH63xGMghZFXzUsT3WST7SN7WGSTBQL9\n\tQ5RS1qx8nN+hKILGXAJlL2hggvWVaU/BHAn0kS5TxZ9TvW423cRzGCLV5M8RS1gNUspp\n\tK3JEjkTJPi0BhcYnEcMaLlWfkxNB+2Vt6RnAhs/LXEDptkuaoSpMF/XKi1EOnOkgNCJp\n\tpGAQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1723112627; x=1723717427;\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=+/STe4ThVU9OKTfydcOuaJT8p+RpiuamPQ1PRGTFiSM=;\n\tb=uLuis5+pwWJY4EgCS9L+AiMrQINVXqXazlxNYIIhb+OLRmrloEaWVNt3P6fWMrJc/0\n\ttKucpjB+g9ECq2/78nu4bN0LV6LpDpSGd8AE0F6WTopP3Za4v9bUoid91wmOuSJhbVd1\n\t/mAAXylftW3B/ZsA2sguGeISyieIZZaWKM0u4kepVkp8EIP+z6dVxG04qBztEsE4VyHp\n\tZxOeuXBWBP5Xyc8eDoI3ZJ9QgD39aGVBVDfqFOmgiCiDgI/BPS0fiEl3WPsYBh6wpVXO\n\tdPWXWQWcmIc1LygzBQfNApPMOTrIbje1aLwh59YAxBH7WSMUZ/1/suoJAbDwjBxyJksB\n\tL40A==",
        "X-Gm-Message-State": "AOJu0Yw9TX3/wx50gxTHQLwAG7wLtE23jZvpZBFlG67/4LZsFJ9NE+a+\n\tNid0g3SjtO/oanC4mJLX3rzv3xzM6NI8iWpxH2M1L/R5MONwiB0us0YIWqEHWcFuCQCg9x7vHhG\n\tK",
        "X-Google-Smtp-Source": "AGHT+IFpg3HYxx1TrsdDAbcTzj3ebcwAhd9DhE9eERgd/zbIQ13zBmFgttBOPD+Bes63xI+BMLusxA==",
        "X-Received": "by 2002:a5d:6e0c:0:b0:367:8847:5bf4 with SMTP id\n\tffacd0b85a97d-36d273d43a2mr1099085f8f.10.1723112626577; \n\tThu, 08 Aug 2024 03:23:46 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH v1 1/7] controls: rpi: Add a vendor rpi::ScalerCrops control",
        "Date": "Thu,  8 Aug 2024 11:23:40 +0100",
        "Message-Id": "<20240808102346.13065-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20240808102346.13065-1-naush@raspberrypi.com>",
        "References": "<20240808102346.13065-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 a vendor control rpi::ScalerCrops that is analogous to the current\ncore::ScalerCrop, but can apply a different crop to each configured\nstream.\n\nThis control takes a span of Rectangle structures - the order of\nrectangles must match the order of streams configured by the application.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/common/ipa_base.cpp    |  2 ++\n src/libcamera/control_ids_rpi.yaml | 15 +++++++++++++++\n 2 files changed, 17 insertions(+)",
    "diff": "diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp\nindex ee3848b54f21..463f6d384c9e 100644\n--- a/src/ipa/rpi/common/ipa_base.cpp\n+++ b/src/ipa/rpi/common/ipa_base.cpp\n@@ -71,6 +71,7 @@ const ControlInfoMap::Map ipaControls{\n \t{ &controls::HdrMode, ControlInfo(controls::HdrModeValues) },\n \t{ &controls::Sharpness, ControlInfo(0.0f, 16.0f, 1.0f) },\n \t{ &controls::ScalerCrop, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n+\t{ &controls::rpi::ScalerCrops, ControlInfo(Rectangle{}, Rectangle(65535, 65535, 65535, 65535), Rectangle{}) },\n \t{ &controls::FrameDurationLimits, ControlInfo(INT64_C(33333), INT64_C(120000)) },\n \t{ &controls::draft::NoiseReductionMode, ControlInfo(controls::draft::NoiseReductionModeValues) },\n \t{ &controls::rpi::StatsOutputEnable, ControlInfo(false, true, false) },\n@@ -1070,6 +1071,7 @@ void IpaBase::applyControls(const ControlList &controls)\n \t\t\tbreak;\n \t\t}\n \n+\t\tcase controls::rpi::SCALER_CROPS:\n \t\tcase controls::SCALER_CROP: {\n \t\t\t/* We do nothing with this, but should avoid the warning below. */\n \t\t\tbreak;\ndiff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml\nindex cb097f887e16..3d4a305dd8f5 100644\n--- a/src/libcamera/control_ids_rpi.yaml\n+++ b/src/libcamera/control_ids_rpi.yaml\n@@ -26,4 +26,19 @@ controls:\n \n         \\sa StatsOutputEnable\n \n+  - ScalerCrops:\n+      type: Rectangle\n+      size: [n]\n+      description: |\n+        An array of rectangles, where each singular value has identical functionality\n+        to the ScalerCrop control. This control allows the Raspberry Pi pipeline\n+        handler to control individual scaler crops per output stream.\n+\n+        The order of rectangles passed into the control must match the order of\n+        streams configured by the application.\n+\n+        Note that using different crop rectangles for each output stream is only\n+        applicable on the Pi5/PiSP platform.\n+\n+        \\sa ScalerCrop\n ...\n",
    "prefixes": [
        "v1",
        "1/7"
    ]
}