[svn] / trunk / xvidcore / examples / xvid_bench.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/examples/xvid_bench.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 262, Sun Jul 7 09:45:40 2002 UTC revision 860, Sun Feb 16 05:11:39 2003 UTC
# Line 35  Line 35 
35    
36  #include <stdio.h>  #include <stdio.h>
37  #include <stdlib.h>  #include <stdlib.h>
 #include <sys/time.h>  // for gettimeofday  
38  #include <string.h>    // for memset  #include <string.h>    // for memset
39  #include <assert.h>  #include <assert.h>
40    
41    #ifndef WIN32
42    #include <sys/time.h>   // for gettimeofday
43    #else
44    #include <time.h>
45    #endif
46    
47    
48  #include "xvid.h"  #include "xvid.h"
49    
50  // inner guts  // inner guts
# Line 56  Line 62 
62  #include "bitstream/cbp.h"  #include "bitstream/cbp.h"
63    
64  #include <math.h>  #include <math.h>
65    
66    #ifndef M_PI
67    #define M_PI            3.14159265358979323846
68    #endif
69    
70  const int speed_ref = 100;  // on slow machines, decrease this value  const int speed_ref = 100;  // on slow machines, decrease this value
71    
72  /*********************************************************************  /*********************************************************************
# Line 65  Line 76 
76   /* returns time in micro-s*/   /* returns time in micro-s*/
77  double gettime_usec()  double gettime_usec()
78  {  {
79    #ifndef WIN32
80    struct timeval  tv;    struct timeval  tv;
81    gettimeofday(&tv, 0);    gettimeofday(&tv, 0);
82    return tv.tv_sec*1.0e6f + tv.tv_usec;    return tv.tv_sec*1.0e6 + tv.tv_usec;
83    #else
84            clock_t clk;
85            clk = clock();
86            return clk * 1000000 / CLOCKS_PER_SEC;
87    #endif
88  }  }
89    
90   /* returns squared deviates (mean(v*v)-mean(v)^2) of a 8x8 block */   /* returns squared deviates (mean(v*v)-mean(v)^2) of a 8x8 block */
# Line 102  Line 119 
119  , { "SSE2  ", XVID_CPU_SSE2 | XVID_CPU_MMX }  , { "SSE2  ", XVID_CPU_SSE2 | XVID_CPU_MMX }
120  , { "3DNOW ", XVID_CPU_3DNOW }  , { "3DNOW ", XVID_CPU_3DNOW }
121  , { "3DNOWE", XVID_CPU_3DNOWEXT }  , { "3DNOWE", XVID_CPU_3DNOWEXT }
122    , { "IA64  ", XVID_CPU_IA64 }
123  //, { "TSC   ", XVID_CPU_TSC }  //, { "TSC   ", XVID_CPU_TSC }
124  , { 0, 0 } }  , { 0, 0 } }
125    
# Line 109  Line 127 
127  { { "PLAINC", 0 }  { { "PLAINC", 0 }
128  , { "MMX   ", XVID_CPU_MMX }  , { "MMX   ", XVID_CPU_MMX }
129  //, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX }  //, { "MMXEXT", XVID_CPU_MMXEXT | XVID_CPU_MMX }
130    , { "IA64  ", XVID_CPU_IA64 }
131  , { 0, 0 } }  , { 0, 0 } }
132    
133  , cpu_short_list2[] =  , cpu_short_list2[] =

Legend:
Removed from v.262  
changed lines
  Added in v.860

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4