mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 00:45:07 +03:00
ipa: raspberrypi: Add frame_length to DeviceStatus
Store the frame length into the DeviceStatus struct. The value is extracted from embedded data when available, or calculated from the VBLANK value passed from DelayedControls otherwise. Update imx477 and imx219 CamHelper classes to extract the frame length from the embedded data buffer. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
f24d83720f
commit
2d6a9b3592
6 changed files with 19 additions and 4 deletions
|
@ -30,7 +30,10 @@ using namespace RPiController;
|
|||
constexpr uint32_t gainReg = 0x157;
|
||||
constexpr uint32_t expHiReg = 0x15a;
|
||||
constexpr uint32_t expLoReg = 0x15b;
|
||||
constexpr std::initializer_list<uint32_t> registerList [[maybe_unused]] = { expHiReg, expLoReg, gainReg };
|
||||
constexpr uint32_t frameLengthHiReg = 0x160;
|
||||
constexpr uint32_t frameLengthLoReg = 0x161;
|
||||
constexpr std::initializer_list<uint32_t> registerList [[maybe_unused]]
|
||||
= { expHiReg, expLoReg, gainReg, frameLengthHiReg, frameLengthLoReg };
|
||||
|
||||
class CamHelperImx219 : public CamHelper
|
||||
{
|
||||
|
@ -93,6 +96,7 @@ void CamHelperImx219::PopulateMetadata(const MdParser::RegisterMap ®isters,
|
|||
|
||||
deviceStatus.shutter_speed = Exposure(registers.at(expHiReg) * 256 + registers.at(expLoReg));
|
||||
deviceStatus.analogue_gain = Gain(registers.at(gainReg));
|
||||
deviceStatus.frame_length = registers.at(frameLengthHiReg) * 256 + registers.at(frameLengthLoReg);
|
||||
|
||||
metadata.Set("device.status", deviceStatus);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue