27 int out_ch,
int in_ch);
29 int out_ch,
int in_ch);
32 int out_ch,
int in_ch);
34 int out_ch,
int in_ch);
37 int len,
int out_ch,
int in_ch);
40 int out_ch,
int in_ch);
42 int out_ch,
int in_ch);
45 int out_ch,
int in_ch);
47 int out_ch,
int in_ch);
49 int out_ch,
int in_ch);
51 #define DEFINE_MIX_3_8_TO_1_2(chan) \
52 void ff_mix_ ## chan ## _to_1_fltp_flt_sse(float **src, \
53 float **matrix, int len, \
54 int out_ch, int in_ch); \
55 void ff_mix_ ## chan ## _to_2_fltp_flt_sse(float **src, \
56 float **matrix, int len, \
57 int out_ch, int in_ch); \
59 void ff_mix_ ## chan ## _to_1_s16p_flt_sse2(int16_t **src, \
60 float **matrix, int len, \
61 int out_ch, int in_ch); \
62 void ff_mix_ ## chan ## _to_2_s16p_flt_sse2(int16_t **src, \
63 float **matrix, int len, \
64 int out_ch, int in_ch); \
66 void ff_mix_ ## chan ## _to_1_s16p_flt_sse4(int16_t **src, \
67 float **matrix, int len, \
68 int out_ch, int in_ch); \
69 void ff_mix_ ## chan ## _to_2_s16p_flt_sse4(int16_t **src, \
70 float **matrix, int len, \
71 int out_ch, int in_ch); \
73 void ff_mix_ ## chan ## _to_1_fltp_flt_avx(float **src, \
74 float **matrix, int len, \
75 int out_ch, int in_ch); \
76 void ff_mix_ ## chan ## _to_2_fltp_flt_avx(float **src, \
77 float **matrix, int len, \
78 int out_ch, int in_ch); \
80 void ff_mix_ ## chan ## _to_1_s16p_flt_avx(int16_t **src, \
81 float **matrix, int len, \
82 int out_ch, int in_ch); \
83 void ff_mix_ ## chan ## _to_2_s16p_flt_avx(int16_t **src, \
84 float **matrix, int len, \
85 int out_ch, int in_ch); \
87 void ff_mix_ ## chan ## _to_1_fltp_flt_fma4(float **src, \
88 float **matrix, int len, \
89 int out_ch, int in_ch); \
90 void ff_mix_ ## chan ## _to_2_fltp_flt_fma4(float **src, \
91 float **matrix, int len, \
92 int out_ch, int in_ch); \
94 void ff_mix_ ## chan ## _to_1_s16p_flt_fma4(int16_t **src, \
95 float **matrix, int len, \
96 int out_ch, int in_ch); \
97 void ff_mix_ ## chan ## _to_2_s16p_flt_fma4(int16_t **src, \
98 float **matrix, int len, \
99 int out_ch, int in_ch);
108 #define SET_MIX_3_8_TO_1_2(chan) \
109 if (EXTERNAL_SSE(cpu_flags)) { \
110 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
111 chan, 1, 16, 4, "SSE", \
112 ff_mix_ ## chan ## _to_1_fltp_flt_sse); \
113 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
114 chan, 2, 16, 4, "SSE", \
115 ff_mix_## chan ##_to_2_fltp_flt_sse); \
117 if (EXTERNAL_SSE2(cpu_flags)) { \
118 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
119 chan, 1, 16, 8, "SSE2", \
120 ff_mix_ ## chan ## _to_1_s16p_flt_sse2); \
121 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
122 chan, 2, 16, 8, "SSE2", \
123 ff_mix_ ## chan ## _to_2_s16p_flt_sse2); \
125 if (EXTERNAL_SSE4(cpu_flags)) { \
126 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
127 chan, 1, 16, 8, "SSE4", \
128 ff_mix_ ## chan ## _to_1_s16p_flt_sse4); \
129 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
130 chan, 2, 16, 8, "SSE4", \
131 ff_mix_ ## chan ## _to_2_s16p_flt_sse4); \
133 if (EXTERNAL_AVX(cpu_flags)) { \
134 int ptr_align = 32; \
136 if (ARCH_X86_32 || chan >= 6) { \
140 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
141 chan, 1, ptr_align, smp_align, "AVX", \
142 ff_mix_ ## chan ## _to_1_fltp_flt_avx); \
143 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
144 chan, 2, ptr_align, smp_align, "AVX", \
145 ff_mix_ ## chan ## _to_2_fltp_flt_avx); \
146 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
147 chan, 1, 16, 8, "AVX", \
148 ff_mix_ ## chan ## _to_1_s16p_flt_avx); \
149 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
150 chan, 2, 16, 8, "AVX", \
151 ff_mix_ ## chan ## _to_2_s16p_flt_avx); \
153 if (EXTERNAL_FMA4(cpu_flags)) { \
154 int ptr_align = 32; \
156 if (ARCH_X86_32 || chan >= 6) { \
160 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
161 chan, 1, ptr_align, smp_align, "FMA4", \
162 ff_mix_ ## chan ## _to_1_fltp_flt_fma4); \
163 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_FLTP, AV_MIX_COEFF_TYPE_FLT,\
164 chan, 2, ptr_align, smp_align, "FMA4", \
165 ff_mix_ ## chan ## _to_2_fltp_flt_fma4); \
166 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
167 chan, 1, 16, 8, "FMA4", \
168 ff_mix_ ## chan ## _to_1_s16p_flt_fma4); \
169 ff_audio_mix_set_func(am, AV_SAMPLE_FMT_S16P, AV_MIX_COEFF_TYPE_FLT,\
170 chan, 2, 16, 8, "FMA4", \
171 ff_mix_ ## chan ## _to_2_s16p_flt_fma4); \
void ff_mix_2_to_1_fltp_flt_avx(float **src, float **matrix, int len, int out_ch, int in_ch)
#define EXTERNAL_SSE(flags)
#define DEFINE_MIX_3_8_TO_1_2(chan)
void ff_mix_1_to_2_fltp_flt_avx(float **src, float **matrix, int len, int out_ch, int in_ch)
#define EXTERNAL_SSE4(flags)
void ff_mix_2_to_1_s16p_flt_sse2(int16_t **src, float **matrix, int len, int out_ch, int in_ch)
#define SET_MIX_3_8_TO_1_2(chan)
#define EXTERNAL_AVX_FAST(flags)
#define EXTERNAL_SSE2(flags)
void ff_mix_1_to_2_fltp_flt_sse(float **src, float **matrix, int len, int out_ch, int in_ch)
void ff_mix_2_to_1_s16p_flt_sse4(int16_t **src, float **matrix, int len, int out_ch, int in_ch)
void ff_mix_1_to_2_s16p_flt_sse2(int16_t **src, float **matrix, int len, int out_ch, int in_ch)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
void ff_mix_1_to_2_s16p_flt_sse4(int16_t **src, float **matrix, int len, int out_ch, int in_ch)
void ff_mix_2_to_1_fltp_flt_sse(float **src, float **matrix, int len, int out_ch, int in_ch)
void ff_mix_1_to_2_s16p_flt_avx(int16_t **src, float **matrix, int len, int out_ch, int in_ch)
void ff_audio_mix_set_func(AudioMix *am, enum AVSampleFormat fmt, enum AVMixCoeffType coeff_type, int in_channels, int out_channels, int ptr_align, int samples_align, const char *descr, void *mix_func)
Set mixing function if the parameters match.
av_cold void ff_audio_mix_init_x86(AudioMix *am)
void ff_mix_2_to_1_s16p_q8_sse2(int16_t **src, int16_t **matrix, int len, int out_ch, int in_ch)
#define EXTERNAL_AVX(flags)