25 #define PROTO(pre, in, out, cap) void ff ## pre ## in## _to_ ##out## _a_ ##cap(uint8_t **dst, const uint8_t **src, int len);
26 #define PROTO2(pre, out, cap) PROTO(pre, int16, out, cap) PROTO(pre, int32, out, cap) PROTO(pre, float, out, cap)
27 #define PROTO3(pre, cap) PROTO2(pre, int16, cap) PROTO2(pre, int32, cap) PROTO2(pre, float, cap)
28 #define PROTO4(pre) PROTO3(pre, mmx) PROTO3(pre, sse) PROTO3(pre, sse2) PROTO3(pre, ssse3) PROTO3(pre, sse4) PROTO3(pre, avx) PROTO3(pre, avx2)
46 #define MULTI_CAPS_FUNC(flag, cap) \
47 if (EXTERNAL_##flag(mm_flags)) {\
48 if( out_fmt == AV_SAMPLE_FMT_S32 && in_fmt == AV_SAMPLE_FMT_S16 || out_fmt == AV_SAMPLE_FMT_S32P && in_fmt == AV_SAMPLE_FMT_S16P)\
49 ac->simd_f = ff_int16_to_int32_a_ ## cap;\
50 if( out_fmt == AV_SAMPLE_FMT_S16 && in_fmt == AV_SAMPLE_FMT_S32 || out_fmt == AV_SAMPLE_FMT_S16P && in_fmt == AV_SAMPLE_FMT_S32P)\
51 ac->simd_f = ff_int32_to_int16_a_ ## cap;\
60 ac->simd_f = ff_pack_6ch_float_to_float_a_mmx;
66 ac->simd_f = ff_pack_6ch_float_to_float_a_sse;
69 ac->simd_f = ff_unpack_6ch_float_to_float_a_sse;
74 ac->simd_f = ff_int32_to_float_a_sse2;
76 ac->simd_f = ff_int16_to_float_a_sse2;
78 ac->simd_f = ff_float_to_int32_a_sse2;
80 ac->simd_f = ff_float_to_int16_a_sse2;
84 ac->simd_f = ff_pack_2ch_int32_to_int32_a_sse2;
86 ac->simd_f = ff_pack_2ch_int16_to_int16_a_sse2;
88 ac->simd_f = ff_pack_2ch_int16_to_int32_a_sse2;
90 ac->simd_f = ff_pack_2ch_int32_to_int16_a_sse2;
93 ac->simd_f = ff_unpack_2ch_int32_to_int32_a_sse2;
95 ac->simd_f = ff_unpack_2ch_int16_to_int16_a_sse2;
97 ac->simd_f = ff_unpack_2ch_int16_to_int32_a_sse2;
99 ac->simd_f = ff_unpack_2ch_int32_to_int16_a_sse2;
102 ac->simd_f = ff_pack_2ch_int32_to_float_a_sse2;
104 ac->simd_f = ff_pack_2ch_float_to_int32_a_sse2;
106 ac->simd_f = ff_pack_2ch_int16_to_float_a_sse2;
108 ac->simd_f = ff_pack_2ch_float_to_int16_a_sse2;
110 ac->simd_f = ff_unpack_2ch_int32_to_float_a_sse2;
112 ac->simd_f = ff_unpack_2ch_float_to_int32_a_sse2;
114 ac->simd_f = ff_unpack_2ch_int16_to_float_a_sse2;
116 ac->simd_f = ff_unpack_2ch_float_to_int16_a_sse2;
120 ac->simd_f = ff_pack_6ch_int32_to_float_a_sse2;
122 ac->simd_f = ff_pack_6ch_float_to_int32_a_sse2;
125 ac->simd_f = ff_unpack_6ch_int32_to_float_a_sse2;
127 ac->simd_f = ff_unpack_6ch_float_to_int32_a_sse2;
131 ac->simd_f = ff_pack_8ch_float_to_float_a_sse2;
133 ac->simd_f = ff_pack_8ch_int32_to_float_a_sse2;
135 ac->simd_f = ff_pack_8ch_float_to_int32_a_sse2;
141 ac->simd_f = ff_unpack_2ch_int16_to_int16_a_ssse3;
143 ac->simd_f = ff_unpack_2ch_int16_to_int32_a_ssse3;
145 ac->simd_f = ff_unpack_2ch_int16_to_float_a_ssse3;
150 ac->simd_f = ff_int32_to_float_a_avx;
155 ac->simd_f = ff_pack_6ch_float_to_float_a_avx;
157 ac->simd_f = ff_pack_6ch_int32_to_float_a_avx;
159 ac->simd_f = ff_pack_6ch_float_to_int32_a_avx;
162 ac->simd_f = ff_unpack_6ch_float_to_float_a_avx;
164 ac->simd_f = ff_unpack_6ch_int32_to_float_a_avx;
166 ac->simd_f = ff_unpack_6ch_float_to_int32_a_avx;
170 ac->simd_f = ff_pack_8ch_float_to_float_a_avx;
172 ac->simd_f = ff_pack_8ch_int32_to_float_a_avx;
174 ac->simd_f = ff_pack_8ch_float_to_int32_a_avx;
179 ac->simd_f = ff_float_to_int32_a_avx2;
#define EXTERNAL_MMX(flags)
#define EXTERNAL_SSE(flags)
#define MULTI_CAPS_FUNC(flag, cap)
#define EXTERNAL_AVX_FAST(flags)
#define EXTERNAL_SSE2(flags)
av_cold void swri_audio_convert_init_x86(struct AudioConvert *ac, enum AVSampleFormat out_fmt, enum AVSampleFormat in_fmt, int channels)
AVSampleFormat
Audio sample formats.
#define EXTERNAL_SSSE3(flags)
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
Audio format conversion routines.
#define EXTERNAL_AVX2(flags)
#define EXTERNAL_AVX(flags)