[MPlayer-dev-eng] Re: [patch] A-V sync tuneup, round 2

PALLAI Roland dap at omnis.hu
Wed Nov 7 02:20:03 CET 2001


>> this patch do the following things:
>> - shows if latency between two frames is larger than frametime+20% or
>> is smaller than frametime-20% (last two number in brackets)
>> - implements soft-sleep for much precise sleep timing. it's eats up
>> +~10% of CPU time, but _just_ the idle CPU time
>> - do smooth A-V sync, doesn't allows 'unexpected' corrections over +-10%
>> of frametime between two frames.  it's maybe sounds scary, but 10%
>> is enough for A-V sync
> all this should be optional until we see it doesn't break anything and
> works better on all systems.
 It can be completely disable by the '-nodapsync' command-line option, but
may be a 'configure' option too.  how I should do?

>> ps# Arpi, it contains some bugfixes and improvements since previous
>> version, IMHO it's much cleaner and stable
> previous was too messy to even read, not talking about apply. this one
> is a bit better, but you should add more comments or do something, as
> it's hard to understand what is why.
 that was just a framework..  well, I've just now begins to learn english,
so about the technical things I'd write a private mail in hungarian :}

> btw, comment for your note: it is not intel clock limitation or so,
> it's linux limitation, especially kernel configuration. value of HZ
> defaults to 100, it means 100 task switches per second. as usleep()
> releases mplayer process and allow scheduler to call something else
> (idle?) it will took n*10ms to get the cpu back. note, that on SMP
> systems it isn't true.
> note2: HZ can be set to 1000 at kernel compile time.
 I'm afraid to change it's worth, because it can decrease the system
performance, maybe I'm wrong..  BTW, there can be more context switch than
HZ, isn't it?

> note3: RPC timer should be used for timing based on 8khz clock.
> note4: RPC is usually disabled for 'average' users. and HZ=100.
 hm, I didn't think on it, cause I had never enabled it. :} it's a Good
Thing, I'll test it tomorrow.. but softsleep even required by non-linux
platforms and RPC-less users


--
  DaP





More information about the MPlayer-dev-eng mailing list