[FFmpeg-cvslog] r9998 - in trunk: configure libavutil/common.h

romansh subversion
Thu Aug 9 02:12:41 CEST 2007


Author: romansh
Date: Thu Aug  9 02:12:40 2007
New Revision: 9998

Log:
  * Making [START|STOP]_TIMER work on architectures that support gethrtime()



Modified:
   trunk/configure
   trunk/libavutil/common.h

Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Thu Aug  9 02:12:40 2007
@@ -687,6 +687,7 @@ HAVE_LIST="
     malloc_h
     memalign
     mkstemp
+    gethrtime
     mlib
     ppc64
     sdl
@@ -1531,6 +1532,7 @@ fi
 check_header byteswap.h
 
 check_func mkstemp
+check_func gethrtime
 
 check_header termios.h
 check_header conio.h

Modified: trunk/libavutil/common.h
==============================================================================
--- trunk/libavutil/common.h	(original)
+++ trunk/libavutil/common.h	Thu Aug  9 02:12:40 2007
@@ -268,6 +268,7 @@ static inline int ff_get_fourcc(const ch
     }
 
 #if defined(ARCH_X86) || defined(ARCH_POWERPC) || defined(ARCH_BFIN)
+#define AV_READ_TIME read_time
 #if defined(ARCH_X86_64)
 static inline uint64_t read_time(void)
 {
@@ -319,13 +320,17 @@ static inline uint64_t read_time(void)
      return (((uint64_t)tbu)<<32) | (uint64_t)tbl;
 }
 #endif
+#elif defined(HAVE_GETHRTIME)
+#define AV_READ_TIME gethrtime
+#endif
 
+#ifdef AV_READ_TIME
 #define START_TIMER \
 uint64_t tend;\
-uint64_t tstart= read_time();\
+uint64_t tstart= AV_READ_TIME();\
 
 #define STOP_TIMER(id) \
-tend= read_time();\
+tend= AV_READ_TIME();\
 {\
   static uint64_t tsum=0;\
   static int tcount=0;\




More information about the ffmpeg-cvslog mailing list