From: Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Shaik Ameer Basha <shaik.ameer@samsung.com>,
linux-media@vger.kernel.org, s.nawrocki@samsung.com,
kgene.kim@samsung.com, shaik.samsung@gmail.com,
Hans Verkuil <hverkuil@xs4all.nl>,
Kamil Debski <k.debski@samsung.com>
Subject: Re: [PATCH] [media] exynos-gsc: propagate timestamps from src to dst buffers
Date: Thu, 22 Nov 2012 22:44:22 +0100 [thread overview]
Message-ID: <50AE9CB6.8020100@gmail.com> (raw)
In-Reply-To: <20121121193948.GB30360@valkosipuli.retiisi.org.uk>
Hi Sakari,
On 11/21/2012 08:39 PM, Sakari Ailus wrote:
> Hi Sylwester and Shaik,
>
> On Mon, Nov 19, 2012 at 11:06:34PM +0100, Sylwester Nawrocki wrote:
>> On 11/07/2012 07:40 AM, Shaik Ameer Basha wrote:
>>> Make gsc-m2m propagate the timestamp field from source to destination
>>> buffers
>>
>> We probably need some means for letting know the mem-to-mem drivers and
>> applications whether timestamps are copied from OUTPUT to CAPTURE or not.
>> Timestamps at only OUTPUT interface are normally used to control buffer
>> processing time [1].
>>
>>
>> "struct timeval timestamp
>>
>> For input streams this is the system time (as returned by the
>> gettimeofday()
>> function) when the first data byte was captured. For output streams
>
> Thanks for notifying me; this is going to be dependent on the timestamp
> type.
>
> Also most drivers use the time the buffer is finished rather than when the
> "first data byte was captured", but that's separate I think.
Yes, that's an another ambiguity that might need to be resolved.
>> the data
>> will not be displayed before this time, secondary to the nominal frame rate
>> determined by the current video standard in enqueued order.
>> Applications can
>> for example zero this field to display frames as soon as possible.
>> The driver
>> stores the time at which the first data byte was actually sent out in the
>> timestamp field. This permits applications to monitor the drift between the
>> video and system clock."
>>
>> In some use cases it might be useful to know exact frame processing time,
>> where driver would be filling OUTPUT and CAPTURE value with exact monotonic
>> clock values corresponding to a frame processing start and end time.
>
> Shouldn't this always be done in memory-to-memory processing? I could
> imagine only performance measurements can benefit from other kind of
> timestamps.
>
> We could use different timestamp type to tell the timestamp source isn't any
> system clock but an input buffer.
>
> What do you think?
Yes, it makes sense to me to report with the buffer flag that the source of
timestamp is just an OUTPUT buffer. At least this would solve the reporting
part of the issue. Oh wait, could applications tell by setting buffer flag
what timestamping behaviour they expect from a driver ?
I can't see an important use of timestamping m2m buffers at device drivers.
Performance measurement can probably be done in user space with sufficient
accuracy as well. However, it wouldn't be difficult for drivers to
implement
multiple time stamping techniques, e.g. OUTPUT -> CAPTURE timestamp copying
or getting timestamps from monotonic clock at frame processing beginning and
end for OUTPUT and CAPTURE respectively.
I believe the buffer flags might be a good solution.
--
Regards,
Sylwester
next prev parent reply other threads:[~2012-11-22 21:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-07 6:40 [PATCH] [media] exynos-gsc: propagate timestamps from src to dst buffers Shaik Ameer Basha
2012-11-19 22:06 ` Sylwester Nawrocki
2012-11-21 19:39 ` Sakari Ailus
2012-11-22 9:32 ` Kamil Debski
2012-11-22 21:25 ` 'Sakari Ailus'
2012-11-22 21:44 ` Sylwester Nawrocki [this message]
2012-11-25 12:09 ` Sakari Ailus
2012-11-27 13:09 ` Laurent Pinchart
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=50AE9CB6.8020100@gmail.com \
--to=sylvester.nawrocki@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=k.debski@samsung.com \
--cc=kgene.kim@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sakari.ailus@iki.fi \
--cc=shaik.ameer@samsung.com \
--cc=shaik.samsung@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.