[visionegg] Dropped frame detection reliability, frame histogram accuracy
- From: "Martin Spacek" <mspacek@xxxxxxxxxxxxxxx>
- To: <visionegg@xxxxxxxxxxxxx>
- Date: Mon, 16 Aug 2004 02:42:47 -0700
Hello,
I'm wondering about the reliability of dropped frame detection and the
accuracy of the frame histogram in VisionEgg. There's a spot in the code
('warn_longest_frame_threshold' in flowcontrol module) which decides that a
frame has been dropped if the length of time to draw that frame to the
framebuffer (as measured by the windows timer) is >= 2x that of the screen
refresh time. I guess this makes sense: if the reported time between the
completion of the drawing of frame 1 and frame 2 to the framebuffer is >= 2x
the refresh time, then either frame 1 or frame 2 must have not been drawn to
the buffer in time. There's a comment added in the code: "set to 2.0 for no
false alarms" which I think means that 2.0 or greater will ensure you get no
false positives.
I'm more worried about the false negatives though. Assume that two
consecutive frames are drawn to buffer with a (1.999 x 1/refresh rate) time
interval between them:
Scenario 1: frame 1 is drawn to buffer immediately _after_ raster #0, and
frame 2 is drawn to buffer immediately _before_ raster #2. Both frames are
drawn in time for their rasters, and therefore both are displayed at the
right time. This is the best case scenario, but it happens rarely.
Scenario 2: frame 1 is drawn some time _before_ raster #1, and frame 2 is
drawn some time _after_ raster #2. So frame 2 misses raster #2 and is
therefore dropped, and frame 1 is drawn twice. This is the case even though
the time interval between frames is the same as in scenario 1.
Is this something to worry about, or am I way off on this?
Other things I'm wondering about:
- I'm guessing that OpenGL (or something low-level) sends a tick to VisionEgg
on every raster and and/or every bufferswap. How accurate is the arrival of
this tick? Does the delay between the actual event and the tick vary
depending on system load?
- Under Windows, VisionEgg uses the Windows timer to timestamp events. What's
the accuracy of the windows timer (referred to as time.clock() in
__init__.py)? If windows is off doing something at the time that VisionEgg is
requesting a timestamp from Windows, does VisionEgg have to wait around for
the timestamp, which by the time it gets it is innacurate?
Cheers,
Martin
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- Follow-Ups:
- [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- From: Timothy Vickery
- References:
- [visionegg] Re: 10-bit framebuffers
- From: Martin Spacek
- [visionegg] Re: 10-bit framebuffers
- From: Andrew Straw
Other related posts:
- » [visionegg] Dropped frame detection reliability, frame histogram accuracy
- » [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- » [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- » [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- » [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- » [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- [visionegg] Re: Dropped frame detection reliability, frame histogram accuracy
- From: Timothy Vickery
- [visionegg] Re: 10-bit framebuffers
- From: Martin Spacek
- [visionegg] Re: 10-bit framebuffers
- From: Andrew Straw