[SDL] Re: Increasing an SDL application's priority

David Olofson david.olofson at reologica.se
Tue Mar 13 09:59:02 PST 2001


On Tuesday 13 March 2001 05:33, Olivier Dagenais wrote:
> > It's virtually impossible to implement perfect full frame rate
> > animation with more than one thread without priorities, as you cannot
> > take a single dropped frame without clearly visible jerking.
>
> I don't think humans can detect more than 30-40 frames per second, so going
> beyond that is almost silly.

Wrong question answered. The problem is not the fram rate in itself, but the 
fact that CRT technology cannot produce lower refresh rates than some 50 Hz. 
For high intensity displays like computer monitors, you have to go higher 
than 70 Hz to avoid visible flickering.


> Is it not the case that "smoothness" is
> achieved with a constant frame rate?

Yes and no; Indeed you need a constant frame rate, but you also need to make 
sure that every refresh renders an updated version of the scene on the CRT, 
or you'll see ghosting effects.

Also, at refresh rates below some 100 Hz, the eye can easily tell 100 Hz 
"double flash" scrolling (ie 50 fps on a 100 Hz display) from 50 Hz full 
frame rate scrolling. The former "vibrates" slightly, while the latter 
appears absolutely smooth - although flickering, if displayed on anything 
like a computer monitor, as opposed to a video monitor. (Video monitors are 
designed for 50-60 Hz, and have lower intensity + slower phosphor to deal 
with the "insufficient" refresh rates.)


> I mean regular TV is 24 (? 30??)

PAL:  25 interlaced = 50 half-frames/second
NTSC: 30 interlaced = 60 half-frames/second

Interlaced modes are different, and come with a bunch of other problems. If 
find interlaced modes useless for fast animation with current hardware, as it 
requires accurate motion blur to avoid the classical interlace ghosting 
effect.

(Note: The game console video modes that most console games use only use the 
first half-frame, thus producing a 50/60 Hz mode at half the vertical 
resolution.)


> frames per second and it looks pretty smooth.

Yes, as long as you're not looking at NTSC->PAL conversions, at least. :-) 
However, keep in mind that there is motion blur on virtually everything you 
see the standard (interlaced) TV format. Games are virtually never motion 
blurred, and probably won't be for quite some time, due to the power required 
to do it right.


> Full frame rate also probably looks very smooth because it is constant?

Yes, but a constant frame rate of 60 fps on a 60 Hz display still looks 
smoother than 60 fps on a 120 Hz display.


> If
> this is the case, this whole conversation is moot:  instead of trying to
> get 60 (or even something crazy like 75 or 90) frames per second, go for 30
> and use the rest of the CPU time for other stuff, chances are most people
> won't notice and your game/demo/app will get to do more per frame!

Sorry, but it doesn't work that way, unfortunately.

(It might be me having extremely fast eyes, but I don't find that very 
likely. I have blue eyes, while brown and black eyes are significantly faster 
according to some scientific studies. :-)


//David

.- M A I A -------------------------------------------------.
|      Multimedia Application Integration Architecture      |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------> http://www.linuxaudiodev.com/maia -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`--------------------------------------> david at linuxdj.com -'



More information about the SDL mailing list