[libcamera-devel] [PATCH v3 08/16] libcamera: rkisp1: Report sensor timestamp

Hirokazu Honda hiroh at chromium.org
Thu Apr 22 06:54:48 CEST 2021


Hi Jacopo, thank you for the patch.

On Thu, Apr 22, 2021 at 1:02 AM Jacopo Mondi <jacopo at jmondi.org> wrote:
>
> Report the sensor's timestamp in the Request metadata using the
> completed buffer timestamp.
>
> The buffer's timestamp is recorded at DMA-transfer time, and it does not
> theoretically matches the 'start of exposure' definition. Record this with
> a \todo entry.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index c3d390f775f2..da57624a2817 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -1067,6 +1067,15 @@ void PipelineHandlerRkISP1::bufferReady(FrameBuffer *buffer)
>  {
>         Request *request = buffer->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);
> +

Reviewed-by: Hirokazu Honda <hiroh at chromium.org>

>         completeBuffer(request, buffer);
>         tryCompleteRequest(request);
>  }
> --
> 2.31.1
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel


More information about the libcamera-devel mailing list