[XviD-devel] bug in 1.1.0 beta1 and beta2

Skal skal at planet-d.net
Mon Apr 18 10:29:59 CEST 2005


	Hi Mark,

On Thu, 2005-04-14 at 17:56, Mark L wrote:
>   There is a bug in the benchmarking code for Windows.
>  It uses the clock() procedure and assumes that it
> returns times in the Microsecond range.  However it
> returns times in the Millisecond range.  You either
> need to fix it up to return Milliseconds or use a
> different procedure that returns time in the
> Microsecond range ( such as QueryPerforamnceCounter())
> 
> this is the routine from xvid_bench.c that I am
> talking about.
> 
> /* returns time in micro-s*/
> double gettime_usec()
> {    
> #ifndef WIN32
> 	struct timeval  tv;
> 	gettimeofday(&tv, 0);
> 	return tv.tv_sec*1.0e6 + tv.tv_usec;
> #else
> 	clock_t clk;
> 	clk = clock();
> 	return clk * 1000000 / CLOCKS_PER_SEC;
> #endif
> }

	Fix commit in cvs HEAD, thanks! Please check it's ok now.

-Skal




More information about the XviD-devel mailing list