[libcamera-devel] [PATCH 07/13] libcamera: vimc: Report sensor timestamp
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Apr 20 23:50:32 CEST 2021
Hi Jacopo,
Thank you for the patch.
On Mon, Apr 19, 2021 at 03:14:27PM +0200, Jacopo Mondi wrote:
> Report the sensor's timestamp in the Request metadata using the
> completed buffer timestamp.
>
> The buffer's timestamp reports the video capture buffer processing time,
> and it does not theoretically matches the 'start of exposure'
> definition.
>
> Being VIMC a testing platform and the test driver completes the buffers
s/Being VIMC/VIMC being/
> for each media entity connected in the pipeline one after the other, the
> current solution is acceptable for the pipeline.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> src/libcamera/pipeline/vimc/vimc.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
> index 8f5f4ba30953..ce83dcaab8ea 100644
> --- a/src/libcamera/pipeline/vimc/vimc.cpp
> +++ b/src/libcamera/pipeline/vimc/vimc.cpp
> @@ -523,6 +523,10 @@ void VimcCameraData::bufferReady(FrameBuffer *buffer)
> {
> Request *request = buffer->request();
>
> + /* Record the sensor's timestamp in the request metadata. */
> + request->metadata().set(controls::SensorTimestamp,
> + buffer->metadata().timestamp);
> +
> pipe_->completeBuffer(request, buffer);
> pipe_->completeRequest(request);
> }
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list