From: Hans Verkuil <hverkuil@xs4all.nl>
To: Kamil Debski <k.debski@samsung.com>
Cc: "'Sakari Ailus'" <sakari.ailus@iki.fi>,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-media@vger.kernel.org, arun.kk@samsung.com,
mchehab@redhat.com, laurent.pinchart@ideasonboard.com,
hans.verkuil@cisco.com, kyungmin.park@samsung.com
Subject: Re: [PATCH 3/3] v4l: Set proper timestamp type in selected drivers which use videobuf2
Date: Wed, 23 Jan 2013 10:03:47 +0100 [thread overview]
Message-ID: <201301231003.47396.hverkuil@xs4all.nl> (raw)
In-Reply-To: <040701cdf946$3a18c060$ae4a4120$%debski@samsung.com>
On Wed 23 January 2013 09:47:06 Kamil Debski wrote:
> Hi,
>
> > From: 'Sakari Ailus' [mailto:sakari.ailus@iki.fi]
> > Sent: Tuesday, January 22, 2013 7:45 PM
> >
> > Hi Kamil,
> >
> > On Tue, Jan 22, 2013 at 06:58:09PM +0100, Kamil Debski wrote:
> > ...
> > > > OTOH I'm not certain what's the main purpose of such copied
> > > > timestamps, is it to identify which CAPTURE buffer comes from which
> > OUTPUT buffer ?
> > > >
> > >
> > > Yes, indeed. This is especially useful when the CAPTURE buffers can
> > be
> > > returned in an order different than the order of corresponding OUTPUT
> > > buffers.
> >
> > How about sequence numbers then? Shouldn't that be also copied?
> >
> > If you're interested in the order alone, comparing the sequence numbers
> > is a better way to figure out the order. That does require strict one-
> > to-one mapping between the output and capture buffers, though, and that
> > does not help in knowing when it might be a good time to display a
> > frame, for instance.
> >
>
> The idea behind copying the timestamp was that it can propagate the
> timestamp
> from the video stream. If this info is absent application can generate them
> and
> still be able to connect OUTPUT and CAPTURE frames.
>
> While decoding MPEG4 it is possible to get a compressed frame saying
> "nothing
> to do here, move along" (which basically means that the last frame should be
> repeated).
> This is where increasing sequence number comes in handy. Even if no
> timestamp
> is set the application can detect such empty frames and display the decoded
> video
> correctly.
>
> Copying sequence numbers was already discussed in January 2012 IIRC. The
> recommendation
> was that the device keeps an internal sequence counter and assigns it to
> both OUTPUT and
> CAPTURE buffers, so they can be associated.
>
> I think that we're diverting from the main topic of this discussion. My
> patches fix a
> problem and the only thing that, we cannot agree about is what the default
> timestamp type
> should be.
Right. And in my view there should be no default timestamp. Drivers should
always select MONOTONIC or COPY, and never UNKNOWN. The vb2 code should
check for that and issue a WARN_ON if no proper timestamp type was provided.
v4l2-compliance already checks for that as well.
Regards,
Hans
next prev parent reply other threads:[~2013-01-23 9:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 9:36 [PATCH/RFC 0/3] Add proper timestamp types handling in videobuf2 Kamil Debski
2013-01-14 9:36 ` [PATCH 1/3] v4l: Define video buffer flag for the COPY timestamp type Kamil Debski
2013-01-14 9:36 ` [PATCH 2/3] vb2: Add support for non monotonic timestamps Kamil Debski
2013-01-14 9:36 ` [PATCH 3/3] v4l: Set proper timestamp type in selected drivers which use videobuf2 Kamil Debski
2013-01-19 17:43 ` Sakari Ailus
2013-01-21 14:07 ` Kamil Debski
2013-01-22 10:03 ` 'Sakari Ailus'
2013-01-22 10:24 ` Kamil Debski
2013-01-23 0:25 ` Laurent Pinchart
2013-01-23 8:46 ` Kamil Debski
2013-01-24 1:10 ` Laurent Pinchart
2013-01-22 10:35 ` Hans Verkuil
2013-01-22 17:57 ` Kamil Debski
2013-01-22 10:37 ` Sylwester Nawrocki
2013-01-22 17:58 ` Kamil Debski
2013-01-22 18:44 ` 'Sakari Ailus'
2013-01-23 8:47 ` Kamil Debski
2013-01-23 9:03 ` Hans Verkuil [this message]
2013-01-23 13:55 ` 'Sakari Ailus'
2013-01-23 14:50 ` Kamil Debski
2013-01-22 9:43 ` Kamil Debski
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=201301231003.47396.hverkuil@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=arun.kk@samsung.com \
--cc=hans.verkuil@cisco.com \
--cc=k.debski@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=s.nawrocki@samsung.com \
--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