summaryrefslogtreecommitdiff
path: root/libswresample
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-05-05 18:30:17 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-05-05 18:32:34 +0200
commite8dd7928c893c3d76b09a67e2acccc2630b4b32b (patch)
tree4dc52285deed38d78eef48653750adfa8ac27ea0 /libswresample
parent3db6093244f46f580b2c1857179580e312b52954 (diff)
swr: change simd len argument to be in samples instead of dst bytes.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r--libswresample/audioconvert.c2
-rw-r--r--libswresample/x86/audio_convert.asm6
2 files changed, 7 insertions, 1 deletions
diff --git a/libswresample/audioconvert.c b/libswresample/audioconvert.c
index 1cdd80f810..04e33c511d 100644
--- a/libswresample/audioconvert.c
+++ b/libswresample/audioconvert.c
@@ -160,7 +160,7 @@ int swri_audio_convert(AudioConvert *ctx, AudioData *out, AudioData *in, int len
av_assert1(off>=0);
if(off>0)
for(ch=0; ch<planes; ch++){
- ctx->simd_f(out->ch+ch, in->ch+ch, off*os);
+ ctx->simd_f(out->ch+ch, in->ch+ch, off * (out->planar ? 1 :out->ch_count));
}
av_assert1(off<=len);
if(off == len)
diff --git a/libswresample/x86/audio_convert.asm b/libswresample/x86/audio_convert.asm
index 4973b5ce39..31723529e4 100644
--- a/libswresample/x86/audio_convert.asm
+++ b/libswresample/x86/audio_convert.asm
@@ -33,6 +33,7 @@ SECTION .text
cglobal int16_to_int32_%1, 3, 3, 3, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+ shl lenq, 2
%ifidn %1, a
test dstq, mmsize-1
jne int16_to_int32_u_int %+ SUFFIX
@@ -65,6 +66,7 @@ int16_to_int32_u_int %+ SUFFIX
cglobal int32_to_float_%1, 3, 3, 3, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+ shl lenq, 2
%ifidn %1, a
test dstq, mmsize-1
jne int32_to_float_u_int %+ SUFFIX
@@ -100,6 +102,7 @@ int32_to_float_u_int %+ SUFFIX
cglobal int16_to_float_%1, 3, 3, 4, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+ shl lenq, 2
%ifidn %1, a
test dstq, mmsize-1
jne int16_to_float_u_int %+ SUFFIX
@@ -134,6 +137,7 @@ int16_to_float_u_int %+ SUFFIX
cglobal float_to_int32_%1, 3, 3, 5, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+ shl lenq, 2
%ifidn %1, a
test dstq, mmsize-1
jne float_to_int32_u_int %+ SUFFIX
@@ -168,6 +172,7 @@ float_to_int32_u_int %+ SUFFIX
cglobal float_to_int16_%1, 3, 3, 3, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+ add lenq , lenq
%ifidn %1, a
test dstq, mmsize-1
jne float_to_int16_u_int %+ SUFFIX
@@ -198,6 +203,7 @@ float_to_int16_u_int %+ SUFFIX
cglobal int32_to_int16_%1, 3, 3, 2, dst, src, len
mov srcq, [srcq]
mov dstq, [dstq]
+ add lenq , lenq
%ifidn %1, a
test dstq, mmsize-1
jne int32_to_int16_u_int %+ SUFFIX