Patch Detail
Show a patch.
GET /api/1.1/patches/12903/?format=api
{ "id": 12903, "url": "https://patchwork.libcamera.org/api/1.1/patches/12903/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12903/", "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": "<20210712100209.447893-3-naush@raspberrypi.com>", "date": "2021-07-12T10:02:03", "name": "[libcamera-devel,v7,2/8] ipa: raspberrypi: Add a constructor struct DeviceStatus", "commit_ref": "df8cafaf8788eb27c25576ce94ca605f8a50527d", "pull_url": null, "state": "accepted", "archived": false, "hash": "ac478a414b1ad69c32023736c063b58fb58712e9", "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/12903/mbox/", "series": [ { "id": 2227, "url": "https://patchwork.libcamera.org/api/1.1/series/2227/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2227", "date": "2021-07-12T10:02:01", "name": "ipa: raspberrypi: Allow long exposure modes for imx477.", "version": 7, "mbox": "https://patchwork.libcamera.org/series/2227/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12903/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12903/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 E936FC3226\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 12 Jul 2021 10:02:20 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4A8B968530;\n\tMon, 12 Jul 2021 12:02:20 +0200 (CEST)", "from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E96D68513\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Jul 2021 12:02:17 +0200 (CEST)", "by mail-wm1-x333.google.com with SMTP id\n\tj25-20020a05600c1c19b02902269686f585so800986wms.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 12 Jul 2021 03:02:17 -0700 (PDT)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:3395:5e50:10bb:f8fd])\n\tby smtp.gmail.com with ESMTPSA id\n\tb16sm14249941wrs.51.2021.07.12.03.02.15\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 12 Jul 2021 03:02:16 -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=\"JG1+JvXj\"; 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=a0ZizHb7bTi3j6yd62ZDAnQqObfPtxZJzqDIOudippA=;\n\tb=JG1+JvXjfZ8kkysHva0wlUurAaVyRWKNcWf1HVD+8JcVrNyDyOSBWxAzCdc3Aya3rC\n\tXnMkPNOmLBPeATOyZLgoOXEjqiQBJU/7UaiI3HJrs9FTPS3TzoFLNMLHxXez3yjqJ+kK\n\tcMm6hDXNtUjk4ymZTJASuUKBp0mTYnYiSdz9errJqiv2faHszCyD9cocgwLuogmc1Zw1\n\tSL9pV4xpOM0Ox9QFBi/OPWxitU0CEigAf7O2K4xZt5RUonxlSRtnvq88ENrcZh7kPpLo\n\t5c52S8SiO9cAltMbhmUK4zzvv+GrDexELjuiEVHD0RdlPjgWesupf3Cu8Mzu+qPlfj4Y\n\t72gQ==", "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=a0ZizHb7bTi3j6yd62ZDAnQqObfPtxZJzqDIOudippA=;\n\tb=J0kerV9j81p1z2heAeRSYai+RrMNvXAHZlEMfy5JTl511clpYfwmv+PNIBwRwtZy1I\n\t0uh/sS8pEZW5wY5LB0gkeYhfUuuXZY/ebR3ehnEfC9UXkDZLTF0Z2gRS/QUl8yuIvtg9\n\thXWuEi9wc8xqKRJPN53Tyhp7dNMo4XWbpcmLv55ejInoFee3nMwkeB/Os5BgQ39ObHgP\n\tx8Ub46f5mkfuc7ufQKDKIfA6vq06RluRQY1isxmOcqrsHknExWEWXwsuBx3Sir0090nl\n\tuEk2WeEpZw1bPxXzewdxiaJP8wJxNO/zUu3j1iNaB+7FddPxeAYwf+Lky5cW1+lHHgo1\n\txr0w==", "X-Gm-Message-State": "AOAM5310yvk5Wa9Dg0u3JN4aCU3LimoM9k1A36+ep0BypC6vseVGEBgF\n\tuCaHLwIc+2qhxtJUmtkaBfDzfVCT1WdgnQ==", "X-Google-Smtp-Source": "ABdhPJyP8LvHkePKVX2d/7ERQMsFYN9g3YQGKIE5p/CA1JZEkeOzkmMr0yi4r4v6b5c+5Oz6GXh3HQ==", "X-Received": "by 2002:a05:600c:4f54:: with SMTP id\n\tm20mr3340728wmq.52.1626084136664; \n\tMon, 12 Jul 2021 03:02:16 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 12 Jul 2021 11:02:03 +0100", "Message-Id": "<20210712100209.447893-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210712100209.447893-1-naush@raspberrypi.com>", "References": "<20210712100209.447893-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v7 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>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.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/geq.cpp | 2 +-\n src/ipa/raspberrypi/controller/rpi/lux.cpp | 9 +--------\n 4 files changed, 8 insertions(+), 10 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/geq.cpp b/src/ipa/raspberrypi/controller/rpi/geq.cpp\nindex bdceb1f3d3eb..4530cb75792c 100644\n--- a/src/ipa/raspberrypi/controller/rpi/geq.cpp\n+++ b/src/ipa/raspberrypi/controller/rpi/geq.cpp\n@@ -49,7 +49,7 @@ void Geq::Prepare(Metadata *image_metadata)\n \tlux_status.lux = 400;\n \tif (image_metadata->Get(\"lux.status\", lux_status))\n \t\tLOG(RPiGeq, Warning) << \"no lux data found\";\n-\tDeviceStatus device_status = {};\n+\tDeviceStatus device_status;\n \tdevice_status.analogue_gain = 1.0; // in case not found\n \tif (image_metadata->Get(\"device.status\", device_status))\n \t\tLOG(RPiGeq, Warning)\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", "v7", "2/8" ] }