changeset 3601:99a352dc1601 libavcodec

make high precission synth filter 3 times faster on x86
author michael
date Tue, 22 Aug 2006 11:11:04 +0000
parents 949219039897
children 38b7b3629249
files mpegaudiodec.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mpegaudiodec.c	Tue Aug 22 06:24:59 2006 +0000
+++ b/mpegaudiodec.c	Tue Aug 22 11:11:04 2006 +0000
@@ -784,8 +784,13 @@
     return sum1;
 }
 
+#ifdef ARCH_X86
+/* ask gcc devels why this is 3 times faster then the generic code below */
+#define MULS(ra, rb) \
+    ({ int64_t rt; asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb)); rt; })
+#else
 #define MULS(ra, rb) MUL64(ra, rb)
-
+#endif
 #endif
 
 #define SUM8(sum, op, w, p) \