00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <stdint.h>
00020
00021 #include "config.h"
00022 #include "libavutil/attributes.h"
00023 #include "libavutil/cpu.h"
00024 #include "libavutil/arm/cpu.h"
00025 #include "libavutil/samplefmt.h"
00026 #include "libavresample/audio_convert.h"
00027
00028 void ff_conv_flt_to_s16_neon(int16_t *dst, const float *src, int len);
00029 void ff_conv_fltp_to_s16_neon(int16_t *dst, float *const *src,
00030 int len, int channels);
00031 void ff_conv_fltp_to_s16_2ch_neon(int16_t *dst, float *const *src,
00032 int len, int channels);
00033
00034 av_cold void ff_audio_convert_init_arm(AudioConvert *ac)
00035 {
00036 int cpu_flags = av_get_cpu_flags();
00037
00038 if (have_neon(cpu_flags)) {
00039 ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLT,
00040 0, 16, 8, "NEON",
00041 ff_conv_flt_to_s16_neon);
00042 ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP,
00043 0, 16, 8, "NEON",
00044 ff_conv_fltp_to_s16_neon);
00045 ff_audio_convert_set_func(ac, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_FLTP,
00046 2, 16, 8, "NEON",
00047 ff_conv_fltp_to_s16_2ch_neon);
00048 }
00049 }