Thread: mplayer vdpau
View Single Post
Old 09-30-09, 05:32 AM   #1208
Registered User
Join Date: May 2007
Posts: 72
Default Re: mplayer vdpau

[quote=danoscar;2094755]As I do not have SPDIF I cannot debug what goes wrong for you.

I really appreciate Your w willingness to help !

Originally Posted by danoscar View Post
By sync display to source you mean that if I have a 24.123hz movie the display should be changed to 24.123hz?
Yes. Indeed, looks horrible, but if we want to have:
-perfect A/V sync (constant sync over hours of playback)
-no judder
This is only IMHO proper solution.
Fortunately most of content has fps from limited pool of possible values: 23.967, 23.98, 24, 25, 30. 50 & 60 are integer multiplies of 25 & 30 so no problem with judder.

Originally Posted by danoscar View Post
As most display only allow a few refresh rate settings, this will not work for most displays. The only thing you can do is to adjust movie frame rate to match display refresh rate. That is what my patch tries to do.
I believe in stand-alone player syncing display to content is standard. Simply, player code is stearing deviation of VCO in clocking sybsystem driving display H/V sequencers.
In PC enviroment it is indeed difficult, so workarround might be based i.e. on free runing of decode and displaying and making sure about speed accuracy.
I.e. 0.1% inaccuracy in speeds causes judder for every 1.76sec.
Assuming that judder with period of tenths of sec is quite unnoticeable - we have to have 0.01% absolute accuracy for player AND display clocks.
So now questions about PLL absolute accuracy arises...

Unfortunately any -even small error - in speed is additive, so it is possible that after hours of playback A/V desync will be noticeable.
Solutions i.e. with frame dropping for keeping A/V sync by monitoring buffer occupancy are IMHO good compromise: acceptable to implement and maybe acceptable judder.
Look: my 23.976 fps move displayed on 24Hz TV has easy noticeable judder for every 1.76 sec. It is visible so easy, that many watches asked me: what is wrong ?

Also Your solution with playback speed adjustments is really nice. It's pity that for SPDIF it has issues.
BTW: I'm surprised by that - taking into account that for analog it works -> mans that D/A converters are able to be clocked faster by few percents. Maybe SPDIF issue is in fact pointing to ALSA spdif non-optimal implementation...
piotro is offline   Reply With Quote