[vlc-devel] Re: QueryPerformanceFrequency suggestion

Derk-Jan Hartman hartman at videolan.org
Tue Jul 19 13:36:43 CEST 2005


Ticket created:

https://trac.videolan.org/vlc/ticket/264



On 19 jul 2005, at 13:22, Kirk Hobart wrote:

> Hello,
>
> I'm compiling and running VLC 0.8.2 on a dual-Athlon Win2k system.
>
> I suggest adding a preferences advanced option that enables 
> QueryPerformanceFrequency in src/misc/mtime.c even if the reported 
> frequency is different from the two expected values. Dual-CPU Windows 
> machines tell the CPU clock frequency instead of the multimedia timer 
> frequency.
>
> I understand that the current code is "playing it safe" by disabling 
> the high performance timer in dual-CPU machines, because some machines 
> have unreliable TSC timers. But my machine has good timers, and VLC 
> refuses to use them, so my video frame rate is unnecessarily uneven.
>
> To test my theory, I replaced this line:
>
>         freq = ( QueryPerformanceFrequency( (LARGE_INTEGER *)&freq ) &&
>                  (freq == I64C(1193182) || freq == I64C(3579545) ) )
>                ? freq : 0;
>
> with this line:
>
>         freq = QueryPerformanceFrequency( (LARGE_INTEGER *)&freq )
>                ? freq : 0;
>
> and I modified this statement:
>
>         return ( usec_time * 1000000 ) / freq;
>
> to this, to avoid overflow:
>
>         return ( usec_time * 1e6 ) / freq;
>
> I don't know how to add a new preferences advanced option to the 
> dialogs.
>
> Kirk
>
> -- 
> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
> To unsubscribe, please read http://developers.videolan.org/lists.html
>
>
>
---
Universiteit Twente
Derk-Jan Hartman (d.hartman at student.utwente dot nl)
http://www.sidequest.org

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list