Closed adammorrissirrommada closed 5 years ago
By the way, with 0.05, behaviorDemo was fine, but I was getting drops for sog and adaptiveDemo.
Thinking about this some more.... We want to flip on the next available retrace every time. It seems to me that there's nothing to be gained by making the deadline close to the actual impending flip. Slack could be 0.5. That way, missed will always return a value that says "half a frame late", but the actual number will have some small variability. So, as long as we find that missed is less than, say, 0.75*FRAMEDURATION , everything is good. If missed is > FRAMEDURATION, we've missed our deadline.
Is this right?
I just checked DriftDemo2, which indeed uses 0.5*frameInterval as the 'when'. That makes sense to me.
All in all, we are now of the view that we should just rid of the 'when' entirely! We always want to flip on the next vbl, so the 'when' is no use to us. Shaun has no timing problems at all if you you leave out the when, so there is no need for the "high performance" fix that we discussed in that case. A miss is detected by comparing the flip time with that of the previous one. The only virtue of the 'when' for us seems to be that we get the "missed" value as an output argument, but we can compute that ourselves (as Shaun did in his version) by comparing to our known deadline.
What do you think?
I am ok with that solution. To detect the miss I would compare the current vbl with the previous one (so store it for a frame).
From: Adam Morris [mailto:notifications@github.com] Sent: Thursday, July 6, 2017 9:57 AM To: klabhub/neurostim-ptb neurostim-ptb@noreply.github.com Cc: Bart Krekelberg bart@vision.rutgers.edu; Assign assign@noreply.github.com Subject: Re: [klabhub/neurostim-ptb] Frame deadlines and drops (#76)
All in all, we are now of the view that we should just rid of the 'when' entirely! We always want to flip on the next vbl, so the 'when' is no use to us. Shaun has no timing problems at all if you you leave out the when, so there is no need for the "high performance" fix that we discussed in that case. A miss is detected by comparing the flip time with that of the previous one. The only virtue of the 'when' for us seems to be that we get the "missed" value as an output argument, but we can compute that ourselves (as Shaun did in his version) by comparing to our known deadline.
What do you think?
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/klabhub/neurostim-ptb/issues/76#issuecomment-313324263, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALbI0yCK_xCyhvLidwWl5BTgrLa1Sytuks5sLJNMgaJpZM4ONx_J.
Hi @bartkrekelberg .
I was getting lots of frame drops with slack of 0.05. Everything seems to work for me with 0.1.. is that fine for you too? Also, can you check that the code that detects drops is accurate... we've been using ptbvbl + 0.9*fraemduration as a deadline for a long time now, which was divorced from the slack constant.