From patchwork Mon Jul 25 13:46:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 16758 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 2A668C3275 for ; Mon, 25 Jul 2022 13:46:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C3E1063322; Mon, 25 Jul 2022 15:46:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658756813; bh=mdaRq5pwwxRmow8dsOA9Lpa4qgC5EL3ewLfduSNZnmA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=O/qW5J204wkZ7uwcez441J91mExVsnIFtJGCMNLVkwe/LtZcmhYsOEWxE6I1rEEOg AR+xVvndYoJe7fLDDVRVAxzuCo3FE0We+kYLEpgOipx4JCkKRVnAnFmonBFkVypBNE +LhMJePuWUjZ/9yUAzYQArJFShxBZix1qXdwGRRKdH1RWWCSgpveji/i8adGr1q7mq wEZls0UHt3Tbk2PGcg8BBpFu5CvcxiV6H/9R/1ZbRT2dpE3VGD5tfSkcyWRc5gqB2h LshJEkpum4GWm/l1NMw+Tv6E03sOI2VKyqMQz35b1XF/yIMA6qaFhZZSiOBPo5ICW1 uobsmZJbT1NuQ== Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 32E5E63312 for ; Mon, 25 Jul 2022 15:46:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="HehPTjuP"; dkim-atps=neutral Received: by mail-wr1-x436.google.com with SMTP id q18so5612104wrx.8 for ; Mon, 25 Jul 2022 06:46:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zyUxdXR3zpwCkd1DhRSIWcWB7l/iaA8Pv0AsZWOsUSo=; b=HehPTjuPxLM9N867p8pC4GDD/mQzRORyEna4QYYatsQHVLRaWq2he6T2Sj2yAN7uOm 0GU0GeBiFG42U7V4ZsOKRfP5061LNAPUQGMVmsgaWWNgULFMXe7vMSK0CV1HuyK1i1MR mx01Nia/3UNBnTAZLn6xJRnOE4RHFKB9W0KM5mnPdbvYUYMAi+bZB4Bdh2+nF2+nXiUK hgMl9D9EFcwXPI3Lkdw3NJYFkb61LeaYemHxLfcA8jlecIse5A/iKAV1bC14GheliUBH QVdtpsik13HpJgHSykKrrOM4ompoW/8mccbwXrPJQqmXKWGefxVjySrjWvMUgBj9eKqD OR7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zyUxdXR3zpwCkd1DhRSIWcWB7l/iaA8Pv0AsZWOsUSo=; b=LAKZh50yRHFndJsDw6fsV9s6KXvQwECE0Zt1bY1LI33Skj73+u8/cpe7B6htfmpxTp 1LPkh3A90TFMPPCQPSnuGxH6LPp5W03R/WOfbXyXu4umoKz9uqGhmhN/oEDr3I9pLUBi BA6S/WG3Q1lAcTK3YYkEd9T6OUA+y++gei0mqsJ701P07EldebhexXF/N7qI1k6MipAz wTUXc+Z1sVM4NFxqAHCI/zaYz9Hd/Mvxx7kicNanB+Fl3m1OFTlIRSOPQ91T11whNdhG 3SHVnHjr0svSpLajqx01IzTjQEFWBdkJvhVv6PyzYjBqh0MPdbbTn1OIiUIByW2yVseS Nj/g== X-Gm-Message-State: AJIora+FUo0b63X1bxX528M/L5X2dfIdARBE3UyWf79LGTSkAn4z4n6g auI7Co35IpZIId12eYM84J1D9+rbHGBE+A== X-Google-Smtp-Source: AGRyM1vH8VQw2c4qtRbTt7RKQOJBpp+Uw32vnGDY+uXwis1wvN52fzkiG5YxYe9ew+PEKjAzF8O0kQ== X-Received: by 2002:adf:f90c:0:b0:21e:5293:4390 with SMTP id b12-20020adff90c000000b0021e52934390mr7754950wrr.167.1658756807170; Mon, 25 Jul 2022 06:46:47 -0700 (PDT) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id a20-20020a05600c225400b003a32167b8d4sm18054320wmm.13.2022.07.25.06.46.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jul 2022 06:46:46 -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 Subject: [libcamera-devel] [PATCH 05/15] DNI: ipa: raspberrypi: Code refactoring to match style guidelines X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Refactor the source files under src/ipa/raspberrypi/controller/d* to match the recommended formatting guidelines for the libcamera project. The vast majority of changes in this commit comprise of switching from snake_case to CamelCase, and starting class member functions with a lower case character. Signed-off-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- .../controller/denoise_algorithm.hpp | 2 +- .../raspberrypi/controller/device_status.cpp | 18 +++++++++--------- src/ipa/raspberrypi/controller/device_status.h | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/ipa/raspberrypi/controller/denoise_algorithm.hpp b/src/ipa/raspberrypi/controller/denoise_algorithm.hpp index 39fcd7e94df2..48de542ac4f3 100644 --- a/src/ipa/raspberrypi/controller/denoise_algorithm.hpp +++ b/src/ipa/raspberrypi/controller/denoise_algorithm.hpp @@ -17,7 +17,7 @@ class DenoiseAlgorithm : public Algorithm public: DenoiseAlgorithm(Controller *controller) : Algorithm(controller) {} // A Denoise algorithm must provide the following: - virtual void SetMode(DenoiseMode mode) = 0; + virtual void setMode(DenoiseMode mode) = 0; }; } // namespace RPiController diff --git a/src/ipa/raspberrypi/controller/device_status.cpp b/src/ipa/raspberrypi/controller/device_status.cpp index a389c40dafed..f8ed77354a0a 100644 --- a/src/ipa/raspberrypi/controller/device_status.cpp +++ b/src/ipa/raspberrypi/controller/device_status.cpp @@ -10,21 +10,21 @@ using namespace libcamera; /* for the Duration operator<< overload */ std::ostream &operator<<(std::ostream &out, const DeviceStatus &d) { - out << "Exposure: " << d.shutter_speed - << " Frame length: " << d.frame_length - << " Gain: " << d.analogue_gain; + out << "Exposure: " << d.shutterSpeed + << " Frame length: " << d.frameLength + << " Gain: " << d.analogueGain; if (d.aperture) out << " Aperture: " << *d.aperture; - if (d.lens_position) - out << " Lens: " << *d.lens_position; + if (d.lensPosition) + out << " Lens: " << *d.lensPosition; - if (d.flash_intensity) - out << " Flash: " << *d.flash_intensity; + if (d.flashIntensity) + out << " Flash: " << *d.flashIntensity; - if (d.sensor_temperature) - out << " Temperature: " << *d.sensor_temperature; + if (d.sensorTemperature) + out << " Temperature: " << *d.sensorTemperature; return out; } diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h index b33f0d093ff3..ebcd7da2586b 100644 --- a/src/ipa/raspberrypi/controller/device_status.h +++ b/src/ipa/raspberrypi/controller/device_status.h @@ -18,24 +18,24 @@ struct DeviceStatus { DeviceStatus() - : shutter_speed(std::chrono::seconds(0)), frame_length(0), - analogue_gain(0.0) + : shutterSpeed(std::chrono::seconds(0)), frameLength(0), + analogueGain(0.0) { } friend std::ostream &operator<<(std::ostream &out, const DeviceStatus &d); /* time shutter is open */ - libcamera::utils::Duration shutter_speed; + libcamera::utils::Duration shutterSpeed; /* frame length given in number of lines */ - uint32_t frame_length; - double analogue_gain; + uint32_t frameLength; + double analogueGain; /* 1.0/distance-in-metres, or 0 if unknown */ - std::optional lens_position; + std::optional lensPosition; /* 1/f so that brightness quadruples when this doubles, or 0 if unknown */ std::optional aperture; /* proportional to brightness with 0 = no flash, 1 = maximum flash */ - std::optional flash_intensity; + std::optional flashIntensity; /* Sensor reported temperature value (in degrees) */ - std::optional sensor_temperature; + std::optional sensorTemperature; };