mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 14:59:44 +03:00
libcamera: controls: Use nanoseconds units for FrameWallClock
Use nanoseconds for the FrameWallClock control to match the units for other timestamp controls, including SensorTimestamp. Update the RPi pipeline handlers to match the new nanoseconds units when converting from SensorTimestamp to FrameWallClock. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
a437212753
commit
29a88d85b7
3 changed files with 4 additions and 3 deletions
|
@ -1274,7 +1274,8 @@ controls:
|
|||
description: |
|
||||
This timestamp corresponds to the same moment in time as the
|
||||
SensorTimestamp, but is represented as a wall clock time as measured by
|
||||
the CLOCK_REALTIME clock.
|
||||
the CLOCK_REALTIME clock. Like SensorTimestamp, the timestamp value is
|
||||
expressed in nanoseconds.
|
||||
|
||||
Being a wall clock measurement, it can be used to synchronise timing
|
||||
across different devices.
|
||||
|
|
|
@ -1760,7 +1760,7 @@ void PiSPCameraData::cfeBufferDequeue(FrameBuffer *buffer)
|
|||
*/
|
||||
wallClockRecovery_.addSample();
|
||||
uint64_t sensorTimestamp = buffer->metadata().timestamp;
|
||||
uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp / 1000);
|
||||
uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp);
|
||||
|
||||
ctrl.set(controls::SensorTimestamp, sensorTimestamp);
|
||||
ctrl.set(controls::FrameWallClock, wallClockTimestamp);
|
||||
|
|
|
@ -778,7 +778,7 @@ void Vc4CameraData::unicamBufferDequeue(FrameBuffer *buffer)
|
|||
*/
|
||||
wallClockRecovery_.addSample();
|
||||
uint64_t sensorTimestamp = buffer->metadata().timestamp;
|
||||
uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp / 1000);
|
||||
uint64_t wallClockTimestamp = wallClockRecovery_.getOutput(sensorTimestamp);
|
||||
|
||||
ctrl.set(controls::SensorTimestamp, sensorTimestamp);
|
||||
ctrl.set(controls::FrameWallClock, wallClockTimestamp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue