diff options
author | Måns Rullgård <mans@mansr.com> | 2008-07-15 19:06:29 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-07-15 19:06:29 +0000 |
commit | 6865e04620fa14eada30866cd8efbcbd9157537b (patch) | |
tree | 4af3274cdab8a40af4641bf07677fc7244f911cd /libavcodec/armv4l/mathops.h | |
parent | 7995962d4b23619e4cc52b4466f85488749bc718 (diff) | |
download | ffmpeg-6865e04620fa14eada30866cd8efbcbd9157537b.tar.gz |
ARM: optimised MUL64
Originally committed as revision 14244 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/armv4l/mathops.h')
-rw-r--r-- | libavcodec/armv4l/mathops.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/armv4l/mathops.h b/libavcodec/armv4l/mathops.h index dd53310683..e42cefb430 100644 --- a/libavcodec/armv4l/mathops.h +++ b/libavcodec/armv4l/mathops.h @@ -48,6 +48,15 @@ static inline av_const int MULH(int a, int b) hi; }) #endif +static inline av_const int64_t MUL64(int a, int b) +{ + union { uint64_t x; unsigned hl[2]; } x; + asm ("smull %0, %1, %2, %3" + : "=r"(x.hl[0]), "=r"(x.hl[1]) : "r"(a), "r"(b)); + return x.x; +} +#define MUL64 MUL64 + #if defined(HAVE_ARMV5TE) /* signed 16x16 -> 32 multiply add accumulate */ |