mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
libcamera: ipu3: Report sensor timestamp
Report the sensor's timestamp in the Request metadata by using the CIO2 buffer timestamp as an initial approximation. The buffer's timestamp is recorded at DMA-transfer time, and it does not theoretically matches the 'start of exposure' definition, but when used to compare two consecutive frames it gives an acceptable estimation of the sensor frame period duration. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
4f26020e66
commit
cb43c18040
1 changed files with 9 additions and 0 deletions
|
@ -1255,6 +1255,15 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)
|
|||
|
||||
Request *request = info->request;
|
||||
|
||||
/*
|
||||
* Record the sensor's timestamp in the request metadata.
|
||||
*
|
||||
* \todo The sensor timestamp should be better estimated by connecting
|
||||
* to the V4L2Device::frameStart signal.
|
||||
*/
|
||||
request->metadata().set(controls::SensorTimestamp,
|
||||
buffer->metadata().timestamp);
|
||||
|
||||
/* If the buffer is cancelled force a complete of the whole request. */
|
||||
if (buffer->metadata().status == FrameMetadata::FrameCancelled) {
|
||||
for (auto it : request->buffers()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue