{"id":16778,"url":"https://patchwork.libcamera.org/api/patches/16778/?format=json","web_url":"https://patchwork.libcamera.org/patch/16778/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220726124549.1646-6-naush@raspberrypi.com>","date":"2022-07-26T12:45:37","name":"[libcamera-devel,05/17] DNI: ipa: raspberrypi: Code refactoring to match style guidelines","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"c141a4f251a997bd11f72fefefa2cd46612adf74","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16778/mbox/","series":[{"id":3325,"url":"https://patchwork.libcamera.org/api/series/3325/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3325","date":"2022-07-26T12:45:32","name":"Raspberry Pi IPA code refactor","version":1,"mbox":"https://patchwork.libcamera.org/series/3325/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16778/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16778/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 94885C3275\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Jul 2022 12:46:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3A09463326;\n\tTue, 26 Jul 2022 14:46:05 +0200 (CEST)","from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AF1A16330E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 14:46:00 +0200 (CEST)","by mail-wr1-x429.google.com with SMTP id m17so19703732wrw.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Jul 2022 05:46:00 -0700 (PDT)","from naush-laptop.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\ty17-20020adfd091000000b0021e87ec980bsm5948460wrh.84.2022.07.26.05.45.58\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 26 Jul 2022 05:45:59 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1658839565;\n\tbh=lDvGYPRcazwRmcermwVxjPDD0hNDFO5mFeGMMesCWpE=;\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=WvutWdAi4tF40s/eNb7e0U6zjHYZ68mLy8X3UW27wg2i7kfl0/2fv31R6Y0OkbvbA\n\tCvEqwY2vzrueRwnuxLEnJ8ALV17Rac6RVsOyd1QDaW+GnDvMYsUbs/Tnkj0nSSrQoi\n\ttVEn1R51bGk/UF1QUraOAmzd5ktuvAtFYXnz11KhNyLi4/a1cm41HWTpi7CX+3Egqd\n\tq3X+IZOe5l3WsEmdpktHKPAj0kzYbTr+Z4IV4bI0eRFJmvOeef+gNvfCULV5zwBuO3\n\tytdtqjHcokjZ53/lVzQ5wubma2q5KlXzUpYIUealk1nFP04Yb4SW3qU3BQEYJ52cor\n\tWhtJQ0eRWJ5HQ==","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=HyCZgSRw/lm8W2bEDr6DY60O+3rTN1NvLKjzS8uxivY=;\n\tb=a74xHkTgHhQspZrYfFX1qZSStWE/iIQ7k4BJNqNQdFsq45wJqbhn03rRLITq0UXtS6\n\tAaym9j+yGsj03ZI2LBJ0XOwXKOE4EkqRfTgtpya/KzEVVYepCKNQOm8/t5kDG4HsPTTH\n\t4hPguPGC4Vf1shdogSaOZUTdL7GAcHntSB5PamgcfXTwoFJkilYmB8iVUMuRnHlprxiV\n\t1MsZcGHUaCxjZ8BSNrv9FEK1nU81KkykSUVbhW2bJx1ffLm0zKmi7dl5YKIVHjeM8Lcd\n\tdQYhunJyk7T7lG/D7drUbyrm4YvodlFXNz7LpdwaYaWtUHiEjDAyv9DgIwM8pZof/M3B\n\tBaQg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"a74xHkTg\"; 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=HyCZgSRw/lm8W2bEDr6DY60O+3rTN1NvLKjzS8uxivY=;\n\tb=xL0EIi7bv4qir7C9IcXi6eygyBEar76dw/2U2WdEbswpqrgk4ZJkDramG3iEyxEng0\n\tDahOlr3SLjlMhJ9DFXrmPLqa7P/eqEZK/ax+0/6Z+ITqb094OdCwYGuFCc2WejYSplzN\n\tRE0FdvNsRtWMflp6yIxlBKVvLUmW7qRsFYjmI4WF9tYoMPi1FyPzYmd9sgUnB93BmZ6c\n\tP23ZpQdPG/TbkSAmECJX+m6I7L9RQNFaP+puJ9zcopcWojBjaklRGPSmhrY7ycs9EDmx\n\tOE8d2whwKELF8gJNZPwSRwg6DSjW8PbRY+pzDtktCq13BpzISAqI/QECGO01XpkgKorG\n\t1BEQ==","X-Gm-Message-State":"AJIora8WWcIlVKtkq7AOUyHLryc/9cs0JOc+bKaBP5x/2XjzGTBzxK7D\n\tLdR5ifEodOUYKZOxugQYJYpLLOb5vzm9pw==","X-Google-Smtp-Source":"AGRyM1vxetiW3qfJk31A79PuF1Ts4/7J7eUDBRp4mfVcl5jsPALbEXJFgxg4/gMltUQWIONufFhxZg==","X-Received":"by 2002:a5d:6d0a:0:b0:21d:6f28:5ead with SMTP id\n\te10-20020a5d6d0a000000b0021d6f285eadmr10611430wrq.95.1658839560009; \n\tTue, 26 Jul 2022 05:46:00 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Tue, 26 Jul 2022 13:45:37 +0100","Message-Id":"<20220726124549.1646-6-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.25.1","In-Reply-To":"<20220726124549.1646-1-naush@raspberrypi.com>","References":"<20220726124549.1646-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 05/17] 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>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n .../controller/denoise_algorithm.hpp           |  2 +-\n .../raspberrypi/controller/denoise_status.h    |  4 ++--\n .../raspberrypi/controller/device_status.cpp   | 18 +++++++++---------\n src/ipa/raspberrypi/controller/device_status.h | 16 ++++++++--------\n src/ipa/raspberrypi/controller/noise_status.h  |  4 ++--\n 5 files changed, 22 insertions(+), 22 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/denoise_status.h b/src/ipa/raspberrypi/controller/denoise_status.h\nindex 67a3c361387e..fe304d098253 100644\n--- a/src/ipa/raspberrypi/controller/denoise_status.h\n+++ b/src/ipa/raspberrypi/controller/denoise_status.h\n@@ -13,8 +13,8 @@ extern \"C\" {\n #endif\n \n struct DenoiseStatus {\n-\tdouble noise_constant;\n-\tdouble noise_slope;\n+\tdouble noiseConstant;\n+\tdouble noiseSlope;\n \tdouble strength;\n \tunsigned int mode;\n };\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 };\ndiff --git a/src/ipa/raspberrypi/controller/noise_status.h b/src/ipa/raspberrypi/controller/noise_status.h\nindex 8439a40213aa..358af4fe869b 100644\n--- a/src/ipa/raspberrypi/controller/noise_status.h\n+++ b/src/ipa/raspberrypi/controller/noise_status.h\n@@ -13,8 +13,8 @@ extern \"C\" {\n #endif\n \n struct NoiseStatus {\n-\tdouble noise_constant;\n-\tdouble noise_slope;\n+\tdouble noiseConstant;\n+\tdouble noiseSlope;\n };\n \n #ifdef __cplusplus\n","prefixes":["libcamera-devel","05/17"]}