From 177df04d2b7f357ebe41f1a9809ab68b6f948082 Mon Sep 17 00:00:00 2001 From: Naushir Patuck Date: Wed, 27 Jul 2022 09:55:17 +0100 Subject: ipa: raspberrypi: Code refactoring to match style guidelines Refactor all the source files in src/ipa/raspberrypi/ 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 Signed-off-by: Laurent Pinchart --- src/ipa/raspberrypi/cam_helper_ov5647.cpp | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/ipa/raspberrypi/cam_helper_ov5647.cpp') diff --git a/src/ipa/raspberrypi/cam_helper_ov5647.cpp b/src/ipa/raspberrypi/cam_helper_ov5647.cpp index 702c2d07..9dc3fc44 100644 --- a/src/ipa/raspberrypi/cam_helper_ov5647.cpp +++ b/src/ipa/raspberrypi/cam_helper_ov5647.cpp @@ -15,14 +15,14 @@ class CamHelperOv5647 : public CamHelper { public: CamHelperOv5647(); - uint32_t GainCode(double gain) const override; - double Gain(uint32_t gain_code) const override; - void GetDelays(int &exposure_delay, int &gain_delay, - int &vblank_delay) const override; - unsigned int HideFramesStartup() const override; - unsigned int HideFramesModeSwitch() const override; - unsigned int MistrustFramesStartup() const override; - unsigned int MistrustFramesModeSwitch() const override; + uint32_t gainCode(double gain) const override; + double gain(uint32_t gainCode) const override; + void getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay) const override; + unsigned int hideFramesStartup() const override; + unsigned int hideFramesModeSwitch() const override; + unsigned int mistrustFramesStartup() const override; + unsigned int mistrustFramesModeSwitch() const override; private: /* @@ -42,29 +42,29 @@ CamHelperOv5647::CamHelperOv5647() { } -uint32_t CamHelperOv5647::GainCode(double gain) const +uint32_t CamHelperOv5647::gainCode(double gain) const { return static_cast(gain * 16.0); } -double CamHelperOv5647::Gain(uint32_t gain_code) const +double CamHelperOv5647::gain(uint32_t gainCode) const { - return static_cast(gain_code) / 16.0; + return static_cast(gainCode) / 16.0; } -void CamHelperOv5647::GetDelays(int &exposure_delay, int &gain_delay, - int &vblank_delay) const +void CamHelperOv5647::getDelays(int &exposureDelay, int &gainDelay, + int &vblankDelay) const { /* * We run this sensor in a mode where the gain delay is bumped up to * 2. It seems to be the only way to make the delays "predictable". */ - exposure_delay = 2; - gain_delay = 2; - vblank_delay = 2; + exposureDelay = 2; + gainDelay = 2; + vblankDelay = 2; } -unsigned int CamHelperOv5647::HideFramesStartup() const +unsigned int CamHelperOv5647::hideFramesStartup() const { /* * On startup, we get a couple of under-exposed frames which @@ -73,7 +73,7 @@ unsigned int CamHelperOv5647::HideFramesStartup() const return 2; } -unsigned int CamHelperOv5647::HideFramesModeSwitch() const +unsigned int CamHelperOv5647::hideFramesModeSwitch() const { /* * After a mode switch, we get a couple of under-exposed frames which @@ -82,7 +82,7 @@ unsigned int CamHelperOv5647::HideFramesModeSwitch() const return 2; } -unsigned int CamHelperOv5647::MistrustFramesStartup() const +unsigned int CamHelperOv5647::mistrustFramesStartup() const { /* * First couple of frames are under-exposed and are no good for control @@ -91,7 +91,7 @@ unsigned int CamHelperOv5647::MistrustFramesStartup() const return 2; } -unsigned int CamHelperOv5647::MistrustFramesModeSwitch() const +unsigned int CamHelperOv5647::mistrustFramesModeSwitch() const { /* * First couple of frames are under-exposed even after a simple @@ -100,9 +100,9 @@ unsigned int CamHelperOv5647::MistrustFramesModeSwitch() const return 2; } -static CamHelper *Create() +static CamHelper *create() { return new CamHelperOv5647(); } -static RegisterCamHelper reg("ov5647", &Create); +static RegisterCamHelper reg("ov5647", &create); -- cgit v1.2.1