diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 12:59:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 17:25:52 +0200 |
commit | adfa53b91f675e71d4b6049db91b357ed51fff12 (patch) | |
tree | 720366df164e9a80ce24e0d525ed41a78055ed07 | |
parent | d1ac8e10340f30b6989cfd64ed1f91dae5a54e2d (diff) | |
download | ffmpeg-streaming-adfa53b91f675e71d4b6049db91b357ed51fff12.zip ffmpeg-streaming-adfa53b91f675e71d4b6049db91b357ed51fff12.tar.gz |
swr-x86-SIMD: 3 instructions less for stereo planar->packed s32/flt->s16
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswresample/x86/audio_convert.asm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/libswresample/x86/audio_convert.asm b/libswresample/x86/audio_convert.asm index 0f2d503..f72e4ff 100644 --- a/libswresample/x86/audio_convert.asm +++ b/libswresample/x86/audio_convert.asm @@ -52,6 +52,7 @@ pack_2ch_%2_to_%1_u_int %+ SUFFIX neg lenq %7 .next: +%if %4 >= %5 mov%3 m0, [ srcq +(1<<%5)*lenq] mova m1, m0 mov%3 m2, [ src2q+(1<<%5)*lenq] @@ -62,14 +63,18 @@ pack_2ch_%2_to_%1_u_int %+ SUFFIX punpckldq m0, m2 punpckhdq m1, m2 %endif -%if %4 < %5 - mov%3 m2, [mmsize + srcq +(1<<%5)*lenq] - mova m3, m2 - mov%3 m4, [mmsize + src2q+(1<<%5)*lenq] - punpckldq m2, m4 - punpckhdq m3, m4 -%endif %6 +%else + mov%3 m0, [ srcq +(1<<%5)*lenq] + mov%3 m1, [mmsize + srcq +(1<<%5)*lenq] + mov%3 m2, [ src2q+(1<<%5)*lenq] + mov%3 m3, [mmsize + src2q+(1<<%5)*lenq] + %6 + mova m2, m0 + punpcklwd m0, m1 + punpckhwd m2, m1 + SWAP 1,2 +%endif mov%3 [ dstq+(2<<%4)*lenq], m0 mov%3 [ mmsize + dstq+(2<<%4)*lenq], m1 %if %4 > %5 |