Show a patch.

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

{
    "id": 12846,
    "url": "https://patchwork.libcamera.org/api/patches/12846/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/12846/",
    "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": "<20210707094815.1500917-3-naush@raspberrypi.com>",
    "date": "2021-07-07T09:48:09",
    "name": "[libcamera-devel,v4,2/8] ipa: raspberrypi: Add a constructor struct DeviceStatus",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "b8bb7bfa6a8820aac23d3ce34356ecf3103f436f",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/12846/mbox/",
    "series": [
        {
            "id": 2214,
            "url": "https://patchwork.libcamera.org/api/series/2214/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2214",
            "date": "2021-07-07T09:48:07",
            "name": "Raspberry Pi: Enable imx477 long exposure modes",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2214/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/12846/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/12846/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 0842CC3224\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  7 Jul 2021 09:48:23 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AED1F6852B;\n\tWed,  7 Jul 2021 11:48:20 +0200 (CEST)",
            "from mail-wm1-x334.google.com (mail-wm1-x334.google.com\n\t[IPv6:2a00:1450:4864:20::334])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9DAD168506\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  7 Jul 2021 11:48:19 +0200 (CEST)",
            "by mail-wm1-x334.google.com with SMTP id\n\tt14-20020a05600c198eb029020c8aac53d4so10124906wmq.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 07 Jul 2021 02:48:19 -0700 (PDT)",
            "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:f800:302e:bf7e:a06b])\n\tby smtp.gmail.com with ESMTPSA id\n\tr16sm23377836wrx.63.2021.07.07.02.48.18\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 07 Jul 2021 02:48:18 -0700 (PDT)"
        ],
        "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=\"mGD/JX6z\"; 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=xKQKDlA/B6wWUNDaLbnwgPOltVgogbkgEw+x4QjCkLg=;\n\tb=mGD/JX6zEIMZOmNAsMeNt5YcqfCHDqbppe+OcDIFh66ZKIS8Gaz5LmoZdS2hPyw5fk\n\tqAAxtQlZrbOCcQxDEfTVapXLMtTRXY26lhG0K3SXKnk3W0vRk2t15Yd8IMVIEjniS+A2\n\tmv0uyOd9ZXHzCnKaAMRsA7wLp+bRCfyDvt6FcR+MPN9lOCqRc3qXKk1Flwpykh4wyzla\n\tWC7M2zvUZJqO+yeyWSHiWqwvFLpqa3jTV6q030JRTj88dC/28LRL92MPiYuhZ5IdLTKC\n\tonGW18piFS7QZVICUqWt6QkBN3ORFiFc2bP98bUeynl0b8h0THvLTtcP770hHMslT6eF\n\tTraA==",
        "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=xKQKDlA/B6wWUNDaLbnwgPOltVgogbkgEw+x4QjCkLg=;\n\tb=ZsEXGr3/YjdrqjnQXUYXww/IS7NsdGLqIXXMOZJFCV6otpNYzGD51ifPQHEwDcFbEV\n\tAIryvGT0qT+BSK+4EKBaLLGLF6pFtllTkp/IBae4E6MvmyDXMYCu2TPTaQsQypvDDHXM\n\tux/9Kkzg5kD8uOzpWlKbu9DB24hK2+/M8RCmyf8O9yI1hSbMiqu28AYJliedsjHMCWk+\n\tuQTePb95x+Wi+W4XWHbjJANrexkUdLcjbflmy5S7DqwMUFr47hr1G17bZz6PS+CWGx5G\n\tWYAE7DEcq1ECFBrmt7u3D0YH6uTLC+yRJRJ9sGlhcsE1PjALUJ/1EX4aWnC623aGnr1F\n\tnhug==",
        "X-Gm-Message-State": "AOAM531mYl0/eKwxYF0vxEbxvPq5B6OYoWX9DosMEB8lAs9IEkIkD2WQ\n\tDLNbKEW4a8x17lWBDnNFweseIruRoTPXRQ==",
        "X-Google-Smtp-Source": "ABdhPJyLdeIMF+kfxRTXEGsQYjUphQkxje820efOHbKOLIYO1+8ofIrx+zhy+z8oO6U1j1uL8h65GA==",
        "X-Received": "by 2002:a1c:f70d:: with SMTP id\n\tv13mr24800544wmh.183.1625651299144; \n\tWed, 07 Jul 2021 02:48:19 -0700 (PDT)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  7 Jul 2021 10:48:09 +0100",
        "Message-Id": "<20210707094815.1500917-3-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20210707094815.1500917-1-naush@raspberrypi.com>",
        "References": "<20210707094815.1500917-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 2/8] ipa: raspberrypi: Add a\n\tconstructor struct DeviceStatus",
        "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": "The constructor sets all fields to 0. This replaces the memset(0) and default\nvalue initialisation usage in the agc and lux controllers respectively.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n---\n src/ipa/raspberrypi/controller/device_status.h | 6 ++++++\n src/ipa/raspberrypi/controller/rpi/agc.cpp     | 1 -\n src/ipa/raspberrypi/controller/rpi/lux.cpp     | 9 +--------\n 3 files changed, 7 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\nindex 733378dbfa27..73df7ce228dd 100644\n--- a/src/ipa/raspberrypi/controller/device_status.h\n+++ b/src/ipa/raspberrypi/controller/device_status.h\n@@ -14,6 +14,12 @@\n  */\n \n struct DeviceStatus {\n+\tDeviceStatus()\n+\t\t: shutter_speed(std::chrono::seconds(0)), analogue_gain(0.0),\n+\t\t  lens_position(0.0), aperture(0.0), flash_intensity(0.0)\n+\t{\n+\t}\n+\n \t/* time shutter is open */\n \tlibcamera::utils::Duration shutter_speed;\n \tdouble analogue_gain;\ndiff --git a/src/ipa/raspberrypi/controller/rpi/agc.cpp b/src/ipa/raspberrypi/controller/rpi/agc.cpp\nindex 6c3a4eb2a04d..f57783f821ec 100644\n--- a/src/ipa/raspberrypi/controller/rpi/agc.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/agc.cpp\n@@ -172,7 +172,6 @@ Agc::Agc(Controller *controller)\n \t// it's not been calculated yet (i.e. Process hasn't yet run).\n \tmemset(&status_, 0, sizeof(status_));\n \tstatus_.ev = ev_;\n-\tmemset(&last_device_status_, 0, sizeof(last_device_status_));\n }\n \n char const *Agc::Name() const\ndiff --git a/src/ipa/raspberrypi/controller/rpi/lux.cpp b/src/ipa/raspberrypi/controller/rpi/lux.cpp\nindex f58d69397e1c..6367b17dc7f4 100644\n--- a/src/ipa/raspberrypi/controller/rpi/lux.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/lux.cpp\n@@ -60,14 +60,7 @@ void Lux::Prepare(Metadata *image_metadata)\n \n void Lux::Process(StatisticsPtr &stats, Metadata *image_metadata)\n {\n-\t// set some initial values to shut the compiler up\n-\tDeviceStatus device_status = {\n-\t\t.shutter_speed = 1.0ms,\n-\t\t.analogue_gain = 1.0,\n-\t\t.lens_position = 0.0,\n-\t\t.aperture = 0.0,\n-\t\t.flash_intensity = 0.0\n-\t};\n+\tDeviceStatus device_status;\n \tif (image_metadata->Get(\"device.status\", device_status) == 0) {\n \t\tdouble current_gain = device_status.analogue_gain;\n \t\tdouble current_aperture = device_status.aperture;\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "2/8"
    ]
}