[SDL] Re: extension for 2D with DRI
pp at ludusdesign.com
Sat Apr 15 11:11:55 PDT 2000
Mattias Engdegård wrote:
> > 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.
I do not know for conversion between 50 and 60 Hz, but I know for a fact
that conversion between 24 fps film movies and North American 60 Hz
television is done by doubling frames. Yes, the "cheap and bad" method.
And the difference *is* hard to see! Heck, going from 24 to 30 means
that 1 out of every 4 frame is displayed twice! When I learned that, I
was amazed that such a crappy method looked so fine!
> No, TV-converted movies in Europe play at 25fps. Yes, they go too fast,
> and no, nobody notices.
Argh, they really play it a bit faster? Wow, for a two hour feature
movie, that mean losing almost *5* minutes! But hey, at the speed that
french people talk and the number of silent scenes they like having in
movies, I can understand people not noticing (and actually enjoying the
extra speed!)! ;-)
> 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!).
The thing is, can you notice a punctual 1 fps difference when playing a
game? *One* frame per second? I'm not talking about times where Q3A
actually drops 5 frames on the floor, a *single* one! If you turn on
"cg_drawfps" and look at the counter, you'll probably notice that it is
probably flickering between two or three numbers! And when you look at
the action, it is okay and looks pretty regular, doesn't it?
> > 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 :(
So few X server actually puts pixmaps in video memory, it is a shame. If
you are lucky, system to video memory transfers are done using some fast
interface, like DMA instead of PIO. And if it uses PIO to do the
transfer and that the transfer takes longer than the vertical retrace,
then even if it *is* synchronized to the vertical retrace, you'll see
One of the reasons the new XFree86 4.0 servers are so fast is that they
started using the video memory intelligently. Try the 500x500
pixmap-to-window benchmark in x11perf on the old and new servers, you'll
see what I mean.
More information about the SDL