[SDL] Milliseconds on the Mac

Mike Powell belar at earthling.net
Fri Apr 28 21:33:43 PDT 2000


>The thing is, we're doing our best. Synchronizing to the monitor refresh
>would mean slowing down to something like half of the refresh rate (we'd
>update every other frame). So you'd suck, but you'd suck evenly.

Sucking evenly can be quite smooth, but doing well unevenly can suck.

>You know what? I'm in Canada and we have 60 Hz AC current. VCRs are
>synchronized at a 30 fps rate, but the movies that play on them were
>made with a 24 fps sampling rate. They use frame doubling and NOBODY
>cares or notice.

That is because GCD(60, 24) = 12 is relatively large, so the periods of
irregularity are easy to make short. On the other hand, conversion between
50 and 60 Hz television either requires expensive interpolation equipment,
or is done cheaply and badly by dropping/doubling frames. The difference is
not hard to see.

 In Europe, you only have one doubled frame per second,
>but here, 25% of the frames in the movie are displayed twice! And it
>looks just fine.

No, TV-converted movies in Europe play at 25fps. Yes, they go too fast, and no,
nobody notices. One doubled frame per second *would* be noticed.
25% doubled frames is no problem if they are spread out uniformly, but if you
are playing a game with crisp graphics at 51.721 frames/s on a monitor at
86.343 Hz, there is no small common multiple (especially since the game frame
rate isn't even constant!).

>Well, not exactly. You don't have tearing/shearing, but you get a slow
>framerate in exchange because you do one more copy than what is needed.

Right, it won't always be a win, but if pixmaps are located in video memory
the only extra cost is a very fast intra-vidmem blit. I just tried it on
an UltraSparc, and it was noticeable slower. Unfortunately, the tearing got
worse than before, so I guess XSun doesn't synch to vertical refresh :(






More information about the SDL mailing list