Patch Detail
Show a patch.
GET /api/patches/16758/?format=api
{ "id": 16758, "url": "https://patchwork.libcamera.org/api/patches/16758/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16758/", "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": "<20220725134639.4572-6-naush@raspberrypi.com>", "date": "2022-07-25T13:46:29", "name": "[libcamera-devel,05/15] DNI: ipa: raspberrypi: Code refactoring to match style guidelines", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "cc9aecc91249ff084ed8cca0ae6229f3c4caa702", "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/16758/mbox/", "series": [ { "id": 3323, "url": "https://patchwork.libcamera.org/api/series/3323/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3323", "date": "2022-07-25T13:46:24", "name": "Raspberry Pi IPA code refactor", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3323/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16758/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16758/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 2A668C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 25 Jul 2022 13:46:54 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C3E1063322;\n\tMon, 25 Jul 2022 15:46:53 +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 32E5E63312\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jul 2022 15:46:48 +0200 (CEST)", "by mail-wr1-x436.google.com with SMTP id q18so5612104wrx.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 25 Jul 2022 06:46:48 -0700 (PDT)", "from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ta20-20020a05600c225400b003a32167b8d4sm18054320wmm.13.2022.07.25.06.46.46\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 25 Jul 2022 06:46:46 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658756813;\n\tbh=mdaRq5pwwxRmow8dsOA9Lpa4qgC5EL3ewLfduSNZnmA=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=O/qW5J204wkZ7uwcez441J91mExVsnIFtJGCMNLVkwe/LtZcmhYsOEWxE6I1rEEOg\n\tAR+xVvndYoJe7fLDDVRVAxzuCo3FE0We+kYLEpgOipx4JCkKRVnAnFmonBFkVypBNE\n\t+LhMJePuWUjZ/9yUAzYQArJFShxBZix1qXdwGRRKdH1RWWCSgpveji/i8adGr1q7mq\n\twEZls0UHt3Tbk2PGcg8BBpFu5CvcxiV6H/9R/1ZbRT2dpE3VGD5tfSkcyWRc5gqB2h\n\tLshJEkpum4GWm/l1NMw+Tv6E03sOI2VKyqMQz35b1XF/yIMA6qaFhZZSiOBPo5ICW1\n\tuobsmZJbT1NuQ==", "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=zyUxdXR3zpwCkd1DhRSIWcWB7l/iaA8Pv0AsZWOsUSo=;\n\tb=HehPTjuPxLM9N867p8pC4GDD/mQzRORyEna4QYYatsQHVLRaWq2he6T2Sj2yAN7uOm\n\t0GU0GeBiFG42U7V4ZsOKRfP5061LNAPUQGMVmsgaWWNgULFMXe7vMSK0CV1HuyK1i1MR\n\tmx01Nia/3UNBnTAZLn6xJRnOE4RHFKB9W0KM5mnPdbvYUYMAi+bZB4Bdh2+nF2+nXiUK\n\thgMl9D9EFcwXPI3Lkdw3NJYFkb61LeaYemHxLfcA8jlecIse5A/iKAV1bC14GheliUBH\n\tQVdtpsik13HpJgHSykKrrOM4ompoW/8mccbwXrPJQqmXKWGefxVjySrjWvMUgBj9eKqD\n\tOR7A==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"HehPTjuP\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\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=zyUxdXR3zpwCkd1DhRSIWcWB7l/iaA8Pv0AsZWOsUSo=;\n\tb=LAKZh50yRHFndJsDw6fsV9s6KXvQwECE0Zt1bY1LI33Skj73+u8/cpe7B6htfmpxTp\n\t1LPkh3A90TFMPPCQPSnuGxH6LPp5W03R/WOfbXyXu4umoKz9uqGhmhN/oEDr3I9pLUBi\n\tBA6S/WG3Q1lAcTK3YYkEd9T6OUA+y++gei0mqsJ701P07EldebhexXF/N7qI1k6MipAz\n\twTUXc+Z1sVM4NFxqAHCI/zaYz9Hd/Mvxx7kicNanB+Fl3m1OFTlIRSOPQ91T11whNdhG\n\t3SHVnHjr0svSpLajqx01IzTjQEFWBdkJvhVv6PyzYjBqh0MPdbbTn1OIiUIByW2yVseS\n\tNj/g==", "X-Gm-Message-State": "AJIora+FUo0b63X1bxX528M/L5X2dfIdARBE3UyWf79LGTSkAn4z4n6g\n\tauI7Co35IpZIId12eYM84J1D9+rbHGBE+A==", "X-Google-Smtp-Source": "AGRyM1vH8VQw2c4qtRbTt7RKQOJBpp+Uw32vnGDY+uXwis1wvN52fzkiG5YxYe9ew+PEKjAzF8O0kQ==", "X-Received": "by 2002:adf:f90c:0:b0:21e:5293:4390 with SMTP id\n\tb12-20020adff90c000000b0021e52934390mr7754950wrr.167.1658756807170; \n\tMon, 25 Jul 2022 06:46:47 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 25 Jul 2022 14:46:29 +0100", "Message-Id": "<20220725134639.4572-6-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220725134639.4572-1-naush@raspberrypi.com>", "References": "<20220725134639.4572-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 05/15] DNI: ipa: raspberrypi: Code\n\trefactoring to match style guidelines", "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>", "From": "Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Naushir Patuck <naush@raspberrypi.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Refactor the source files under src/ipa/raspberrypi/controller/d* to match the\nrecommended formatting guidelines for the libcamera project. The vast majority\nof changes in this commit comprise of switching from snake_case to CamelCase,\nand starting class member functions with a lower case character.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n .../controller/denoise_algorithm.hpp | 2 +-\n .../raspberrypi/controller/device_status.cpp | 18 +++++++++---------\n src/ipa/raspberrypi/controller/device_status.h | 16 ++++++++--------\n 3 files changed, 18 insertions(+), 18 deletions(-)", "diff": "diff --git a/src/ipa/raspberrypi/controller/denoise_algorithm.hpp b/src/ipa/raspberrypi/controller/denoise_algorithm.hpp\nindex 39fcd7e94df2..48de542ac4f3 100644\n--- a/src/ipa/raspberrypi/controller/denoise_algorithm.hpp\n+++ b/src/ipa/raspberrypi/controller/denoise_algorithm.hpp\n@@ -17,7 +17,7 @@ class DenoiseAlgorithm : public Algorithm\n public:\n \tDenoiseAlgorithm(Controller *controller) : Algorithm(controller) {}\n \t// A Denoise algorithm must provide the following:\n-\tvirtual void SetMode(DenoiseMode mode) = 0;\n+\tvirtual void setMode(DenoiseMode mode) = 0;\n };\n \n } // namespace RPiController\ndiff --git a/src/ipa/raspberrypi/controller/device_status.cpp b/src/ipa/raspberrypi/controller/device_status.cpp\nindex a389c40dafed..f8ed77354a0a 100644\n--- a/src/ipa/raspberrypi/controller/device_status.cpp\n+++ b/src/ipa/raspberrypi/controller/device_status.cpp\n@@ -10,21 +10,21 @@ using namespace libcamera; /* for the Duration operator<< overload */\n \n std::ostream &operator<<(std::ostream &out, const DeviceStatus &d)\n {\n-\tout << \"Exposure: \" << d.shutter_speed\n-\t << \" Frame length: \" << d.frame_length\n-\t << \" Gain: \" << d.analogue_gain;\n+\tout << \"Exposure: \" << d.shutterSpeed\n+\t << \" Frame length: \" << d.frameLength\n+\t << \" Gain: \" << d.analogueGain;\n \n \tif (d.aperture)\n \t\tout << \" Aperture: \" << *d.aperture;\n \n-\tif (d.lens_position)\n-\t\tout << \" Lens: \" << *d.lens_position;\n+\tif (d.lensPosition)\n+\t\tout << \" Lens: \" << *d.lensPosition;\n \n-\tif (d.flash_intensity)\n-\t\tout << \" Flash: \" << *d.flash_intensity;\n+\tif (d.flashIntensity)\n+\t\tout << \" Flash: \" << *d.flashIntensity;\n \n-\tif (d.sensor_temperature)\n-\t\tout << \" Temperature: \" << *d.sensor_temperature;\n+\tif (d.sensorTemperature)\n+\t\tout << \" Temperature: \" << *d.sensorTemperature;\n \n \treturn out;\n }\ndiff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\nindex b33f0d093ff3..ebcd7da2586b 100644\n--- a/src/ipa/raspberrypi/controller/device_status.h\n+++ b/src/ipa/raspberrypi/controller/device_status.h\n@@ -18,24 +18,24 @@\n \n struct DeviceStatus {\n \tDeviceStatus()\n-\t\t: shutter_speed(std::chrono::seconds(0)), frame_length(0),\n-\t\t analogue_gain(0.0)\n+\t\t: shutterSpeed(std::chrono::seconds(0)), frameLength(0),\n+\t\t analogueGain(0.0)\n \t{\n \t}\n \n \tfriend std::ostream &operator<<(std::ostream &out, const DeviceStatus &d);\n \n \t/* time shutter is open */\n-\tlibcamera::utils::Duration shutter_speed;\n+\tlibcamera::utils::Duration shutterSpeed;\n \t/* frame length given in number of lines */\n-\tuint32_t frame_length;\n-\tdouble analogue_gain;\n+\tuint32_t frameLength;\n+\tdouble analogueGain;\n \t/* 1.0/distance-in-metres, or 0 if unknown */\n-\tstd::optional<double> lens_position;\n+\tstd::optional<double> lensPosition;\n \t/* 1/f so that brightness quadruples when this doubles, or 0 if unknown */\n \tstd::optional<double> aperture;\n \t/* proportional to brightness with 0 = no flash, 1 = maximum flash */\n-\tstd::optional<double> flash_intensity;\n+\tstd::optional<double> flashIntensity;\n \t/* Sensor reported temperature value (in degrees) */\n-\tstd::optional<double> sensor_temperature;\n+\tstd::optional<double> sensorTemperature;\n };\n", "prefixes": [ "libcamera-devel", "05/15" ] }