summaryrefslogtreecommitdiff
path: root/libswresample/x86/audio_convert.asm
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-28 13:01:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-28 13:15:44 +0200
commitfa5daaca0d6ffcfaa9e9d19089910ee7ebf9a8b7 (patch)
tree10688034a669c26a59a4371864b0f4dcd5e2da49 /libswresample/x86/audio_convert.asm
parentbcc66ff0e4ba50033804aaaf0eb1f92aab959c80 (diff)
swr: seperate functions for aligned & unaligned
If someone has an idea on how to do this cleaner, its welcome Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/x86/audio_convert.asm')
-rw-r--r--libswresample/x86/audio_convert.asm22
1 files changed, 16 insertions, 6 deletions
diff --git a/libswresample/x86/audio_convert.asm b/libswresample/x86/audio_convert.asm
index c7ce8c6c53..d98c35cf5d 100644
--- a/libswresample/x86/audio_convert.asm
+++ b/libswresample/x86/audio_convert.asm
@@ -23,18 +23,26 @@
SECTION .text
-%macro INT16_TO_INT32 0
+%macro INT16_TO_INT32 1
cglobal int16_to_int32_%1, 3, 3, 0, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+%ifidn %1, a
+ test dstq, mmsize-1
+ jne int16_to_int32_u_int %+ SUFFIX
+ test srcq, mmsize-1
+ jne int16_to_int32_u_int %+ SUFFIX
+%else
+int16_to_int32_u_int %+ SUFFIX
+%endif
.next
- movu m4, [srcq]
+ mov%1 m4, [srcq]
pxor m0, m0
pxor m1, m1
punpcklwd m0, m4
punpckhwd m1, m4
- movu [ dstq], m0
- movu [mmsize + dstq], m1
+ mov%1 [ dstq], m0
+ mov%1 [mmsize + dstq], m1
add srcq, mmsize
add dstq, 2*mmsize
sub lenq, 2*mmsize
@@ -46,7 +54,9 @@ cglobal int16_to_int32_%1, 3, 3, 0, dst, src, len
%endmacro
INIT_MMX mmx
-INT16_TO_INT32
+INT16_TO_INT32 u
+INT16_TO_INT32 a
INIT_XMM sse
-INT16_TO_INT32
+INT16_TO_INT32 u
+INT16_TO_INT32 a