diff options
author | Naushir Patuck <naush@raspberrypi.com> | 2022-10-06 14:17:37 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-10-18 03:09:44 +0300 |
commit | f9c490ab25f38dcaf62da27980dcd8e9f1e53897 (patch) | |
tree | bd37a36e377cbf693f56d2f04f1ae98ba969c321 /src/ipa/raspberrypi/cam_helper_imx519.cpp | |
parent | c513522f3f5b9e3cb091cf7dfd249376b4171bfe (diff) |
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>
Diffstat (limited to 'src/ipa/raspberrypi/cam_helper_imx519.cpp')
-rw-r--r-- | src/ipa/raspberrypi/cam_helper_imx519.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipa/raspberrypi/cam_helper_imx519.cpp b/src/ipa/raspberrypi/cam_helper_imx519.cpp index 54e104e7..2c120dad 100644 --- a/src/ipa/raspberrypi/cam_helper_imx519.cpp +++ b/src/ipa/raspberrypi/cam_helper_imx519.cpp @@ -144,9 +144,9 @@ uint32_t CamHelperImx519::getVBlanking(Duration &exposure, if (shift) { /* Account for any rounding in the scaled frame length value. */ frameLength <<= shift; - exposureLines = CamHelperImx519::exposureLines(exposure); + exposureLines = CamHelperImx519::exposureLines(exposure, mode_.minLineLength); exposureLines = std::min(exposureLines, frameLength - frameIntegrationDiff); - exposure = CamHelperImx519::exposure(exposureLines); + exposure = CamHelperImx519::exposure(exposureLines, mode_.minLineLength); } return frameLength - mode_.height; @@ -170,7 +170,8 @@ void CamHelperImx519::populateMetadata(const MdParser::RegisterMap ®isters, { DeviceStatus deviceStatus; - deviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg)); + deviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg), + mode_.minLineLength); deviceStatus.analogueGain = gain(registers.at(gainHiReg) * 256 + registers.at(gainLoReg)); deviceStatus.frameLength = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg); |