Re: [libav-devel] [PATCH] lavu/timer: Use Intel's intrinsic header for rdtsc

2013-09-23 Thread Diego Biurrun
On Sun, Sep 22, 2013 at 09:51:57AM -0400, Alex Smith wrote:
 On Sun, Sep 22, 2013 at 9:40 AM, Luca Barbato lu_z...@gentoo.org wrote:
  On 22/09/13 15:35, Alex Smith wrote:
  Maybe it has some Intel (ricer) magic?
 
  Is it needed or just nice to have?
 
  (the tag: should be either lavu: or timer:)
 
 Well you can use either, one is simply the way provided by Intel's own 
 headers,
 the other is msvc/mingw (in this case).  It's probably a stupid idea, perhaps
 more proper(?) but likely stupid.

I'm sceptical as long as there is no real gain provided by this.

Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] lavu/timer: Use Intel's intrinsic header for rdtsc

2013-09-22 Thread Alex Smith
Maybe it has some Intel (ricer) magic?
---
 libavutil/x86/timer.h | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavutil/x86/timer.h b/libavutil/x86/timer.h
index cdd67dd..4e744ca 100644
--- a/libavutil/x86/timer.h
+++ b/libavutil/x86/timer.h
@@ -36,8 +36,13 @@ static inline uint64_t read_time(void)
 
 #elif HAVE_RDTSC
 
-#include intrin.h
-#define AV_READ_TIME __rdtsc
+#if defined(__INTEL_COMPILER)
+#   include immintrin.h
+#   define AV_READ_TIME _rdtsc
+#else
+#   include intrin.h
+#   define AV_READ_TIME __rdtsc
+#endif
 
 #endif /* HAVE_INLINE_ASM */
 
-- 
1.8.4.msysgit.0

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] lavu/timer: Use Intel's intrinsic header for rdtsc

2013-09-22 Thread Luca Barbato
On 22/09/13 15:35, Alex Smith wrote:
 Maybe it has some Intel (ricer) magic?

Is it needed or just nice to have?

(the tag: should be either lavu: or timer:)

lu
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] lavu/timer: Use Intel's intrinsic header for rdtsc

2013-09-22 Thread Alex Smith
On Sun, Sep 22, 2013 at 9:40 AM, Luca Barbato lu_z...@gentoo.org wrote:
 On 22/09/13 15:35, Alex Smith wrote:
 Maybe it has some Intel (ricer) magic?

 Is it needed or just nice to have?

 (the tag: should be either lavu: or timer:)

 lu

Well you can use either, one is simply the way provided by Intel's own headers,
the other is msvc/mingw (in this case).  It's probably a stupid idea, perhaps
more proper(?) but likely stupid.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel