diff options
author | Muhammad Faiz <mfcc64@gmail.com> | 2017-03-16 11:33:16 +0700 |
---|---|---|
committer | Muhammad Faiz <mfcc64@gmail.com> | 2017-03-19 12:24:41 +0700 |
commit | de1308429ae649c899b74365f0dc72847676ba75 (patch) | |
tree | f3072f9c6af39f6fbaa110452cfa8afba1a20887 /libswresample/x86/resample.asm | |
parent | 3d5c2169e44e98de1589c13d593f62c1b73cf94e (diff) |
swresample/x86/resample: extend resample_double to support avx and fma3
benchmark:
sse2 10.670s
avx 8.763s
fma3 8.380s
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
Diffstat (limited to 'libswresample/x86/resample.asm')
-rw-r--r-- | libswresample/x86/resample.asm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libswresample/x86/resample.asm b/libswresample/x86/resample.asm index 4163df1aa1..7107cf9d42 100644 --- a/libswresample/x86/resample.asm +++ b/libswresample/x86/resample.asm @@ -203,7 +203,7 @@ cglobal resample_common_%1, 1, 7, 2, ctx, phase_count, dst, frac, \ ; horizontal sum & store %if mmsize == 32 vextractf128 xm1, m0, 0x1 - addps xm0, xm1 + addp%4 xm0, xm1 %endif movhlps xm1, xm0 %ifidn %1, float @@ -489,8 +489,8 @@ cglobal resample_linear_%1, 1, 7, 5, ctx, min_filter_length_x4, filter2, \ %if mmsize == 32 vextractf128 xm1, m0, 0x1 vextractf128 xm3, m2, 0x1 - addps xm0, xm1 - addps xm2, xm3 + addp%4 xm0, xm1 + addp%4 xm2, xm3 %endif cvtsi2s%4 xm1, fracd subp%4 xm2, xm0 @@ -608,3 +608,12 @@ RESAMPLE_FNS int16, 2, 1 INIT_XMM sse2 RESAMPLE_FNS double, 8, 3, d, pdbl_1 + +%if HAVE_AVX_EXTERNAL +INIT_YMM avx +RESAMPLE_FNS double, 8, 3, d, pdbl_1 +%endif +%if HAVE_FMA3_EXTERNAL +INIT_YMM fma3 +RESAMPLE_FNS double, 8, 3, d, pdbl_1 +%endif |