mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-24 09:05:06 +03:00
ipa: raspberrypi: Pass lineLength into the CamHelper API
Update CamHelper::exposureLines() and CamHelper::exposure() to take a line length duration parameter for use in the exposure calculations. For now, only use the minimum line length for all the calculations to match the existing IPA behavior. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Tested-by: Dave Stevenson <dave.stevenson@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
c513522f3f
commit
f9c490ab25
7 changed files with 30 additions and 23 deletions
|
@ -21,8 +21,8 @@ public:
|
|||
CamHelperImx296();
|
||||
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;
|
||||
uint32_t exposureLines(const Duration exposure, const Duration lineLength) const override;
|
||||
Duration exposure(uint32_t exposureLines, const Duration lineLength) const override;
|
||||
void getDelays(int &exposureDelay, int &gainDelay, int &vblankDelay) const override;
|
||||
|
||||
private:
|
||||
|
@ -53,12 +53,14 @@ double CamHelperImx296::gain(uint32_t gainCode) const
|
|||
return std::pow(10.0, gainCode / 200.0);
|
||||
}
|
||||
|
||||
uint32_t CamHelperImx296::exposureLines(Duration exposure) const
|
||||
uint32_t CamHelperImx296::exposureLines(const Duration exposure,
|
||||
[[maybe_unused]] const Duration lineLength) const
|
||||
{
|
||||
return std::max<uint32_t>(minExposureLines, (exposure - 14.26us) / timePerLine);
|
||||
}
|
||||
|
||||
Duration CamHelperImx296::exposure(uint32_t exposureLines) const
|
||||
Duration CamHelperImx296::exposure(uint32_t exposureLines,
|
||||
[[maybe_unused]] const Duration lineLength) const
|
||||
{
|
||||
return std::max<uint32_t>(minExposureLines, exposureLines) * timePerLine + 14.26us;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue