v4l2-ctl: Question on last_ts
Hello Hans,
I do not understand the concept on last_ts.
Quoted 2 lines
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?).
Quoted 3 lines
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
Quoted 1 line
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_
Quoted 5 lines
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)
Quoted 18 lines · Max Schulze
Hello Hans,
I do not understand the concept on
last_ts.Quoted 4 lines
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?).
Quoted 3 lines
if (
last_ts<= 0.0)
fprintf(f, " delta last: %.03f ms", (ts -last_ts) * 1000.0);last_ts= ts;
Quoted 7 lines
Might it be, that commit
222e1760c7"utils: fix implicit float conversion" got the float conversion wrong and it should rather beQuoted 1 line
if (
last_ts> 0.0)To my understanding, this would yield a much-more useful output of printing the diff to the last frame
_ineveryframe_
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
Quoted 13 lines
Quoted 12 lines
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)