diff options
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper_imx296.cpp')
-rw-r--r-- | src/ipa/raspberrypi/cam_helper_imx296.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/ipa/raspberrypi/cam_helper_imx296.cpp b/src/ipa/raspberrypi/cam_helper_imx296.cpp index a1a771cb..15674335 100644 --- a/src/ipa/raspberrypi/cam_helper_imx296.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx296.cpp @@ -19,10 +19,10 @@ class CamHelperImx296 : public CamHelper { public: CamHelperImx296(); - uint32_t GainCode(double gain) const override; - double Gain(uint32_t gain_code) const override; - uint32_t ExposureLines(Duration exposure) const override; - Duration Exposure(uint32_t exposure_lines) const override; + uint32_t gainCode(double gain) const override; + double gain(uint32_t gainCode) const override; + uint32_t exposureLines(Duration exposure) const override; + Duration exposure(uint32_t exposureLines) const override; private: static constexpr uint32_t maxGainCode = 239; @@ -40,30 +40,30 @@ CamHelperImx296::CamHelperImx296() { } -uint32_t CamHelperImx296::GainCode(double gain) const +uint32_t CamHelperImx296::gainCode(double gain) const { uint32_t code = 20 * std::log10(gain) * 10; return std::min(code, maxGainCode); } -double CamHelperImx296::Gain(uint32_t gain_code) const +double CamHelperImx296::gain(uint32_t gainCode) const { - return std::pow(10.0, gain_code / 200.0); + return std::pow(10.0, gainCode / 200.0); } -uint32_t CamHelperImx296::ExposureLines(Duration exposure) const +uint32_t CamHelperImx296::exposureLines(Duration exposure) const { return (exposure - 14.26us) / timePerLine; } -Duration CamHelperImx296::Exposure(uint32_t exposure_lines) const +Duration CamHelperImx296::exposure(uint32_t exposureLines) const { - return exposure_lines * timePerLine + 14.26us; + return exposureLines * timePerLine + 14.26us; } -static CamHelper *Create() +static CamHelper *create() { return new CamHelperImx296(); } -static RegisterCamHelper reg("imx296", &Create); +static RegisterCamHelper reg("imx296", &create); |