summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/cam_helper_imx519.cpp
diff options
context:
space:
mode:
authorNaushir Patuck <naush@raspberrypi.com>2022-10-06 14:17:44 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-18 03:10:13 +0300
commiteb02e62e6f4bff332dcdee504171596563e7b85f (patch)
treee1c3966b9fc5d041e3e51a0f693573c79f46c9c2 /src/ipa/raspberrypi/cam_helper_imx519.cpp
parentcb4c5f3e44d41b646c6c7b74689af6d9584e62fa (diff)
ipa: raspberrypi: Extract line length from the embedded data parser
Update the imx219, imx477 and imx519 parsers to extract the line length values from the embedded data stream and use these values in the deviceStatus metadata, replacing the DelayedControls provided values. 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.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ipa/raspberrypi/cam_helper_imx519.cpp b/src/ipa/raspberrypi/cam_helper_imx519.cpp
index d2eb1719..c7262aa0 100644
--- a/src/ipa/raspberrypi/cam_helper_imx519.cpp
+++ b/src/ipa/raspberrypi/cam_helper_imx519.cpp
@@ -36,8 +36,11 @@ constexpr uint32_t gainHiReg = 0x0204;
constexpr uint32_t gainLoReg = 0x0205;
constexpr uint32_t frameLengthHiReg = 0x0340;
constexpr uint32_t frameLengthLoReg = 0x0341;
+constexpr uint32_t lineLengthHiReg = 0x0342;
+constexpr uint32_t lineLengthLoReg = 0x0343;
constexpr std::initializer_list<uint32_t> registerList =
- { expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg };
+ { expHiReg, expLoReg, gainHiReg, gainLoReg, frameLengthHiReg, frameLengthLoReg,
+ lineLengthHiReg, lineLengthLoReg };
class CamHelperImx519 : public CamHelper
{
@@ -175,8 +178,10 @@ void CamHelperImx519::populateMetadata(const MdParser::RegisterMap &registers,
{
DeviceStatus deviceStatus;
+ deviceStatus.lineLength = lineLengthPckToDuration(registers.at(lineLengthHiReg) * 256 +
+ registers.at(lineLengthLoReg));
deviceStatus.shutterSpeed = exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg),
- mode_.minLineLength);
+ deviceStatus.lineLength);
deviceStatus.analogueGain = gain(registers.at(gainHiReg) * 256 + registers.at(gainLoReg));
deviceStatus.frameLength = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);