summaryrefslogtreecommitdiff
path: root/src/qcam/assets/feathericons/cloud-snow.svg
blob: e4eb82074da72f690c3ca1d57e521e1dabda2b70 (plain)
1
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-cloud-snow"><path d="M20 17.58A5 5 0 0 0 18 8h-1.26A8 8 0 1 0 4 16.25"></path><line x1="8" y1="16" x2="8.01" y2="16"></line><line x1="8" y1="20" x2="8.01" y2="20"></line><line x1="12" y1="18" x2="12.01" y2="18"></line><line x1="12" y1="22" x2="12.01" y2="22"></line><line x1="16" y1="16" x2="16.01" y2="16"></line><line x1="16" y1="20" x2="16.01" y2="20"></line></svg>
lass="hl kwc">libcamera::utils::Duration; using namespace std::literals::chrono_literals; 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; private: static constexpr uint32_t maxGainCode = 239; static constexpr Duration timePerLine = 550.0 / 37.125e6 * 1.0s; /* * Smallest difference between the frame length and integration time, * in units of lines. */ static constexpr int frameIntegrationDiff = 4; }; CamHelperImx296::CamHelperImx296() : CamHelper(nullptr, frameIntegrationDiff) { } 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 { return std::pow(10.0, gain_code / 200.0); } uint32_t CamHelperImx296::ExposureLines(Duration exposure) const { return (exposure - 14.26us) / timePerLine; } Duration CamHelperImx296::Exposure(uint32_t exposure_lines) const { return exposure_lines * timePerLine + 14.26us; } static CamHelper *Create() { return new CamHelperImx296(); } static RegisterCamHelper reg("imx296", &Create);