diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-05-02 16:27:11 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-08-23 20:10:56 -0400 |
commit | d5b4e50c47276c6058fb779e1935c6ceaec5ed6a (patch) | |
tree | b76b1395e575bcb4f2a3241557dc7cfe49166013 /libavresample/x86/audio_convert_init.c | |
parent | a58a013980b976e767994f8964b7cd7e2097dc53 (diff) | |
download | ffmpeg-d5b4e50c47276c6058fb779e1935c6ceaec5ed6a.tar.gz |
lavr: x86: optimized 6-channel fltp to s16 conversion
Diffstat (limited to 'libavresample/x86/audio_convert_init.c')
-rw-r--r-- | libavresample/x86/audio_convert_init.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libavresample/x86/audio_convert_init.c b/libavresample/x86/audio_convert_init.c index 3098658949..51e51f5762 100644 --- a/libavresample/x86/audio_convert_init.c +++ b/libavresample/x86/audio_convert_init.c @@ -71,6 +71,13 @@ extern void ff_conv_fltp_to_s16_2ch_sse2 (int16_t *dst, float *const *src, extern void ff_conv_fltp_to_s16_2ch_ssse3(int16_t *dst, float *const *src, int len, int channels); +extern void ff_conv_fltp_to_s16_6ch_sse (int16_t *dst, float *const *src, + int len, int channels); +extern void ff_conv_fltp_to_s16_6ch_sse2(int16_t *dst, float *const *src, + int len, int channels); +extern void ff_conv_fltp_to_s16_6ch_avx (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, @@ -89,12 +96,18 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac) ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, 6, 1, 4, "MMX", ff_conv_fltp_to_flt_6ch_mmx); } + if (mm_flags & AV_CPU_FLAG_SSE && HAVE_SSE) { + ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, + 6, 1, 2, "SSE", ff_conv_fltp_to_s16_6ch_sse); + } if (mm_flags & AV_CPU_FLAG_SSE2 && HAVE_SSE) { if (!(mm_flags & AV_CPU_FLAG_SSE2SLOW)) { ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, 0, 16, 16, "SSE2", ff_conv_s32_to_s16_sse2); ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, 6, 16, 8, "SSE2", ff_conv_s16p_to_s16_6ch_sse2); + ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, + 6, 16, 4, "SSE2", ff_conv_fltp_to_s16_6ch_sse2); } else { ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, 6, 1, 4, "SSE2SLOW", ff_conv_s16p_to_s16_6ch_sse2slow); @@ -143,6 +156,8 @@ av_cold void ff_audio_convert_init_x86(AudioConvert *ac) 2, 16, 8, "AVX", ff_conv_s16p_to_flt_2ch_avx); ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16P, 6, 16, 4, "AVX", ff_conv_s16p_to_flt_6ch_avx); + ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP, + 6, 16, 4, "AVX", ff_conv_fltp_to_s16_6ch_avx); ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, 6, 16, 4, "AVX", ff_conv_fltp_to_flt_6ch_avx); } |