---
libavresample/x86/audio_convert.asm | 29 +++++++++++++++++++++++++++++
libavresample/x86/audio_convert_init.c | 5 +++++
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/libavresample/x86/audio_convert.asm
b/libavresample/x86/audio_convert.asm
index 0409729..8d352a2 100644
--- a/libavresample/x86/audio_convert.asm
+++ b/libavresample/x86/audio_convert.asm
@@ -446,6 +446,35 @@ cglobal conv_s16p_to_flt_6ch, 2,8,8, dst, src, src1, src2,
src3, src4, src5, len
jg .loop
REP_RET
+;------------------------------------------------------------------------------
+; void ff_conv_fltp_to_s16_2ch(int16_t *dst, float *const *src, int len,
+; int channels);
+;------------------------------------------------------------------------------
+
+INIT_XMM sse2
+cglobal conv_fltp_to_s16_2ch, 3,4,3, dst, src0, len, src1
+ lea lenq, [4*lend]
+ mov src1q, [src0q+gprsize]
+ mov src0q, [src0q ]
+ add dstq, lenq
+ add src0q, lenq
+ add src1q, lenq
+ neg lenq
+ mova m2, [pf_s16_scale]
+ ALIGN 16
+.loop:
+ mulps m0, m2, [src0q+lenq]
+ mulps m1, m2, [src1q+lenq]
+ cvtps2dq m0, m0
+ cvtps2dq m1, m1
+ packssdw m0, m1
+ movhlps m1, m0
+ punpcklwd m0, m1
+ mova [dstq+lenq], m0
+ add lenq, mmsize
+ js .loop
+ REP_RET
+
;-----------------------------------------------------------------------------
; void ff_conv_fltp_to_flt_6ch(float *dst, float *const *src, int len,
; int channels);
diff --git a/libavresample/x86/audio_convert_init.c
b/libavresample/x86/audio_convert_init.c
index 5ad54fc..178cbba 100644
--- a/libavresample/x86/audio_convert_init.c
+++ b/libavresample/x86/audio_convert_init.c
@@ -54,6 +54,9 @@ extern void ff_conv_s16p_to_flt_2ch_sse2(float *dst, int16_t
*const *src,
extern void ff_conv_s16p_to_flt_6ch_sse2(float *dst, int16_t *const *src,
int len, int channels);
+extern void ff_conv_fltp_to_s16_2ch_sse2(int16_t *dst, float *const *src,
+ int len, int channels);
+
extern void ff_conv_fltp_to_flt_6ch_mmx (float *dst, float *const *src, int
len,
int channels);
extern void ff_conv_fltp_to_flt_6ch_sse4(float *dst, float *const *src, int
len,
@@ -95,6 +98,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac)
2, 16, 8, "SSE2",
ff_conv_s16p_to_flt_2ch_sse2);
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P,
6, 16, 4, "SSE2",
ff_conv_s16p_to_flt_6ch_sse2);
+ ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP,
+ 2, 16, 4, "SSE2",
ff_conv_fltp_to_s16_2ch_sse2);
}
if (mm_flags & AV_CPU_FLAG_SSE4 && HAVE_SSE) {
ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16,
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel