mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
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 <naush@raspberrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
b4a3eb6b98
commit
177df04d2b
63 changed files with 2093 additions and 2161 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue