[MPlayer-dev-eng] [PATCH] cpuspeed detection

Felix Buenemann atmosfear at users.sourceforge.net
Thu Jul 24 16:28:50 CEST 2003


Hi,

here is a proposed patch that adds cpu speed detection via rdtsc and a simple 
software timer. It's not very accurate but it runs with user priviledges.
I also added detection of TSC capability via CPUID, to prevent detecting cpu 
speed on non-tsc capable x86 cpus.

Probably the value within usec_sleep() of GetCpuSpeed needs some tweaking, it 
currently is 250msec which gives quite ok accuracy for me, but it might need 
increasing for very slow cpus.

Please test the patch and see if it works for you and wether results are ok.

Dunno if you find this useful, but I find it a nice feature, eg. when someone 
posts a log for a bug report and aswell just for the visuals =)
-- 
Best Regards,
        Atmos
____________________________________________
- MPlayer Developer - http://mplayerhq.hu/ -
____________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpuspeed.patch
Type: text/x-diff
Size: 4264 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20030724/a1c56650/attachment.patch>


More information about the MPlayer-dev-eng mailing list