[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 851, Sat Feb 15 15:22:19 2003 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.0e6 + 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 */

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

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