Show a patch.

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

{
    "id": 11381,
    "url": "https://patchwork.libcamera.org/api/patches/11381/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/11381/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20210225170141.5184-2-david.plowman@raspberrypi.com>",
    "date": "2021-02-25T17:01:40",
    "name": "[libcamera-devel,1/2] ipa: raspberrypi: AWB: Remove unused code",
    "commit_ref": "b8bd37c6af39e2095e7b0d88279a3d91fe58e12c",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "563c61edc627cde069489f3c96315fa45dddb343",
    "submitter": {
        "id": 42,
        "url": "https://patchwork.libcamera.org/api/people/42/?format=api",
        "name": "David Plowman",
        "email": "david.plowman@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/11381/mbox/",
    "series": [
        {
            "id": 1728,
            "url": "https://patchwork.libcamera.org/api/series/1728/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1728",
            "date": "2021-02-25T17:01:39",
            "name": "Raspberry Pi AWB tidying",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/1728/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/11381/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/11381/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 99281BD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 25 Feb 2021 17:01:50 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 20B7468A56;\n\tThu, 25 Feb 2021 18:01:49 +0100 (CET)",
            "from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com\n\t[IPv6:2a00:1450:4864:20::42c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 08F7E6040F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Feb 2021 18:01:48 +0100 (CET)",
            "by mail-wr1-x42c.google.com with SMTP id 7so5974172wrz.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 25 Feb 2021 09:01:48 -0800 (PST)",
            "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\te3sm1526337wrt.12.2021.02.25.09.01.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 25 Feb 2021 09:01:46 -0800 (PST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"DxedQmy4\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=7kFYrabkLQwEOQ8GxfmBl8oPqftFuK/vgroR+kL72fw=;\n\tb=DxedQmy4hpEiKNdPSu3iQoHx+X0sXCuCLh9DBxv/PKn4Yj7rrfU2AOKQT8flbPNHgp\n\tLYBW6YjIlAhfzbmNBocbgRciXSa7/hS3hY/CaFEpQLV98jbuVxLOQ1+vjM+xOzhfNDyb\n\tl7K72Aj0aHC/IrFIeWZyIeRMYOkz/xhDx1AhuIV582Qtq7LDZBQqQLnoqAeQ2rVFExha\n\tHNOq72GQbkB29XdpsHVFZnPofZ0mUmQc/NK6KzgQLHvRYpSlH3hL4N8fuEQCy+1+pD0W\n\tjET5+t0GisEbwH6J0poG8VNL5/Ua6UAQtQYx7/h2oNpu1QsXIfqeG77eNzdQiHuIBB+0\n\tLt4g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=7kFYrabkLQwEOQ8GxfmBl8oPqftFuK/vgroR+kL72fw=;\n\tb=GkCHGWXejpFAarlLNig2Tmjm40xAq0gZ1y/xgc646OWx1jS6y/va03Ft7/tOp25ATK\n\tL9r+h+c1Q7sf/HU5UOWBaxBmcExDeze+P36gkPgp9rX4sqDpXr14aF3NkbL0Nt7Poy6v\n\td3CAblaqgsaXf7vvLRSSh7QMqc6tREYL7BT1zzIv4+6DwLTLzzcMHLgbYeYYQSgJfYji\n\tKxF+GELhbuGmh81QjZTK/2hHWQEGJ3Bgp63R0FEIpDf6zCVL+COPOo+Fzxset1gzp/LV\n\td2vPcT68RWXTQGPuN82g4cRX/4+w0FxlICgOrAodD8ayDanS3WVoVN2+VSRkvZ8e3Rpo\n\t8AsQ==",
        "X-Gm-Message-State": "AOAM530J6RQz5+g0Ak0ixcEcR3AmVpCtS2LlxlMUIp0+xVdg1Yomp59a\n\t64g2pTOg+sihu8E9k1NcLkYw86E19v3yYLsS",
        "X-Google-Smtp-Source": "ABdhPJz97Cc5f0kZUnASRMS32NjkEYAvNVTVqHeGtAge4OCcwvLJW6AohsDs+3/dg6Ra9W+FGBKmAA==",
        "X-Received": "by 2002:adf:a703:: with SMTP id c3mr4363247wrd.379.1614272507482;\n\tThu, 25 Feb 2021 09:01:47 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Thu, 25 Feb 2021 17:01:40 +0000",
        "Message-Id": "<20210225170141.5184-2-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20210225170141.5184-1-david.plowman@raspberrypi.com>",
        "References": "<20210225170141.5184-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH 1/2] ipa: raspberrypi: AWB: Remove unused\n\tcode",
        "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>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Some more code from pre-libcamera versions is removed. There is no\nfunctional change.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/rpi/awb.cpp | 4 +---\n src/ipa/raspberrypi/controller/rpi/awb.hpp | 7 +------\n 2 files changed, 2 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex bb637f10..791a7039 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n@@ -21,8 +21,6 @@ LOG_DEFINE_CATEGORY(RPiAwb)\n #define AWB_STATS_SIZE_X DEFAULT_AWB_REGIONS_X\n #define AWB_STATS_SIZE_Y DEFAULT_AWB_REGIONS_Y\n \n-const double Awb::RGB::INVALID = -1.0;\n-\n // todo - the locking in this algorithm needs some tidying up as has been done\n // elsewhere (ALSC and AGC).\n \n@@ -340,7 +338,7 @@ static void generate_stats(std::vector<Awb::RGB> &zones,\n \t\t\t   double min_G)\n {\n \tfor (int i = 0; i < AWB_STATS_SIZE_X * AWB_STATS_SIZE_Y; i++) {\n-\t\tAwb::RGB zone; // this is \"invalid\", unless R gets overwritten later\n+\t\tAwb::RGB zone;\n \t\tdouble counted = stats[i].counted;\n \t\tif (counted >= min_pixels) {\n \t\t\tzone.G = stats[i].g_sum / counted;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp\nindex 45ba9e25..2fe59c37 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n@@ -90,21 +90,16 @@ public:\n \tvoid Prepare(Metadata *image_metadata) override;\n \tvoid Process(StatisticsPtr &stats, Metadata *image_metadata) override;\n \tstruct RGB {\n-\t\tRGB(double _R = INVALID, double _G = INVALID,\n-\t\t    double _B = INVALID)\n+\t\tRGB(double _R = -1.0, double _G = -1.0, double _B = -1.0)\n \t\t\t: R(_R), G(_G), B(_B)\n \t\t{\n \t\t}\n \t\tdouble R, G, B;\n-\t\tstatic const double INVALID;\n-\t\tbool Valid() const { return G != INVALID; }\n-\t\tbool Invalid() const { return G == INVALID; }\n \t\tRGB &operator+=(RGB const &other)\n \t\t{\n \t\t\tR += other.R, G += other.G, B += other.B;\n \t\t\treturn *this;\n \t\t}\n-\t\tRGB Square() const { return RGB(R * R, G * G, B * B); }\n \t};\n \n private:\n",
    "prefixes": [
        "libcamera-devel",
        "1/2"
    ]
}