summaryrefslogtreecommitdiff
path: root/libavcodec/x86/dsputil_yasm.asm
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-12 02:50:25 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-12 02:50:25 +0100
commit29582df797745fa6c5eec22b007e4fd3a47e7dd9 (patch)
tree59c487e218e4f750b48151d548db9091236d096f /libavcodec/x86/dsputil_yasm.asm
parent6761b6b825c4aafff311a180a09c7013288480aa (diff)
parent29ae0565d98bb41e54fc74f74c330d3214825f47 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vble: remove vble_error_close VBLE Decoder tta: use an integer instead of a pointer to iterate output samples shorten: do not modify samples pointer when interleaving mpc7: only support stereo input. dpcm: do not try to decode empty packets dpcm: remove unneeded buf_size==0 check. twinvq: add SSE/AVX optimized sum/difference stereo interleaving vqf/twinvq: pass vqf COMM chunk info in extradata vqf: do not set bits_per_coded_sample for TwinVQ. twinvq: check for allocation failure in init_mdct_win() swscale: add padding to conversion buffer. rtpdec: Simplify finalize_packet http: Handle proxy authentication http: Print an error message for Authorization Required, too AVOptions: don't return an invalid option when option list is empty AIFF: add 'twos' FourCC for the mux/demuxer (big endian PCM audio) Conflicts: libavcodec/avcodec.h libavcodec/tta.c libavcodec/vble.c libavcodec/version.h libavutil/opt.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/dsputil_yasm.asm')
-rw-r--r--libavcodec/x86/dsputil_yasm.asm48
1 files changed, 48 insertions, 0 deletions
diff --git a/libavcodec/x86/dsputil_yasm.asm b/libavcodec/x86/dsputil_yasm.asm
index 82678f1880..0e497c9cda 100644
--- a/libavcodec/x86/dsputil_yasm.asm
+++ b/libavcodec/x86/dsputil_yasm.asm
@@ -1129,3 +1129,51 @@ VECTOR_CLIP_INT32 11, 1, 1, 0
%else
VECTOR_CLIP_INT32 6, 1, 0, 0
%endif
+
+;-----------------------------------------------------------------------------
+; void ff_butterflies_float_interleave(float *dst, const float *src0,
+; const float *src1, int len);
+;-----------------------------------------------------------------------------
+
+%macro BUTTERFLIES_FLOAT_INTERLEAVE 0
+cglobal butterflies_float_interleave, 4,4,3, dst, src0, src1, len
+%ifdef ARCH_X86_64
+ movsxd lenq, lend
+%endif
+ test lenq, lenq
+ jz .end
+ shl lenq, 2
+ lea src0q, [src0q + lenq]
+ lea src1q, [src1q + lenq]
+ lea dstq, [ dstq + 2*lenq]
+ neg lenq
+.loop:
+ mova m0, [src0q + lenq]
+ mova m1, [src1q + lenq]
+ subps m2, m0, m1
+ addps m0, m0, m1
+ unpcklps m1, m0, m2
+ unpckhps m0, m0, m2
+%if cpuflag(avx)
+ vextractf128 [dstq + 2*lenq ], m1, 0
+ vextractf128 [dstq + 2*lenq + 16], m0, 0
+ vextractf128 [dstq + 2*lenq + 32], m1, 1
+ vextractf128 [dstq + 2*lenq + 48], m0, 1
+%else
+ mova [dstq + 2*lenq ], m1
+ mova [dstq + 2*lenq + mmsize], m0
+%endif
+ add lenq, mmsize
+ jl .loop
+%if mmsize == 32
+ vzeroupper
+ RET
+%endif
+.end:
+ REP_RET
+%endmacro
+
+INIT_XMM sse
+BUTTERFLIES_FLOAT_INTERLEAVE
+INIT_YMM avx
+BUTTERFLIES_FLOAT_INTERLEAVE