diff options
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper_imx219.cpp')
-rw-r--r-- | src/ipa/raspberrypi/cam_helper_imx219.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ipa/raspberrypi/cam_helper_imx219.cpp b/src/ipa/raspberrypi/cam_helper_imx219.cpp index a3caab71..17c35143 100644 --- a/src/ipa/raspberrypi/cam_helper_imx219.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx219.cpp @@ -39,10 +39,10 @@ class CamHelperImx219 : public CamHelper { public: CamHelperImx219(); - uint32_t GainCode(double gain) const override; - double Gain(uint32_t gain_code) const override; - unsigned int MistrustFramesModeSwitch() const override; - bool SensorEmbeddedDataPresent() const override; + uint32_t gainCode(double gain) const override; + double gain(uint32_t gainCode) const override; + unsigned int mistrustFramesModeSwitch() const override; + bool sensorEmbeddedDataPresent() const override; private: /* @@ -51,7 +51,7 @@ private: */ static constexpr int frameIntegrationDiff = 4; - void PopulateMetadata(const MdParser::RegisterMap ®isters, + void populateMetadata(const MdParser::RegisterMap ®isters, Metadata &metadata) const override; }; @@ -64,17 +64,17 @@ CamHelperImx219::CamHelperImx219() { } -uint32_t CamHelperImx219::GainCode(double gain) const +uint32_t CamHelperImx219::gainCode(double gain) const { return (uint32_t)(256 - 256 / gain); } -double CamHelperImx219::Gain(uint32_t gain_code) const +double CamHelperImx219::gain(uint32_t gainCode) const { - return 256.0 / (256 - gain_code); + return 256.0 / (256 - gainCode); } -unsigned int CamHelperImx219::MistrustFramesModeSwitch() const +unsigned int CamHelperImx219::mistrustFramesModeSwitch() const { /* * For reasons unknown, we do occasionally get a bogus metadata frame @@ -84,26 +84,26 @@ unsigned int CamHelperImx219::MistrustFramesModeSwitch() const return 1; } -bool CamHelperImx219::SensorEmbeddedDataPresent() const +bool CamHelperImx219::sensorEmbeddedDataPresent() const { return ENABLE_EMBEDDED_DATA; } -void CamHelperImx219::PopulateMetadata(const MdParser::RegisterMap ®isters, +void CamHelperImx219::populateMetadata(const MdParser::RegisterMap ®isters, Metadata &metadata) const { DeviceStatus deviceStatus; - deviceStatus.shutter_speed = Exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg)); - deviceStatus.analogue_gain = Gain(registers.at(gainReg)); - deviceStatus.frame_length = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg); + deviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg)); + deviceStatus.analogueGain = gain(registers.at(gainReg)); + deviceStatus.frameLength = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg); - metadata.Set("device.status", deviceStatus); + metadata.set("device.status", deviceStatus); } -static CamHelper *Create() +static CamHelper *create() { return new CamHelperImx219(); } -static RegisterCamHelper reg("imx219", &Create); +static RegisterCamHelper reg("imx219", &create); |