[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230316030851.GD1927922@google.com>
Date: Thu, 16 Mar 2023 12:08:51 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Ricardo Ribalda <ribalda@...omium.org>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
linux-kernel@...r.kernel.org, "hn.chen" <hn.chen@...plusit.com>,
linux-media@...r.kernel.org
Subject: Re: [PATCH v9 4/6] media: uvcvideo: Allow hw clock updates with
buffers not full
On (23/03/15 14:30), Ricardo Ribalda wrote:
> With UVC 1.5 we get as little as one clock sample per frame. Which means
> that it takes 32 frames to move from the software timestamp to the
> hardware timestamp method.
>
> This results in abrupt changes in the timestamping after 32 frames (~1
> second), resulting in noticeable artifacts when used for encoding.
>
> With this patch we modify the update algorithm to work with whatever
> amount of values are available.
>
> Tested-by: HungNien Chen <hn.chen@...plusit.com>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>
> + * Have at least 1/4 of a second of timestamps before we
> + * try to do any calculation. Otherwise we do not have enough
> + * precision. This value was determined by running Android CTS
> + * on different devices.
> + * Dev_sof runs at 1KHz, and we have a fixed point precision of
> + * 16 bits.
> + */
> + if ((y2 - y1) < ( (1000 / 4) << 16))
A minor nit: extra space `( (` :)
Powered by blists - more mailing lists