diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 14:59:59 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-06 19:25:52 +0400 |
commit | adfa53b91f675e71d4b6049db91b357ed51fff12 (patch) | |
tree | 720366df164e9a80ce24e0d525ed41a78055ed07 /libswresample/x86 | |
parent | d1ac8e10340f30b6989cfd64ed1f91dae5a54e2d (diff) |
swr-x86-SIMD: 3 instructions less for stereo planar->packed s32/flt->s16
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/x86')
-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 0f2d503fb0..f72e4ff199 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 |