[{"id":16466,"web_url":"https://patchwork.libcamera.org/comment/16466/","msgid":"<YIBx28psl6RzeSzH@oden.dyn.berto.se>","date":"2021-04-21T18:41:31","subject":"Re: [libcamera-devel] [PATCH v3 10/16] libcamera: vimc: Report\n\tsensor timestamp","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for your work.\n\nOn 2021-04-21 18:03:13 +0200, Jacopo Mondi wrote:\n> Report the sensor's timestamp in the Request metadata using the\n> completed buffer timestamp.\n> \n> The buffer's timestamp reports the video capture buffer processing time,\n> and it does not theoretically matches the 'start of exposure'\n> definition.\n> \n> VIMC being a testing platform and the test driver completes the buffers\n> for each media entity connected in the pipeline one after the other, the\n> current solution is acceptable for the pipeline.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/pipeline/vimc/vimc.cpp | 4 ++++\n>  1 file changed, 4 insertions(+)\n> \n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 8f5f4ba30953..ce83dcaab8ea 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -523,6 +523,10 @@ void VimcCameraData::bufferReady(FrameBuffer *buffer)\n>  {\n>  \tRequest *request = buffer->request();\n>  \n> +\t/* Record the sensor's timestamp in the request metadata. */\n> +\trequest->metadata().set(controls::SensorTimestamp,\n> +\t\t\t\tbuffer->metadata().timestamp);\n> +\n>  \tpipe_->completeBuffer(request, buffer);\n>  \tpipe_->completeRequest(request);\n>  }\n> -- \n> 2.31.1\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id CA778BDB17\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Apr 2021 18:41:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 880976884B;\n\tWed, 21 Apr 2021 20:41:34 +0200 (CEST)","from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com\n\t[IPv6:2a00:1450:4864:20::22e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 07B8568840\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Apr 2021 20:41:33 +0200 (CEST)","by mail-lj1-x22e.google.com with SMTP id a25so35579705ljm.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Apr 2021 11:41:33 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tm27sm34980lfo.254.2021.04.21.11.41.31\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 21 Apr 2021 11:41:32 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"uZ2q/K9i\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=MQDIIjLjCHpyOY2VjaLCvnx5kYFMhBd4d71Gw3XjUFQ=;\n\tb=uZ2q/K9ijD6eZYW4JmAv8b8z7dOO0HpyFywCystrqBEblmK4I0YAk+QFu0NNwdtKcv\n\tS/TiVaz9Y7bn/QG61J/X9nWxO6qiWYI6CrgSQGBlNTJtLWuy8EWhIbKwwg4cpfWijk4B\n\tatwazrWNTToA7bm8NNyQ70kPJ/6lCqEYkZM2A3OJsHysE1G0J8bIGI1bz4YxKcaNzS7a\n\tO3OsE/KfQaoutihOkyOvcMMTyLj9tOSvJFyQEMjwjqzq06CtxXthibT/n+IL7B0A/1a6\n\t32DjB0IulAavyl21HYuw23w8lsbNt1FDrl2eakFF5PR8K+Gph3xf7UImZse7qW4hbzVb\n\tG74g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=MQDIIjLjCHpyOY2VjaLCvnx5kYFMhBd4d71Gw3XjUFQ=;\n\tb=ZA/8Yc3ZG/R2JFOvMdH6l52pwVGSfgmwX6NrZMltfkqCjZHwwZWVEiisrT4jheMjrW\n\tamkEibmgmm3yQFHUSQmVDNksOpsCdG+rt5KYXFgsM1WMH9AzmpvMxGJY/ERP1aHg01tT\n\t0PGjzDWfrHEdiEyvOvErURxR/C4JVH3l0swzrOQymAZpKFd+rjAG/eVN3OpQG2GsDKH5\n\tdN7qqi6SLTvxclRkLMjZB6VkdAdQi0ZlRKRpDPQZ9ZacfoFAGSOfSCejYVBeon/TzVII\n\tab1EDVhRK1u6V53htCTQmJsj0Fr6gqyaBDeEiME27bq2fXBmcpJpsjXR3rcDXxda4XuU\n\tTk8w==","X-Gm-Message-State":"AOAM530PnY6pZdBouunRTIBzt+ryrRRMgpWIwwDYPOgZD5XD7HvbokNJ\n\tEAULxQBH000g6l5PeuOgo3yq6W8OTL9FKltO","X-Google-Smtp-Source":"ABdhPJwjrBNLbwEPx6gRU8FQWa4LuUuGI+Yr/qv01FhqbEE+WkTXoV88zatrcF1Z2i0HRSuM/1kdsg==","X-Received":"by 2002:a2e:b88d:: with SMTP id\n\tr13mr19715155ljp.479.1619030492549; \n\tWed, 21 Apr 2021 11:41:32 -0700 (PDT)","Date":"Wed, 21 Apr 2021 20:41:31 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YIBx28psl6RzeSzH@oden.dyn.berto.se>","References":"<20210421160319.42251-1-jacopo@jmondi.org>\n\t<20210421160319.42251-11-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210421160319.42251-11-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH v3 10/16] libcamera: vimc: Report\n\tsensor timestamp","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16483,"web_url":"https://patchwork.libcamera.org/comment/16483/","msgid":"<CAO5uPHN9WvzVQJm3xZLj14mOK7v66-TmUOjLib2kmbzBQzS7Ew@mail.gmail.com>","date":"2021-04-22T05:00:24","subject":"Re: [libcamera-devel] [PATCH v3 10/16] libcamera: vimc: Report\n\tsensor timestamp","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo, thank you for the patch.\n\nOn Thu, Apr 22, 2021 at 3:41 AM Niklas Söderlund\n<niklas.soderlund@ragnatech.se> wrote:\n>\n> Hi Jacopo,\n>\n> Thanks for your work.\n>\n> On 2021-04-21 18:03:13 +0200, Jacopo Mondi wrote:\n> > Report the sensor's timestamp in the Request metadata using the\n> > completed buffer timestamp.\n> >\n> > The buffer's timestamp reports the video capture buffer processing time,\n> > and it does not theoretically matches the 'start of exposure'\n> > definition.\n> >\n> > VIMC being a testing platform and the test driver completes the buffers\n> > for each media entity connected in the pipeline one after the other, the\n> > current solution is acceptable for the pipeline.\n> >\n> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n>\n> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> > ---\n> >  src/libcamera/pipeline/vimc/vimc.cpp | 4 ++++\n> >  1 file changed, 4 insertions(+)\n> >\n> > diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> > index 8f5f4ba30953..ce83dcaab8ea 100644\n> > --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> > +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> > @@ -523,6 +523,10 @@ void VimcCameraData::bufferReady(FrameBuffer *buffer)\n> >  {\n> >       Request *request = buffer->request();\n> >\n> > +     /* Record the sensor's timestamp in the request metadata. */\n> > +     request->metadata().set(controls::SensorTimestamp,\n> > +                             buffer->metadata().timestamp);\n> > +\n> >       pipe_->completeBuffer(request, buffer);\n> >       pipe_->completeRequest(request);\n> >  }\n> > --\n> > 2.31.1\n> >\n> > _______________________________________________\n> > libcamera-devel mailing list\n> > libcamera-devel@lists.libcamera.org\n> > https://lists.libcamera.org/listinfo/libcamera-devel\n>\n> --\n> Regards,\n> Niklas Söderlund\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 19C46BDB15\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 22 Apr 2021 05:00:36 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA84B68857;\n\tThu, 22 Apr 2021 07:00:35 +0200 (CEST)","from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com\n\t[IPv6:2a00:1450:4864:20::62f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 01B076884B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Apr 2021 07:00:35 +0200 (CEST)","by mail-ej1-x62f.google.com with SMTP id mh2so45224785ejb.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Apr 2021 22:00:34 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"H2qsuwJJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=ACOYOgGm/YAH3TGblXsglSJOAfAFutiN2YfVnD828FY=;\n\tb=H2qsuwJJt+NYwrGMj+Jih+lm0M1AjuYP8y8Lv3IntFEFp+RqDRvgXixokAyhKAMOV4\n\tMNFlvrXbckgGiEXlI1yFfNEJ4dCC2D1RBVc+A0LZamVayZQ7OwcFMVF5vP+gSQ5kN9ur\n\tS5vCUvLd3n7Ji+wCCy3HQzLJzlZgSxhkxM3s8=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=ACOYOgGm/YAH3TGblXsglSJOAfAFutiN2YfVnD828FY=;\n\tb=rb1MOG8WiWTSRSFFFPgzPn3toTpFzOMOdtff/42br02+dDTa9/1wFoQg7l/zm96He+\n\t89vThN5/GBRc1WtBBVDpUEmKyKAXgqwL6bUQlzfAuDERwgOWXb4dGO6liPVajij7LtUw\n\t4GCrpIBgtMkyq14l3dEpWiTUqFUMF8n2A8jD1ok5ep3R3MQfQ6dLkLYYgJhgByRDB20C\n\tuycZAF3nciU6HMTDtFzrlDAJkluOqSfIC9ctHtmMgnp8LJzyHhLlGcKETa6GD9w7CxZ/\n\tF5oQMf9zui1uwp76rQGoZTj9fJN+Yxm+bu8YYN4z5ax1z7UFz7TBcqV3c/0deNbgHkF4\n\t3iEw==","X-Gm-Message-State":"AOAM533rGWaYuSidapsMNG5NBA3g5IK4b0zRS5KSFESdpPQR2USp0qhg\n\t+4jXlsWdPNW+5irwkYNK9B6/WhxlLmlS9bJQOz9vaw==","X-Google-Smtp-Source":"ABdhPJyeeZGnIrtXuCy52Yq5bM/wdSA2LZBMmxs7lYxsjn/JDwF+4hgY64gTJw/xCuOlOrjjlBKi0vOeE6qNh2UMVKw=","X-Received":"by 2002:a17:906:b890:: with SMTP id\n\thb16mr1333505ejb.221.1619067634753; \n\tWed, 21 Apr 2021 22:00:34 -0700 (PDT)","MIME-Version":"1.0","References":"<20210421160319.42251-1-jacopo@jmondi.org>\n\t<20210421160319.42251-11-jacopo@jmondi.org>\n\t<YIBx28psl6RzeSzH@oden.dyn.berto.se>","In-Reply-To":"<YIBx28psl6RzeSzH@oden.dyn.berto.se>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Thu, 22 Apr 2021 14:00:24 +0900","Message-ID":"<CAO5uPHN9WvzVQJm3xZLj14mOK7v66-TmUOjLib2kmbzBQzS7Ew@mail.gmail.com>","To":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Subject":"Re: [libcamera-devel] [PATCH v3 10/16] libcamera: vimc: Report\n\tsensor timestamp","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]