[Mplayer-cvslog] CVS: main/mp3lib test.c,1.3,1.4

Alex Beregszaszi alex at mplayerhq.hu
Fri Jul 4 23:38:21 CEST 2003


Update of /cvsroot/mplayer/main/mp3lib
In directory mail:/var/tmp.root/cvs-serv10610

Modified Files:
	test.c 
Log Message:
getcpucaps support

Index: test.c
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- test.c	17 May 2001 18:20:14 -0000	1.3
+++ test.c	4 Jul 2003 21:38:17 -0000	1.4
@@ -12,6 +12,9 @@
 #include "mp3lib/mp3.h"
 #include "config.h"
 
+#include "../cpudetect.h"
+extern CpuCaps gCpuCaps;
+
 static inline unsigned int GetTimer(){
   struct timeval tv;
   struct timezone tz;
@@ -42,6 +45,8 @@
   
   mp3file=fopen((argc>1)?argv[1]:"test.mp3","rb");
   if(!mp3file){  printf("file not found\n");  exit(1); }
+  
+  GetCpuCaps(&gCpuCaps);
 
   // MPEG Audio:
 #ifdef USE_FAKE_MONO
@@ -64,7 +69,7 @@
   length=(float)total/(float)(MP3_samplerate*MP3_channels*2);
   printf("\nDecoding time: %8.6f\n",(float)time1*0.000001f);
   printf("Uncompressed size: %d bytes  (%8.3f secs)\n",total,length);
-  printf("CPU usage at normal playback: %5.2f %\n",time1*0.0001f/length);
+  printf("CPU usage at normal playback: %5.2f %%\n",time1*0.0001f/length);
   
   fclose(mp3file);
   



More information about the MPlayer-cvslog mailing list