[MPlayer-dev-eng] Performance of libdvdread/libdvdcss
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Fri Aug 31 21:43:19 CEST 2012
On Fri, Aug 31, 2012 at 08:28:37PM +0100, Vicente Sendra wrote:
> I'm new to mplayer developers mailing list, i hope this is the right place to talk about this.
>
> Firs of all, i am compiling for Win32 with mingw, and testing on my windows xp laptop, but i think all this is ok for all other platforms.
>
> I've been developing a new system for double frame rate output (for filters like yadif and tfields) that solves 3 problems with mplayer:
>
> 1-You get exact double framerate timing, old system did 2 continuous page flips, resulting in two frames very close in time, depending on your video card refresh rate.
>
> 2-New system always pushes filter frames to queue and gets them in mplayer.c main loop with vf_output_queued_frame, so they can be framedropped if needed.
>
> 3-New framedrop system for framerates > video card refresh rate, that resulted in 100% cpu usage with vsync activated, because page flip gets blocked with full buffer until next video card refresh. New system checks page flip time and if it gets too big, it starts dropping interpolated frames, if no interpolated frames or if dropping them is not enougth, only then full frames are dropped, this problem is very old but now it's very annoying because most lcd monitors can't go > 60hz (my old CRT was set to 75Hz, so no problem here).
>
> http://forum.doom9.org/showthread.php?p=1333149
> http://www.nvnews.net/vbulletin/showthread.php?t=106409
>
> I've got this system working with r34401 (i was getting compile errors from las r35119), but debugging this system has shown me the low performance of cache system when using "Win2K API" for dvd access (vs "libc" acess).
>
> Cache doesn't fill fast enough, even if there is cpu time available and, of course, media is fast enough.
>
> Cache works ok with libc and same settings, double frame rate and same dvd.
>
> To test it i'm using this command line options:
>
> for win32k:
> mplayer.exe -ao dsound:device=0 -vf-add yadif=1 -dvd-device K:\ -dvdangle 1 -msglevel all=9
>
> for libc:
> mplayer.exe -ao dsound:device=0 -vf-add yadif=1 -dvd-device K:\VIDEO_TS -dvdangle 1 -msglevel all=9
>
> (i set DVDCSS_VERBOSE environment variable to 2 to see more info about css)
>
> DVD activity led performs very different with the two access methods, win32k blinks a lot, indicating a lot of activity, when in fact it fills cache at a lower speed, with libc, it barely lights up but it fills cache pretty quickly.
>
> Any ideas on how can i improve reading with win32k.
As you can see both functions do basically the same thing, even if one
uses the windows ReadFile etc. APIs directly.
Are you sure it isn't your DVD drive that after authentication switches
to a special "Video DVD playback" mode that completely breaks
performance?
More information about the MPlayer-dev-eng
mailing list