linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org
Subject: Re: [PATCH v1.2 1/4] v4l: Define video buffer flags for timestamp types
Date: Thu, 10 Jan 2013 01:27:23 +0100	[thread overview]
Message-ID: <37718646.Wp4FcFoKX0@avalon> (raw)
In-Reply-To: <20121202205351.GK31879@valkosipuli.retiisi.org.uk>

Hi Sakari,

On Sunday 02 December 2012 22:53:51 Sakari Ailus wrote:
> On Tue, Nov 27, 2012 at 05:04:29PM +0100, Laurent Pinchart wrote:
> > On Thursday 22 November 2012 01:59:00 Sakari Ailus wrote:
> > > On Wed, Nov 21, 2012 at 11:53:02PM +0100, Hans Verkuil wrote:
> ,,,
> 
> > > > What do you think?
> > > 
> > > Fine for me. Sylwester also brought memory-to-memory devices (and
> > > memory-to-memory processing whether the device is classified as such in
> > > API or not) to my attention. For those devices it likely wouldn't matter
> > > at all what's the system time when the frame is processed since the
> > > frame wasn't captured at that time anyway.
> > > 
> > > In those cases it might makes sense to use timestamp that e.g. comes
> > > from the compressed stream, or pass encoder timestamps that are going to
> > > be part of the compressed stream. I think MPEG-related use cases were
> > > briefly mentioned in the timestamp discussion earlier.
> > 
> > When uncompressing a stream you will get the MPEG embedded timestamp on
> > the capture side. The timestamp returned to userspace at QBUF time on the
> > output side will still be unused. I don't really see a use case for
> > returning the timestamp at which the frame is expected to be processed by
> > the codec, so we could just make the field reserved for future use in
> > that case.
> 
> Is the timestamp embedded in the compressed data itself in that case, or
> where?

Yes, it's embedded in the compressed stream.

> Could this be codec-dependent?

Of course, it would be too easy otherwise :-)

> > > > > The driver stores the time at which
> > > > > +	    the first data byte was actually sent out in the
> > > > > +	    <structfield>timestamp</structfield> field.
> > > > 
> > > > Same problem as with the capture time: does the timestamp refer to the
> > > > first or last byte that's sent out? I think all output drivers set it
> > > > to the time of the last byte (== when the DMA of the frame is
> > > > finished).
> > > 
> > > I haven't actually even seen a capture driver that would do otherwise,
> > > but that could be just me not knowing many enough. :-) Would we actually
> > > break something if we changed the definition to say that this is the
> > > timestamp taken when the frame is done?
> > 
> > For software timestamps we could do that, but for hardware timestamps the
> > exact timestamping time may vary.
> 
> Should we then do this for the timestamps that are obtained from the system
> clock? We also haven't defined other kinds of tiemstamps yet.

That sounds good to me.

> For timestamp types that are hardware-dependent we could have exceptions.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-01-10  0:25 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 22:06 [PATCH 0/4] Monotonic timestamps Sakari Ailus
2012-11-15 22:06 ` [PATCH 1/4] v4l: Define video buffer flags for timestamp types Sakari Ailus
2012-11-16 13:51   ` Hans Verkuil
2012-11-16 15:20     ` Sakari Ailus
2012-11-16 15:58       ` Hans Verkuil
2012-11-16 20:49         ` [PATCH v1.1 " Sakari Ailus
2012-11-21 19:13           ` [PATCH v1.2 " Sakari Ailus
2012-11-21 22:53             ` Hans Verkuil
2012-11-21 23:59               ` Sakari Ailus
2012-11-27 16:04                 ` Laurent Pinchart
2012-12-02 20:53                   ` Sakari Ailus
2013-01-10  0:27                     ` Laurent Pinchart [this message]
2012-11-15 22:06 ` [PATCH 2/4] v4l: Helper function for obtaining timestamps Sakari Ailus
2012-11-16 13:52   ` Hans Verkuil
2012-11-15 22:06 ` [PATCH 3/4] v4l: Convert drivers to use monotonic timestamps Sakari Ailus
2012-11-16 13:54   ` Hans Verkuil
2012-11-15 22:06 ` [PATCH 4/4] v4l: Tell user space we're using " Sakari Ailus
2012-11-16 13:55   ` Hans Verkuil
2012-12-17 11:19     ` Kamil Debski
2012-12-17 11:34       ` 'Sakari Ailus'
2012-12-17 11:48         ` Kamil Debski
2013-01-05 20:09           ` Sakari Ailus

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=37718646.Wp4FcFoKX0@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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;
as well as URLs for NNTP newsgroup(s).