* v4l2-ctl: Question on last_ts
@ 2021-01-27 10:44 Max Schulze
2021-01-27 12:00 ` Hans Verkuil
0 siblings, 1 reply; 2+ messages in thread
From: Max Schulze @ 2021-01-27 10:44 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media
Hello Hans,
I do not understand the concept on last_ts.
> cap dqbuf: 0 seq: 0 bytesused: 512000 ts: 137342.420951 delta
> last: 137342420.951 ms (ts-monotonic, ts-src-soe)
> cap dqbuf: 1 seq: 2 bytesused: 512000 ts: 137342.484954 dropped:
> 1 (ts-monotonic, ts-src-soe)
It seems to print the timestamp on the first frame, but then never again
(how useful is it, to print the same timestamp twice?).
> if (last_ts <= 0.0)
> fprintf(f, " delta last: %.03f ms", (ts - last_ts) * 1000.0);
> last_ts = ts;
Might it be, that commit 222e1760c7 "utils: fix implicit float
conversion" got the float conversion wrong and it should rather be
> if (last_ts > 0.0)
To my understanding, this would yield a much-more useful output of
printing the diff to the last frame _in every frame_
> cap dqbuf: 0 seq: 0 bytesused: 512000 ts: 143215.916971
> (ts-monotonic, ts-src-soe)
> cap dqbuf: 1 seq: 2 bytesused: 512000 ts: 143215.984995 delta
> last: 68.024 ms dropped: 1 (ts-monotonic, ts-src-soe)
> cap dqbuf: 2 seq: 3 bytesused: 512000 ts: 143216.016956 delta
> last: 31.961 ms (ts-monotonic, ts-src-soe)
> cap dqbuf: 3 seq: 4 bytesused: 512000 ts: 143216.052981 delta
> last: 36.025 ms (ts-monotonic, ts-src-soe)
> cap dqbuf: 0 seq: 5 bytesused: 512000 ts: 143216.088920 delta
> last: 35.939 ms fps: 29.08 (ts-monotonic, ts-src-soe)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: v4l2-ctl: Question on last_ts
2021-01-27 10:44 v4l2-ctl: Question on last_ts Max Schulze
@ 2021-01-27 12:00 ` Hans Verkuil
0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2021-01-27 12:00 UTC (permalink / raw)
To: Max Schulze; +Cc: linux-media
On 27/01/2021 11:44, Max Schulze wrote:
> Hello Hans,
>
>
> I do not understand the concept on last_ts.
>
>> cap dqbuf: 0 seq: 0 bytesused: 512000 ts: 137342.420951 delta
>> last: 137342420.951 ms (ts-monotonic, ts-src-soe)
>> cap dqbuf: 1 seq: 2 bytesused: 512000 ts: 137342.484954 dropped:
>> 1 (ts-monotonic, ts-src-soe)
>
> It seems to print the timestamp on the first frame, but then never again
> (how useful is it, to print the same timestamp twice?).
>
>
>> if (last_ts <= 0.0)
>> fprintf(f, " delta last: %.03f ms", (ts - last_ts) * 1000.0);
>> last_ts = ts;
>
> Might it be, that commit 222e1760c7 "utils: fix implicit float
> conversion" got the float conversion wrong and it should rather be
>
>> if (last_ts > 0.0)
>
> To my understanding, this would yield a much-more useful output of
> printing the diff to the last frame _in every frame_
Yep, you are correct. It's now fixed. I was wondering about that as well
when I looked at the code.
Thanks for reporting this!
Hans
>
>
>> cap dqbuf: 0 seq: 0 bytesused: 512000 ts: 143215.916971
>> (ts-monotonic, ts-src-soe)
>> cap dqbuf: 1 seq: 2 bytesused: 512000 ts: 143215.984995 delta
>> last: 68.024 ms dropped: 1 (ts-monotonic, ts-src-soe)
>> cap dqbuf: 2 seq: 3 bytesused: 512000 ts: 143216.016956 delta
>> last: 31.961 ms (ts-monotonic, ts-src-soe)
>> cap dqbuf: 3 seq: 4 bytesused: 512000 ts: 143216.052981 delta
>> last: 36.025 ms (ts-monotonic, ts-src-soe)
>> cap dqbuf: 0 seq: 5 bytesused: 512000 ts: 143216.088920 delta
>> last: 35.939 ms fps: 29.08 (ts-monotonic, ts-src-soe)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-27 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 10:44 v4l2-ctl: Question on last_ts Max Schulze
2021-01-27 12:00 ` Hans Verkuil
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.