[{"id":16153,"web_url":"https://patchwork.libcamera.org/comment/16153/","msgid":"<CAO5uPHOZ-dymPfOJC2yiUBwUTEj=ovuPo4TWdcYmLAqXb5VbNw@mail.gmail.com>","date":"2021-04-08T09:12:06","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo, thanks for the patch.\n\nOn Thu, Apr 8, 2021 at 1:06 AM Jacopo Mondi <jacopo@jmondi.org> wrote:\n>\n> Destage the 'SensorTimestamp' control, which is used by pipeline\n> handlers to report the time when the first active line of the sensor's\n> pixel array is exposed.\n>\n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/control_ids.yaml | 21 ++++++++++++++-------\n>  1 file changed, 14 insertions(+), 7 deletions(-)\n>\n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index b4771f9def89..f025819aedfd 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -360,6 +360,20 @@ controls:\n>\n>        size: [2]\n>\n> +  - SensorTimestamp:\n> +      type: int64_t\n> +      description: |\n> +        The time when the first row of the image sensor active array is exposed,\n> +        The timestamp represents a monotonically increasing counter since the\n> +        system boot time expressed in nanoseconds.\n> +\n> +        Pipeline handlers set this control in a completed Request metadata to\n> +        allow application to compute the sensor's frame period duration by\n> +        comparing consecutive capture results.\n> +\n> +        \\todo Define how the sensor timestamp has to be used in the reprocessing\n> +        use case.\n> +\n>    # ----------------------------------------------------------------------------\n>    # Draft controls section\n>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n\n> @@ -547,13 +561,6 @@ controls:\n>            value: 3\n>            description: The AWB algorithm is locked.\n>\n> -  - SensorTimestamp:\n> -      type: int64_t\n> -      draft: true\n> -      description: |\n> -       Control to report the start of exposure of the first row of the captured\n> -       image. Currently identical to ANDROID_SENSOR_TIMESTAMP.\n> -\n>    - SensorRollingShutterSkew:\n>        type: int64_t\n>        draft: true\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 09143BD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Apr 2021 09:12:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEE1A687F2;\n\tThu,  8 Apr 2021 11:12:18 +0200 (CEST)","from mail-ed1-x529.google.com (mail-ed1-x529.google.com\n\t[IPv6:2a00:1450:4864:20::529])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id ECCCE687F2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Apr 2021 11:12:16 +0200 (CEST)","by mail-ed1-x529.google.com with SMTP id f8so1479945edd.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 08 Apr 2021 02:12:16 -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=\"DC7YPdQ+\"; 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; bh=lWx47mqQdnIvbUoPerGhPY3kw7v//8ONKvrNr+rfTJg=;\n\tb=DC7YPdQ+AJCMOudWMEISxb5904KPkI+YnvZ6z5cXmy756FYRj0LCT23xINf8d3npsb\n\tWVQZnZffaRlt6URfEBT6nGD30LnWYbcrUoX4AKLCHQPRIdUypYrJbIVl8YPsVtemS2Vf\n\t09ypSIrqD2a6jJrknRKAC3ojERrwLgTRyAPb0=","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;\n\tbh=lWx47mqQdnIvbUoPerGhPY3kw7v//8ONKvrNr+rfTJg=;\n\tb=anGPkHWmz7f6e3OFmH2QJ7hBXrEJkhoQqkkXko+14Pg/8if5B7fGogW+ev76avvXvr\n\t9lBXQRNAGnIcWfmWtntJp4WqU5Rq1mvBbUfkVDruG1Kf7z8MpYhKy/fr/eNFpcYrKkh2\n\tdMeWQUKojBQs7hbVtvIyyZJdw0Wa18J+ErQ9LEBzjkNhZcrCPslaxtCE0CXHD++nT70z\n\tlCF2LXVc3jpKFs7IbliSDQzCoTx0c3JMBWDlBs1pCA6r/Dvv+6fU9tDPS0qFEqCTNHWA\n\tPclFp6oAuSviTeWDRt8VgqbVx0aisnCGi/lmOAWH/nhLnnjz0voLXNNVnyqkkclJ0SDm\n\tp2KA==","X-Gm-Message-State":"AOAM5318Xdez/S+5DtA5Qtm6Saxl9B3pOdxIDzRkqPKv4AD64u+ocEEv\n\txA5ECaBhg2gnK2kP5nhOeLadr6QJblVQZQM/AIfGtCNtulg=","X-Google-Smtp-Source":"ABdhPJzH2Kb4+7OZe5AT9cO29BV5IdlGaSz1xQv1qc5SCyjO/qg+jsdJps2g3Bk11PqiinWul5Nt2mAOIIxnI9YeiLo=","X-Received":"by 2002:a05:6402:1bdc:: with SMTP id\n\tch28mr9849287edb.202.1617873136715; \n\tThu, 08 Apr 2021 02:12:16 -0700 (PDT)","MIME-Version":"1.0","References":"<20210407160644.58326-1-jacopo@jmondi.org>\n\t<20210407160644.58326-2-jacopo@jmondi.org>","In-Reply-To":"<20210407160644.58326-2-jacopo@jmondi.org>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Thu, 8 Apr 2021 18:12:06 +0900","Message-ID":"<CAO5uPHOZ-dymPfOJC2yiUBwUTEj=ovuPo4TWdcYmLAqXb5VbNw@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","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=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16162,"web_url":"https://patchwork.libcamera.org/comment/16162/","msgid":"<YHAb6R3/PaLNGGT+@oden.dyn.berto.se>","date":"2021-04-09T09:18:33","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","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-07 18:06:42 +0200, Jacopo Mondi wrote:\n> Destage the 'SensorTimestamp' control, which is used by pipeline\n> handlers to report the time when the first active line of the sensor's\n> pixel array is exposed.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/control_ids.yaml | 21 ++++++++++++++-------\n>  1 file changed, 14 insertions(+), 7 deletions(-)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index b4771f9def89..f025819aedfd 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -360,6 +360,20 @@ controls:\n>  \n>        size: [2]\n>  \n> +  - SensorTimestamp:\n> +      type: int64_t\n> +      description: |\n> +        The time when the first row of the image sensor active array is exposed,\n> +        The timestamp represents a monotonically increasing counter since the\n> +        system boot time expressed in nanoseconds.\n\nIs it wise to state that time time counter is increasing since system \nboot?  To me that reads as the counter would start at 0 at system boot \nand that I could calculate uptime from it. Even if this is true on some \nplatforms I'm sure there are others where it's not. How about,\n\n    A timestamp when the first row of the image sensor active array is \n    exposed. The timestamp represents a monotonically increasing counter \n    expressed in nanoseconds.\n\n> +\n> +        Pipeline handlers set this control in a completed Request metadata to\n> +        allow application to compute the sensor's frame period duration by\n> +        comparing consecutive capture results.\n> +\n> +        \\todo Define how the sensor timestamp has to be used in the reprocessing\n> +        use case.\n> +\n>    # ----------------------------------------------------------------------------\n>    # Draft controls section\n>  \n> @@ -547,13 +561,6 @@ controls:\n>            value: 3\n>            description: The AWB algorithm is locked.\n>  \n> -  - SensorTimestamp:\n> -      type: int64_t\n> -      draft: true\n> -      description: |\n> -       Control to report the start of exposure of the first row of the captured\n> -       image. Currently identical to ANDROID_SENSOR_TIMESTAMP.\n> -\n>    - SensorRollingShutterSkew:\n>        type: int64_t\n>        draft: true\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 38A4ABD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Apr 2021 09:18:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A7BD8687F8;\n\tFri,  9 Apr 2021 11:18:36 +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 0842F687D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Apr 2021 11:18:35 +0200 (CEST)","by mail-lj1-x22e.google.com with SMTP id a1so5655497ljp.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 09 Apr 2021 02:18:34 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tq12sm211092lfd.71.2021.04.09.02.18.33\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 09 Apr 2021 02:18:33 -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=\"0BjNSIvM\"; 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=aj8wYxn42nX5W+PEN7Yk4BTYTSOAoVy2UB90IzXK3Yw=;\n\tb=0BjNSIvMo/03DmRZbK+d0v7pwaniA1yjRtpKvU2eC2ZeLV+yYYgC8/qoMEZXenpCr7\n\t63dm62OqlJTZw/Gj9ItWI3H4axs6bgU/G4j/zYzkfBu0nzymhVnmnuSqtINE9DnYsJkC\n\tfVTpbw4Ls6aYlt6lKza1HtFtk4il2jyNSSzh/BR8QWzmm3t4CIhtOJ1lvhFpuoalv6QB\n\tLLycWYaVqVsjtfXPBNIliEBU8rik5xmnX4XUyrTucRbTGjI0bUzal1ddx745yc69Vhnz\n\tCyi5ZgdNhVcXcdO9Sr4vQ8BwP72gFhDUfFKjEeZSm28dpJC3/iW8qLH0nwotW29S+rEH\n\t+U9g==","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=aj8wYxn42nX5W+PEN7Yk4BTYTSOAoVy2UB90IzXK3Yw=;\n\tb=ceIsSSUKQFvi5dl6MQYPubfM9HO1RXrQOU5gaARaDKImgYrUfStnmdRKqH/GOauQt3\n\twLjLfi4Zo12D6qOep7LsUofxu5DScznv6XcWEiPogh1TywU0YG/tXd1UggEsAi++hJ9x\n\t4LHFAO/QXefgruxzZX3P1rNYrVuy0YH5VVREXJFPz90zt6RXcBfqWrJmjRn4fXzu06RZ\n\tjNw5IXHmZbmdAQasfAWjf/OYrqsA7+w6bKpQbeDtUxHDVALFEV3WtgvxdoXEt6WopHVi\n\tUVi0BWSdWREV8dBjDWxsUheJXwEjSZiykyHyRU+NoCr7LclAEUTCR6LGLtdR0ZZJTvDC\n\tlfRw==","X-Gm-Message-State":"AOAM5302y327A4RLURjX+CzMt2Sad7az4GguJnxaRZG6EyQt+E2L7bGi\n\t0Z9lGZY88zSqyaxqeyPrzz5eSR9dnbW0wA==","X-Google-Smtp-Source":"ABdhPJwIOZJ6sxz+R8nvJrbnF9hwfx5ErYgPrQv/JBBPiPnGMHLRPxrKFDetXaNk0FFcUb7zLdc94g==","X-Received":"by 2002:a2e:bc0a:: with SMTP id\n\tb10mr8810310ljf.231.1617959914353; \n\tFri, 09 Apr 2021 02:18:34 -0700 (PDT)","Date":"Fri, 9 Apr 2021 11:18:33 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YHAb6R3/PaLNGGT+@oden.dyn.berto.se>","References":"<20210407160644.58326-1-jacopo@jmondi.org>\n\t<20210407160644.58326-2-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210407160644.58326-2-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","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":16163,"web_url":"https://patchwork.libcamera.org/comment/16163/","msgid":"<20210409092255.mfynxklhtbrojvvw@uno.localdomain>","date":"2021-04-09T09:22:55","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Niklas,\n\nOn Fri, Apr 09, 2021 at 11:18:33AM +0200, Niklas Söderlund wrote:\n> Hi Jacopo,\n>\n> Thanks for your work.\n>\n> On 2021-04-07 18:06:42 +0200, Jacopo Mondi wrote:\n> > Destage the 'SensorTimestamp' control, which is used by pipeline\n> > handlers to report the time when the first active line of the sensor's\n> > pixel array is exposed.\n> >\n> > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > ---\n> >  src/libcamera/control_ids.yaml | 21 ++++++++++++++-------\n> >  1 file changed, 14 insertions(+), 7 deletions(-)\n> >\n> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > index b4771f9def89..f025819aedfd 100644\n> > --- a/src/libcamera/control_ids.yaml\n> > +++ b/src/libcamera/control_ids.yaml\n> > @@ -360,6 +360,20 @@ controls:\n> >\n> >        size: [2]\n> >\n> > +  - SensorTimestamp:\n> > +      type: int64_t\n> > +      description: |\n> > +        The time when the first row of the image sensor active array is exposed,\n> > +        The timestamp represents a monotonically increasing counter since the\n> > +        system boot time expressed in nanoseconds.\n>\n> Is it wise to state that time time counter is increasing since system\n> boot?  To me that reads as the counter would start at 0 at system boot\n> and that I could calculate uptime from it. Even if this is true on some\n\nIf anyone wants to use a frame timestamp to calculate the system\nuptime I think he deserves horrible bugs, but I see your point..\n\n\n> platforms I'm sure there are others where it's not. How about,\n>\n>     A timestamp when the first row of the image sensor active array is\n>     exposed. The timestamp represents a monotonically increasing counter\n>     expressed in nanoseconds.\n>\n\nI'll drop the \"system boot\" part\n\n> > +\n> > +        Pipeline handlers set this control in a completed Request metadata to\n> > +        allow application to compute the sensor's frame period duration by\n> > +        comparing consecutive capture results.\n> > +\n> > +        \\todo Define how the sensor timestamp has to be used in the reprocessing\n> > +        use case.\n> > +\n> >    # ----------------------------------------------------------------------------\n> >    # Draft controls section\n> >\n> > @@ -547,13 +561,6 @@ controls:\n> >            value: 3\n> >            description: The AWB algorithm is locked.\n> >\n> > -  - SensorTimestamp:\n> > -      type: int64_t\n> > -      draft: true\n> > -      description: |\n> > -       Control to report the start of exposure of the first row of the captured\n> > -       image. Currently identical to ANDROID_SENSOR_TIMESTAMP.\n> > -\n> >    - SensorRollingShutterSkew:\n> >        type: int64_t\n> >        draft: true\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","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 D9AC2BD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Apr 2021 09:22:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4B2B6687F8;\n\tFri,  9 Apr 2021 11:22:20 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C6620687D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Apr 2021 11:22:18 +0200 (CEST)","from uno.localdomain (93-34-118-233.ip49.fastwebnet.it\n\t[93.34.118.233]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 5710320000E;\n\tFri,  9 Apr 2021 09:22:17 +0000 (UTC)"],"Date":"Fri, 9 Apr 2021 11:22:55 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Niklas =?utf-8?q?S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","Message-ID":"<20210409092255.mfynxklhtbrojvvw@uno.localdomain>","References":"<20210407160644.58326-1-jacopo@jmondi.org>\n\t<20210407160644.58326-2-jacopo@jmondi.org>\n\t<YHAb6R3/PaLNGGT+@oden.dyn.berto.se>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<YHAb6R3/PaLNGGT+@oden.dyn.berto.se>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":16205,"web_url":"https://patchwork.libcamera.org/comment/16205/","msgid":"<YHUDm4Q+4BVeasqF@pendragon.ideasonboard.com>","date":"2021-04-13T02:36:11","subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Jacopo,\n\nNice to see controls become mature :-)\n\nOn Fri, Apr 09, 2021 at 11:22:55AM +0200, Jacopo Mondi wrote:\n> On Fri, Apr 09, 2021 at 11:18:33AM +0200, Niklas Söderlund wrote:\n> > On 2021-04-07 18:06:42 +0200, Jacopo Mondi wrote:\n> > > Destage the 'SensorTimestamp' control, which is used by pipeline\n> > > handlers to report the time when the first active line of the sensor's\n> > > pixel array is exposed.\n> > >\n> > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> > > ---\n> > >  src/libcamera/control_ids.yaml | 21 ++++++++++++++-------\n> > >  1 file changed, 14 insertions(+), 7 deletions(-)\n> > >\n> > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> > > index b4771f9def89..f025819aedfd 100644\n> > > --- a/src/libcamera/control_ids.yaml\n> > > +++ b/src/libcamera/control_ids.yaml\n> > > @@ -360,6 +360,20 @@ controls:\n> > >\n> > >        size: [2]\n> > >\n> > > +  - SensorTimestamp:\n> > > +      type: int64_t\n> > > +      description: |\n> > > +        The time when the first row of the image sensor active array is exposed,\n\ns/exposed,/exposed./\n\n> > > +        The timestamp represents a monotonically increasing counter since the\n> > > +        system boot time expressed in nanoseconds.\n> >\n> > Is it wise to state that time time counter is increasing since system\n> > boot?  To me that reads as the counter would start at 0 at system boot\n> > and that I could calculate uptime from it. Even if this is true on some\n> \n> If anyone wants to use a frame timestamp to calculate the system\n> uptime I think he deserves horrible bugs, but I see your point..\n> \n> > platforms I'm sure there are others where it's not. How about,\n> >\n> >     A timestamp when the first row of the image sensor active array is\n> >     exposed. The timestamp represents a monotonically increasing counter\n> >     expressed in nanoseconds.\n> \n> I'll drop the \"system boot\" part\n\nI think it's important to define which clock the timestamp relates to.\nThe only two options that seem to make sense are CLOCK_MONOTONIC and\nCLOCK_BOOTTIME. If we were to pick a single one, I'd pick the latter.\n\n> > > +\n> > > +        Pipeline handlers set this control in a completed Request metadata to\n> > > +        allow application to compute the sensor's frame period duration by\n> > > +        comparing consecutive capture results.\n\nI'd simply state \"The SensorTimestamp control can only be returned in\nmetadata.\" to match other controls. What applications will do with the\ntimestamps is up to them.\n\n> > > +\n> > > +        \\todo Define how the sensor timestamp has to be used in the reprocessing\n> > > +        use case.\n> > > +\n> > >    # ----------------------------------------------------------------------------\n> > >    # Draft controls section\n> > >\n> > > @@ -547,13 +561,6 @@ controls:\n> > >            value: 3\n> > >            description: The AWB algorithm is locked.\n> > >\n> > > -  - SensorTimestamp:\n> > > -      type: int64_t\n> > > -      draft: true\n> > > -      description: |\n> > > -       Control to report the start of exposure of the first row of the captured\n> > > -       image. Currently identical to ANDROID_SENSOR_TIMESTAMP.\n> > > -\n> > >    - SensorRollingShutterSkew:\n> > >        type: int64_t\n> > >        draft: true","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 404F1BD1F6\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Apr 2021 02:37:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AD98168800;\n\tTue, 13 Apr 2021 04:37:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6642C687EC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Apr 2021 04:37:01 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D0AC26F2;\n\tTue, 13 Apr 2021 04:37:00 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"i0IYJVLc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1618281421;\n\tbh=okD0JYvG5T07qiM6bWDWtYA9+ptCiXVtGAtwSKRxZWg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=i0IYJVLcG7WRBxqa9yUK7+dtSmZFox5tGfl8j2scbRjwu9hc5CwekcYD5UGPHY2Po\n\tpMKEsgt7veh3Rfxkt5R45rJ5GMDzVbNoNB/4l+IX96jeFW1YAwqCQimTqYq3TALGM8\n\tihpQuJ/e8al5XAAAuFlh5r9el4b2naxZ+l110iNY=","Date":"Tue, 13 Apr 2021 05:36:11 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<YHUDm4Q+4BVeasqF@pendragon.ideasonboard.com>","References":"<20210407160644.58326-1-jacopo@jmondi.org>\n\t<20210407160644.58326-2-jacopo@jmondi.org>\n\t<YHAb6R3/PaLNGGT+@oden.dyn.berto.se>\n\t<20210409092255.mfynxklhtbrojvvw@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210409092255.mfynxklhtbrojvvw@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH 1/3] libcamera: controls: Destage\n\t'SensorTimestamp'","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=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]