[Mplayer-cvslog] CVS: main cpudetect.c,1.31,1.32 cputable.h,1.6,1.7
Arpi
arpi at thot.banki.hu
Tue Dec 16 22:53:43 CET 2003
Hi,
.csikam, ezt ugye te se gondoltad komolyan???
> Update of /cvsroot/mplayer/main
> In directory mail:/var/tmp.root/cvs-serv16217
>
> Modified Files:
> cpudetect.c cputable.h
> Log Message:
>
>
> precise P4 and cpu speed detect
>
> Index: cpudetect.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/cpudetect.c,v
> retrieving revision 1.31
> retrieving revision 1.32
> diff -u -r1.31 -r1.32
> --- cpudetect.c 28 Sep 2003 01:45:54 -0000 1.31
> +++ cpudetect.c 16 Dec 2003 13:35:01 -0000 1.32
> @@ -222,14 +222,19 @@
> {
> unsigned long long int tscstart, tscstop;
> unsigned int start, stop;
> + int i;
> + double total = 0.0;
>
> - tscstart = rdtsc();
> - start = GetTimer();
> - usec_sleep(50000);
> - stop = GetTimer();
> - tscstop = rdtsc();
> -
> - return((tscstop-tscstart)/((stop-start)/1000.0));
> + for ( i=0;i < 10;i++ )
> + {
> + tscstart = rdtsc();
> + start = GetTimer();
> + usec_sleep(50000);
> + stop = GetTimer();
> + tscstop = rdtsc();
> + total+=((tscstop-tscstart)/((stop-start)/1000.0));
> + }
> + return total / 10;
> }
>
>
>
> Index: cputable.h
> ===================================================================
> RCS file: /cvsroot/mplayer/main/cputable.h,v
> retrieving revision 1.6
> retrieving revision 1.7
> diff -u -r1.6 -r1.7
> --- cputable.h 26 Sep 2003 22:51:38 -0000 1.6
> +++ cputable.h 16 Dec 2003 13:35:01 -0000 1.7
> @@ -119,10 +119,10 @@
> /* D */ F_UNKNOWN,
> /* E */ F_UNKNOWN,
> /* F extended family (P4/new IA-64)*/ {
> - /* 0 */ "Pentium 4/Xeon Willamette",
> - /* 1 */ "Pentium 4/Xeon/Celeron Foster",
> - /* 2 */ "Pentium 4/Xeon/Celeron Northwood",
> - /* 3 */ N_UNKNOWN,
> + /* 0 */ N_UNKNOWN,
> + /* 1 */ "Pentium 4/Xeon Willamette",
> + /* 2 */ "Pentium 4/Xeon/Celeron Foster",
> + /* 3 */ "Pentium 4/Xeon/Celeron Northwood",
> /* 4 */ N_UNKNOWN,
> /* 5 */ N_UNKNOWN,
> /* 6 */ N_UNKNOWN,
>
> _______________________________________________
> Mplayer-cvslog mailing list
> Mplayer-cvslog at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-cvslog
>
>
A'rpi / Astral & ESP-team
--
Developer of MPlayer G2, the Movie Framework for all - http://www.MPlayerHQ.hu
More information about the MPlayer-cvslog
mailing list