mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jun Chen <ptchentw@gmail.com>
Cc: mchehab@kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, Jun Chen <jun.chen@vatics.com>
Subject: Re: [PATCH] media: uvcvideo: Fix annotation for uvc_video_clock_update()
Date: Wed, 1 Jan 2020 19:28:33 +0200	[thread overview]
Message-ID: <20200101172833.GG6226@pendragon.ideasonboard.com> (raw)
In-Reply-To: <1577241257-9203-1-git-send-email-ptchentw@gmail.com>

Hello Jun,

Thank you for the patch.

On Wed, Dec 25, 2019 at 10:34:17AM +0800, Jun Chen wrote:
> From: Jun Chen <jun.chen@vatics.com>
> 
> The formula (2) is to convert from SOF to host clock,
> it should be fix as
> "TS = ((TS2 - TS1) * SOF + TS1 * SOF2 - TS2 * SOF1) / (SOF2 - SOF1)"
> 
> Signed-off-by: Jun Chen <jun.chen@vatics.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and applied to my tree.

> ---
>  drivers/media/usb/uvc/uvc_video.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
> index 8fa77a8..a3150da 100644
> --- a/drivers/media/usb/uvc/uvc_video.c
> +++ b/drivers/media/usb/uvc/uvc_video.c
> @@ -622,7 +622,7 @@ static u16 uvc_video_clock_host_sof(const struct uvc_clock_sample *sample)
>   * to avoid losing precision in the division. Similarly, the host timestamp is
>   * computed with
>   *
> - * TS = ((TS2 - TS1) * PTS + TS1 * SOF2 - TS2 * SOF1) / (SOF2 - SOF1)	     (2)
> + * TS = ((TS2 - TS1) * SOF + TS1 * SOF2 - TS2 * SOF1) / (SOF2 - SOF1)	     (2)
>   *
>   * SOF values are coded on 11 bits by USB. We extend their precision with 16
>   * decimal bits, leading to a 11.16 coding.

-- 
Regards,

Laurent Pinchart

      reply	other threads:[~2020-01-01 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25  2:34 Jun Chen
2020-01-01 17:28 ` Laurent Pinchart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200101172833.GG6226@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=jun.chen@vatics.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ptchentw@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®