libcamera: raspberry: Report sensor timestamp
Report the sensor's timestamp in the Request metadata by using the Unicam::Image 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: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
parent
131b209693
commit
fcfb1dc02a
1 changed files with 12 additions and 0 deletions
|
@ -1409,6 +1409,18 @@ void RPiCameraData::unicamBufferDequeue(FrameBuffer *buffer)
|
|||
<< ", timestamp: " << buffer->metadata().timestamp;
|
||||
|
||||
if (stream == &unicam_[Unicam::Image]) {
|
||||
/*
|
||||
* Record the sensor timestamp in the Request.
|
||||
*
|
||||
* \todo Do not assume the request in the front of the queue
|
||||
* is the correct one
|
||||
*/
|
||||
Request *request = requestQueue_.front();
|
||||
ASSERT(request);
|
||||
|
||||
request->metadata().set(controls::SensorTimestamp,
|
||||
buffer->metadata().timestamp);
|
||||
|
||||
/*
|
||||
* Lookup the sensor controls used for this frame sequence from
|
||||
* DelayedControl and queue them along with the frame buffer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue