Show a patch.

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

{
    "id": 19163,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/19163/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/19163/",
    "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": "<20231020084002.30665-3-naush@raspberrypi.com>",
    "date": "2023-10-20T08:39:58",
    "name": "[libcamera-devel,v1,2/6] ipa: rpi: alsc: Do not re-read the alsc.status metadata",
    "commit_ref": "0923d50b15c6e5125a4b37f399a7a040062b058d",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "31dbf14513c9ba72a7f4a56004a4004af962e824",
    "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/19163/mbox/",
    "series": [
        {
            "id": 4054,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4054/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4054",
            "date": "2023-10-20T08:39:56",
            "name": "Raspberry Pi: Preliminary PiSP support (round 2)",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/4054/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/19163/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/19163/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 9C4E1C3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 20 Oct 2023 08:40:33 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 33FF062984;\n\tFri, 20 Oct 2023 10:40:32 +0200 (CEST)",
            "from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 457F961DCF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Oct 2023 10:40:29 +0200 (CEST)",
            "by mail-wm1-x329.google.com with SMTP id\n\t5b1f17b1804b1-408382da7f0so4642275e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 20 Oct 2023 01:40:29 -0700 (PDT)",
            "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tr3-20020adff103000000b0032d9337e7d1sm1213356wro.11.2023.10.20.01.40.27\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 20 Oct 2023 01:40:28 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1697791232;\n\tbh=hyrcppkQ/aLO8GrgZTPwyUsByDlFOAsouuRaaeZJT+w=;\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=CycwwHNirE9AuTtU6HBmolrruVpdOv+sDHxQbXKJT9k7u0DDOfx4bJEe+8sNj334F\n\tRy3q3TTq2fO0INQYKpMKsZbMqzyYsc9QEfN8pGc2CNnIYOwrJGvJu623M9/qV2R8Kr\n\tVpn8gvnmKtQLhGuX+gB3zZFqegWyp3NcSlVHnauaTB3XgZx1lYp2OiedOcvgybX8ST\n\tNPOhVDqXugZ5kAuz2rKZnVvRZUv5cy3rYc+3wO5ftiddj+/GoaGUODVHSDGweFBDqb\n\te5LMJ0by19LyyyQ/icTRPzNtD8rHgQIANpg/d/KnZ37q/384RZGKBwt+AusZRIJAm6\n\ts2t6BFyB2PVig==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1697791228; x=1698396028;\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=XphytegKuvdJqBcBAhm4YNfDa2jw6aybWVFS0aOqByI=;\n\tb=shik20/7xFw/ZnuJXnGYANJgcS8Y04EST2y5yRnEXILyrlG+x50EvyMiQdoZaLkAJn\n\trLohkvmpcQ26HoixjwRZu8QkSdNDzs5R6+q9MF+PTjrUzlrpFY62DFbMMhuOSacpQvLw\n\tBVhTqqQczG0TngSUIS6WRALai5X9FMUZBq8L0s/kPoPddvpyfUa8XD96di8dmBTAUToI\n\t8sEUU4b9xb4crdBTqPIWY0tywIsdRn20li2mculnNKon0TXZWGzyDH2JF7lxapcsUhvx\n\tPI44FXkbJBP5fgd+MYnJxgbHXh8TItWuSkWOXRmCCrywkueQCrsnXmdKWkN7HIFgyCEC\n\tP3nA=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"shik20/7\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1697791228; x=1698396028;\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=XphytegKuvdJqBcBAhm4YNfDa2jw6aybWVFS0aOqByI=;\n\tb=EwA++qncni3nt79azexmMAgu+jZZu06WrcJMGvk1QMI+6wqEXpIgGkHhiix3qZQ4Ni\n\t/SO6hM9Pyq3hqq1L1eeiTbfeekERZ/OQeMkDOrK1wC551FOTWdR03QUuw5TjeJB4Ah6+\n\teIJk4jpUqvlM9lPQVuvFrq9c6ly8GFexu8IOTAKT6I1voO0sF6VWiIQDB0UC2pyVw3gd\n\tMSszeVSUAZxbawUU1LJXB9u0xNf0OPfEFFunmh48/09s/onFHrrWIpTJPz9sk7X0YDpY\n\tTYac3BxST7bwSMyDV3VAbF2CDkFdDI1q/5O7n2Oo80qEDiIx2WnsVun4JLkzsySBuCI1\n\tfAPA==",
        "X-Gm-Message-State": "AOJu0YxvnRG0Zm3Q4fwAr+I6xedGvA+tu62ESPHfSuRNDExqmbNTVPcu\n\tGP8/HMfaft0h+N8dFIEHHbrr4karfAuOVTji1h5M+w==",
        "X-Google-Smtp-Source": "AGHT+IHXSRqUlzdTvS53QtTxpvTpAbOZIQAxc2coYpUh2KUHH5n+9YZNFU3nSheEHC1UMfCslUSNkg==",
        "X-Received": "by 2002:a05:600c:4747:b0:408:2b:3ae with SMTP id\n\tw7-20020a05600c474700b00408002b03aemr868043wmo.6.1697791228433; \n\tFri, 20 Oct 2023 01:40:28 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Fri, 20 Oct 2023 09:39:58 +0100",
        "Message-Id": "<20231020084002.30665-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "In-Reply-To": "<20231020084002.30665-1-naush@raspberrypi.com>",
        "References": "<20231020084002.30665-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v1 2/6] ipa: rpi: alsc: Do not re-read the\n\talsc.status metadata",
        "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": "From: David Plowman <david.plowman@raspberrypi.com>\n\nThis was being re-read in order to determine what LSC gains had been\napplied. We can just retrieve these numbers from the prevAsyncResults_\ninstead.\n\nThis will also enable other future algorithms to manipulate the LSC\ntables in the alsc.status, without it breaking the core ALSC algorithm\nhere.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/rpi/controller/rpi/alsc.cpp | 22 +++++++---------------\n 1 file changed, 7 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/src/ipa/rpi/controller/rpi/alsc.cpp b/src/ipa/rpi/controller/rpi/alsc.cpp\nindex f1ccef87c70c..b7413611cdae 100644\n--- a/src/ipa/rpi/controller/rpi/alsc.cpp\n+++ b/src/ipa/rpi/controller/rpi/alsc.cpp\n@@ -338,14 +338,14 @@ double getCt(Metadata *metadata, double defaultCt)\n }\n \n static void copyStats(RgbyRegions &regions, StatisticsPtr &stats,\n-\t\t      AlscStatus const &status)\n+\t\t      std::array<Array2D<double>, 3> &prevSyncResults)\n {\n \tif (!regions.numRegions())\n \t\tregions.init(stats->awbRegions.size());\n \n-\tconst std::vector<double> &rTable = status.r;\n-\tconst std::vector<double> &gTable = status.g;\n-\tconst std::vector<double> &bTable = status.b;\n+\tconst std::vector<double> &rTable = prevSyncResults[0].data(); //status.r;\n+\tconst std::vector<double> &gTable = prevSyncResults[1].data(); //status.g;\n+\tconst std::vector<double> &bTable = prevSyncResults[2].data(); //status.b;\n \tfor (unsigned int i = 0; i < stats->awbRegions.numRegions(); i++) {\n \t\tauto r = stats->awbRegions.get(i);\n \t\tif (stats->colourStatsPos == Statistics::ColourStatsPos::PostLsc) {\n@@ -367,18 +367,10 @@ void Alsc::restartAsync(StatisticsPtr &stats, Metadata *imageMetadata)\n \tct_ = getCt(imageMetadata, ct_);\n \t/*\n \t * We have to copy the statistics here, dividing out our best guess of\n-\t * the LSC table that the pipeline applied to them.\n+\t * the LSC table that the pipeline applied to them which we get from\n+\t * prevSyncResults_.\n \t */\n-\tAlscStatus alscStatus;\n-\tif (stats->colourStatsPos == Statistics::ColourStatsPos::PostLsc &&\n-\t    imageMetadata->get(\"alsc.status\", alscStatus) != 0) {\n-\t\tLOG(RPiAlsc, Warning)\n-\t\t\t<< \"No ALSC status found for applied gains!\";\n-\t\talscStatus.r.resize(config_.tableSize.width * config_.tableSize.height, 1.0);\n-\t\talscStatus.g.resize(config_.tableSize.width * config_.tableSize.height, 1.0);\n-\t\talscStatus.b.resize(config_.tableSize.width * config_.tableSize.height, 1.0);\n-\t}\n-\tcopyStats(statistics_, stats, alscStatus);\n+\tcopyStats(statistics_, stats, prevSyncResults_);\n \tframePhase_ = 0;\n \tasyncStarted_ = true;\n \t{\n",
    "prefixes": [
        "libcamera-devel",
        "v1",
        "2/6"
    ]
}