Show a patch.

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

{
    "id": 10465,
    "url": "https://patchwork.libcamera.org/api/patches/10465/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/10465/",
    "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": "<20201123073804.3125-7-david.plowman@raspberrypi.com>",
    "date": "2020-11-23T07:38:00",
    "name": "[libcamera-devel,v2,06/10] libcamera: ipa: raspberrypi: awb: Add SwitchMode method to output AWB status",
    "commit_ref": "23ada683db6a33ee848dd9d3061d252e6c9e5dfd",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "afd0c28a7eb523096ec4da6e443d9721e77733fd",
    "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/10465/mbox/",
    "series": [
        {
            "id": 1475,
            "url": "https://patchwork.libcamera.org/api/series/1475/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1475",
            "date": "2020-11-23T07:37:54",
            "name": "Raspberry Pi AGC",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1475/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/10465/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/10465/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 810FDBE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 23 Nov 2020 07:38:38 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4FAD76332E;\n\tMon, 23 Nov 2020 08:38:38 +0100 (CET)",
            "from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com\n\t[IPv6:2a00:1450:4864:20::32d])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 280F960332\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 23 Nov 2020 08:38:36 +0100 (CET)",
            "by mail-wm1-x32d.google.com with SMTP id s13so16276193wmh.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 22 Nov 2020 23:38:36 -0800 (PST)",
            "from pi4-davidp.lan (plowpeople3.plus.com. [80.229.223.72])\n\tby smtp.gmail.com with ESMTPSA id\n\th15sm17841822wrw.15.2020.11.22.23.38.34\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 22 Nov 2020 23:38:34 -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=\"jGML+XRY\"; 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=43bWmHG17Nxr2zP+ZJpDTRe06JALjHw0tSt03Ca7jmI=;\n\tb=jGML+XRYoGfb3GJwgBAY+P3km6lJGuAVLQ8UTtxpLXbnjIMlD+/eptmL4/oZSoUJVc\n\tNkHmVTGiCm/QjOUd5pFNbb6dFFHZ8H9BIt2x51Pw/btNcxfoz8FrnF/ZdKDAT1iz9Wrb\n\t52uUPICYEhvoxlAviTrqfoN11pZm2675o4YB8PBe4jpKrC8fq99unlsdwKqcB+Ob9oQF\n\thePcZRbroOaNtAGd+iVex/VNkS+6IBz0gSiI8tCPvMloVlU7TP80PwUFfKwjRdbngqqb\n\te56JnOKXd2gbc+IL2LG+x+uYn1ArldOnSWi9NoQSIWrkADh9DLuybc8jcjw7BK4uSj47\n\t67KA==",
        "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=43bWmHG17Nxr2zP+ZJpDTRe06JALjHw0tSt03Ca7jmI=;\n\tb=GRy6x7OgpdwE13j5r0B0zsRAhQch1+mgzyEKh9HndtNe3pKG9K44/83aPqIHXVgLCM\n\tJKpT580QUVAGsMg/wIezefkusmDlXmuWcZel8eNCCZqYLWKgyBb3qFrPsHrpKG3bkEI+\n\tIJTIKl/1m+ejdFJYVAB1uN4gbo9jFb26tsiS3vUaWZrre8DYOJ4e5WMSLANanRRAXFZ0\n\tUvJA62sTCi1C8R2luiKk34zRgUtKCnv5/MuF+tNHoaOT2rHObh1EOsOxTStGNmc+Krf9\n\tE6KATZaXpXvfxv95hvY5lUHqEWsjMjt/CMs0v4Hmwb7ocknhZpCrCHWYv9unLnsyQhsQ\n\tvboA==",
        "X-Gm-Message-State": "AOAM530yW0EBlDVvxY0bqzhlPatOz5+yCOy9Fv7x8jRICtPBTzFSBEpS\n\toyRY8tE5an/geW676GUJIzU+vAH2+XKIXdOJ",
        "X-Google-Smtp-Source": "ABdhPJzde+fxoVyqCC/BPSc4bbK7xe2NVtmz9X9EKSdalQvkZ6YqB7J+hgbxGQ+w5NAWs96IDSVg1w==",
        "X-Received": "by 2002:a7b:c5cf:: with SMTP id n15mr23347401wmk.9.1606117115574;\n\tSun, 22 Nov 2020 23:38:35 -0800 (PST)",
        "From": "David Plowman <david.plowman@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Mon, 23 Nov 2020 07:38:00 +0000",
        "Message-Id": "<20201123073804.3125-7-david.plowman@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20201123073804.3125-1-david.plowman@raspberrypi.com>",
        "References": "<20201123073804.3125-1-david.plowman@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2 06/10] libcamera: ipa: raspberrypi:\n\tawb: Add SwitchMode method to output AWB status",
        "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": "The Awb class now implements a SwitchMode method which outputs its\nAwbStatus for other algorithms to read, should they be interested.\n\nSigned-off-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/rpi/awb.cpp | 14 ++++++++++++++\n src/ipa/raspberrypi/controller/rpi/awb.hpp |  1 +\n 2 files changed, 15 insertions(+)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/rpi/awb.cpp b/src/ipa/raspberrypi/controller/rpi/awb.cpp\nindex 469d0e53..020825e3 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.cpp\n@@ -179,6 +179,20 @@ void Awb::SetManualGains(double manual_r, double manual_b)\n \tmanual_b_ = manual_b;\n }\n \n+void Awb::SwitchMode([[maybe_unused]] CameraMode const &camera_mode,\n+\t\t     Metadata *metadata)\n+{\n+\t// If fixed colour gains have been set, we should let other algorithms\n+\t// know by writing it into the image metadata.\n+\tif (manual_r_ != 0.0 && manual_b_ != 0.0) {\n+\t\tprev_sync_results_.gain_r = manual_r_;\n+\t\tprev_sync_results_.gain_g = 1.0;\n+\t\tprev_sync_results_.gain_b = manual_b_;\n+\t\tsync_results_ = prev_sync_results_;\n+\t}\n+\tmetadata->Set(\"awb.status\", prev_sync_results_);\n+}\n+\n void Awb::fetchAsyncResults()\n {\n \tRPI_LOG(\"Fetch AWB results\");\ndiff --git a/src/ipa/raspberrypi/controller/rpi/awb.hpp b/src/ipa/raspberrypi/controller/rpi/awb.hpp\nindex 9124d042..545d85a8 100644\n--- a/src/ipa/raspberrypi/controller/rpi/awb.hpp\n+++ b/src/ipa/raspberrypi/controller/rpi/awb.hpp\n@@ -84,6 +84,7 @@ public:\n \tvoid Read(boost::property_tree::ptree const &params) override;\n \tvoid SetMode(std::string const &name) override;\n \tvoid SetManualGains(double manual_r, double manual_b) override;\n+\tvoid SwitchMode(CameraMode const &camera_mode, Metadata *metadata) override;\n \tvoid Prepare(Metadata *image_metadata) override;\n \tvoid Process(StatisticsPtr &stats, Metadata *image_metadata) override;\n \tstruct RGB {\n",
    "prefixes": [
        "libcamera-devel",
        "v2",
        "06/10"
    ]
}