[MPlayer-dev-eng] [PATCH] reduce flashing on resize with VDPAU

Dan Oscarsson Dan.Oscarsson at tietoenator.com
Tue Mar 24 09:53:30 CET 2009


mån 2009-03-23 klockan 19:12 +0100 skrev Reimar Döffinger:
> On Mon, Mar 23, 2009 at 06:27:15PM +0100, Dan Oscarsson wrote:
> > +// find the interval between vsyncs
> > +static void get_vdpau_timing(void) {
> 
> Have you tried the simple-but-stupid method of just using the screen
> refresh rate (e.g. via XRRConfigCurrentRate/XRRScreenConfig)?
> Might be easier to get to work nicely with Xinerama setups, too.

No, but I  have thought about using xrandr instead of the vm code that
is in mplayer today, to change refresh rates.

But NVIDIA have a configuration that returns wrong rate to make
modelines unique. Also I am not sure that you can get fractions on hertz
using xrandr. A quick look at the api shows it using integers for rate.
For example american rate for 24hz is often about 23.976hz, but 24hz is
also possible. Also, if I use nvidia-settings it will for example report
23.976hz rate, but if I measure the vsync through vdpau it is slightly
different. To avoid drift between mplayers rate and the screens rate,
you need the correct vsync interval. The best value I have found so far
is by measuring the interval between vsyncs using surface display
timestamps. 




More information about the MPlayer-dev-eng mailing list