summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-08-22 12:07:02 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-08-22 12:07:02 +0000
commitf617adedc8766ad7bccb4b996a943ef7fcb7796f (patch)
tree879c93882f143e2915484f6954b68c55a15dcae5 /libavcodec/mpegaudiodec.c
parent47a0cd7408336716c18126ea65564b884c4ad2dd (diff)
replace MULL with asm too, no significnat speedup but its probably better to not take any chances, some versions of gcc will almost certainly mess it up too if they can
Originally committed as revision 6049 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegaudiodec.c')
-rw-r--r--libavcodec/mpegaudiodec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index 5ad8c69a52..55276e3b58 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -44,7 +44,13 @@
#define FRAC_ONE (1 << FRAC_BITS)
#ifdef ARCH_X86
-# define MULL(a,b) (((int64_t)(a) * (int64_t)(b)) >> FRAC_BITS)
+# define MULL(ra, rb) \
+ ({ int rt, dummy; asm (\
+ "imull %3 \n\t"\
+ "shrdl %4, %%edx, %%eax \n\t"\
+ : "=a"(rt), "=d"(dummy)\
+ : "a" (ra), "rm" (rb), "i"(FRAC_BITS));\
+ rt; })
# define MUL64(ra, rb) \
({ int64_t rt; asm ("imull %2\n\t" : "=A"(rt) : "a" (ra), "g" (rb)); rt; })
# define MULH(ra, rb) \