Patch Detail
Show a patch.
GET /api/1.1/patches/12794/?format=api
{ "id": 12794, "url": "https://patchwork.libcamera.org/api/1.1/patches/12794/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12794/", "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": "<20210702150940.226941-4-naush@raspberrypi.com>", "date": "2021-07-02T15:09:35", "name": "[libcamera-devel,v3,3/8] ipa: raspberrypi: Add an operator<< to struct DeviceStatus", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "28f0ccf04d5d258410500838f638755094cae776", "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/12794/mbox/", "series": [ { "id": 2203, "url": "https://patchwork.libcamera.org/api/1.1/series/2203/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2203", "date": "2021-07-02T15:09:32", "name": "Raspberry Pi: Enable imx477 long exposure modes", "version": 3, "mbox": "https://patchwork.libcamera.org/series/2203/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12794/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12794/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 8601AC0100\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 2 Jul 2021 15:09:55 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C5C468510;\n\tFri, 2 Jul 2021 17:09:55 +0200 (CEST)", "from mail-wr1-x436.google.com (mail-wr1-x436.google.com\n\t[IPv6:2a00:1450:4864:20::436])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CE87068501\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 2 Jul 2021 17:09:52 +0200 (CEST)", "by mail-wr1-x436.google.com with SMTP id a13so12832924wrf.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 02 Jul 2021 08:09:52 -0700 (PDT)", "from naush-laptop.patuck.local ([88.97.76.4])\n\tby smtp.gmail.com with ESMTPSA id\n\tn4sm3619335wrw.21.2021.07.02.08.09.51\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 02 Jul 2021 08:09:51 -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=\"nBxzcD6h\"; 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=O7H1hFZyFkxaWCJ77Wzb3PdS3XbH9S/vOwpeZxUZzf4=;\n\tb=nBxzcD6h8lmYCahsnYL4YfhoGJT5S795pHeMd3styf1xaVyCJf8F/HETstJ3FuyYvu\n\tFvHS2TGnFVVF7Wu6EbdMCVRFMuWQaGt6va9hBmducZG4Y9JyLeg3KbWSKjDSRMa2EgC7\n\tQgAi/hitr3st1dyAvTpQod7TNn6Um/wtR2JuoxZPswCdpBXcxl/s8v6sWPH2ADy2bEbI\n\th/A9lj3rDqt56oso7q1jHf0UuFNvXFLkdh3m5AV/XhunG4rWZYS0Toxwxs6AE9YdUh3z\n\ta9nNuNuBsivAn290xI1f+En9tcOHx8zF3ixc7qUeu6TA+2asYCfTq+vMeAYeQG+VYo2g\n\tR3/A==", "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=O7H1hFZyFkxaWCJ77Wzb3PdS3XbH9S/vOwpeZxUZzf4=;\n\tb=uk+SByHdeEsvq+FOKPccnTgUdzk07XeqSu8jXiQrRuaT5iEFdtTmgaYmWTlM2GaZYj\n\tp6KQM67hIYl3xhbc1WqmRX4DbmjXjz5uf5aerwUweJhzJKm2MaDY8tu7GIYh6bYFrW+4\n\tWF2+ag6zFAhkJKQE8n9IB2PwBwyl7x/FLyCQZY3a/Y9zuINWMglAYROjmPm9DU5S9lGY\n\tJn0TWT395g8W7sTe4fhCFSHOXpZ7Aa/nLZTRLQYnSAzQZM6hs8mG3CuDrLO22jxVQbSV\n\tCY8mACLGCJUqZPdaKWuLzRmm2fa0fjhsGImtRm02cKmv0aM/R9OqCIiWLKR+Kix1vzgi\n\tbSYQ==", "X-Gm-Message-State": "AOAM533IfI8O99OBbhdRSwATAThHuteVLqGM7wDe5TOGBeLBzPqWPq/I\n\tm3rnVLisF13a2gG2h9Tt496VyX2pt5Z9jA==", "X-Google-Smtp-Source": "ABdhPJws4avxQLBpaB121JYLthki1EVVhGFv68znmD6vxaY55xv95qTWz2DZeHKS2w/lztlzg8tvGQ==", "X-Received": "by 2002:a5d:668e:: with SMTP id l14mr93955wru.227.1625238592298; \n\tFri, 02 Jul 2021 08:09:52 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Fri, 2 Jul 2021 16:09:35 +0100", "Message-Id": "<20210702150940.226941-4-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210702150940.226941-1-naush@raspberrypi.com>", "References": "<20210702150940.226941-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v3 3/8] ipa: raspberrypi: Add an\n\toperator<< to 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": "Add an operator<< overload to log all fields in DeviceStatus, and remove the\nmanual logging statements in the IPA and CamHelper.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n src/ipa/raspberrypi/cam_helper.cpp | 5 +----\n src/ipa/raspberrypi/controller/device_status.h | 15 +++++++++++++++\n src/ipa/raspberrypi/raspberrypi.cpp | 5 +----\n 3 files changed, 17 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp\nindex e6d2258c66d7..1ec3f03e1aa3 100644\n--- a/src/ipa/raspberrypi/cam_helper.cpp\n+++ b/src/ipa/raspberrypi/cam_helper.cpp\n@@ -188,10 +188,7 @@ void CamHelper::parseEmbeddedData(Span<const uint8_t> buffer,\n \tdeviceStatus.shutter_speed = parsedDeviceStatus.shutter_speed;\n \tdeviceStatus.analogue_gain = parsedDeviceStatus.analogue_gain;\n \n-\tLOG(IPARPI, Debug) << \"Metadata updated - Exposure : \"\n-\t\t\t << deviceStatus.shutter_speed\n-\t\t\t << \" Gain : \"\n-\t\t\t << deviceStatus.analogue_gain;\n+\tLOG(IPARPI, Debug) << \"Metadata updated - \" << deviceStatus;\n \n \tmetadata.Set(\"device.status\", deviceStatus);\n }\ndiff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\nindex 73df7ce228dd..e2511d19b96d 100644\n--- a/src/ipa/raspberrypi/controller/device_status.h\n+++ b/src/ipa/raspberrypi/controller/device_status.h\n@@ -6,6 +6,8 @@\n */\n #pragma once\n \n+#include <iostream>\n+\n #include <libcamera/base/utils.h>\n \n /*\n@@ -20,6 +22,19 @@ struct DeviceStatus {\n \t{\n \t}\n \n+\tfriend std::ostream &operator<<(std::ostream &out, const DeviceStatus &d)\n+\t{\n+\t\tusing namespace libcamera; /* for the Duration operator<< overload */\n+\n+\t\tout << \"Exposure: \" << d.shutter_speed\n+\t\t << \" Gain: \" << d.analogue_gain\n+\t\t << \" Aperture: \" << d.aperture\n+\t\t << \" Lens: \" << d.lens_position\n+\t\t << \" Flash: \" << d.flash_intensity;\n+\n+\t\treturn out;\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/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex 4d09a84f6532..f51c970befb5 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -1019,10 +1019,7 @@ void IPARPi::fillDeviceStatus(const ControlList &sensorControls)\n \tdeviceStatus.shutter_speed = helper_->Exposure(exposureLines);\n \tdeviceStatus.analogue_gain = helper_->Gain(gainCode);\n \n-\tLOG(IPARPI, Debug) << \"Metadata - Exposure : \"\n-\t\t\t << deviceStatus.shutter_speed\n-\t\t\t << \" Gain : \"\n-\t\t\t << deviceStatus.analogue_gain;\n+\tLOG(IPARPI, Debug) << \"Metadata - \" << deviceStatus;\n \n \trpiMetadata_.Set(\"device.status\", deviceStatus);\n }\n", "prefixes": [ "libcamera-devel", "v3", "3/8" ] }