mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-25 17:45:06 +03:00
ipa: raspberrypi: Limit minimum exposure time for the IMX296
Limit the minimum allowable exposure time to a single line in the IMX296 camera helper. This equates to approximately 30us. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
d476f5e4e2
commit
e730867873
1 changed files with 3 additions and 2 deletions
|
@ -26,6 +26,7 @@ public:
|
||||||
void getDelays(int &exposureDelay, int &gainDelay, int &vblankDelay) const override;
|
void getDelays(int &exposureDelay, int &gainDelay, int &vblankDelay) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
static constexpr uint32_t minExposureLines = 1;
|
||||||
static constexpr uint32_t maxGainCode = 239;
|
static constexpr uint32_t maxGainCode = 239;
|
||||||
static constexpr Duration timePerLine = 550.0 / 37.125e6 * 1.0s;
|
static constexpr Duration timePerLine = 550.0 / 37.125e6 * 1.0s;
|
||||||
|
|
||||||
|
@ -54,12 +55,12 @@ double CamHelperImx296::gain(uint32_t gainCode) const
|
||||||
|
|
||||||
uint32_t CamHelperImx296::exposureLines(Duration exposure) const
|
uint32_t CamHelperImx296::exposureLines(Duration exposure) const
|
||||||
{
|
{
|
||||||
return (exposure - 14.26us) / timePerLine;
|
return std::max<uint32_t>(minExposureLines, (exposure - 14.26us) / timePerLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
Duration CamHelperImx296::exposure(uint32_t exposureLines) const
|
Duration CamHelperImx296::exposure(uint32_t exposureLines) const
|
||||||
{
|
{
|
||||||
return exposureLines * timePerLine + 14.26us;
|
return std::max<uint32_t>(minExposureLines, exposureLines) * timePerLine + 14.26us;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CamHelperImx296::getDelays(int &exposureDelay, int &gainDelay,
|
void CamHelperImx296::getDelays(int &exposureDelay, int &gainDelay,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue