32 #define DECORRELATE_FUNCS(fmt, opt) \ 33 void ff_flac_decorrelate_ls_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 34 int len, int shift); \ 35 void ff_flac_decorrelate_rs_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 36 int len, int shift); \ 37 void ff_flac_decorrelate_ms_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 38 int len, int shift); \ 39 void ff_flac_decorrelate_indep2_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 40 int len, int shift); \ 41 void ff_flac_decorrelate_indep4_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 42 int len, int shift); \ 43 void ff_flac_decorrelate_indep6_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 44 int len, int shift); \ 45 void ff_flac_decorrelate_indep8_##fmt##_##opt(uint8_t **out, int32_t **in, int channels, \ 59 #if CONFIG_FLAC_DECODER 63 c->
decorrelate[0] = ff_flac_decorrelate_indep2_16_sse2;
64 else if (channels == 4)
65 c->
decorrelate[0] = ff_flac_decorrelate_indep4_16_sse2;
66 else if (channels == 6)
67 c->
decorrelate[0] = ff_flac_decorrelate_indep6_16_sse2;
68 else if (ARCH_X86_64 && channels == 8)
69 c->
decorrelate[0] = ff_flac_decorrelate_indep8_16_sse2;
75 c->
decorrelate[0] = ff_flac_decorrelate_indep2_32_sse2;
76 else if (channels == 4)
77 c->
decorrelate[0] = ff_flac_decorrelate_indep4_32_sse2;
78 else if (channels == 6)
79 c->
decorrelate[0] = ff_flac_decorrelate_indep6_32_sse2;
80 else if (ARCH_X86_64 && channels == 8)
81 c->
decorrelate[0] = ff_flac_decorrelate_indep8_32_sse2;
92 if (ARCH_X86_64 && channels == 8)
93 c->
decorrelate[0] = ff_flac_decorrelate_indep8_16_avx;
96 c->
decorrelate[0] = ff_flac_decorrelate_indep4_32_avx;
97 else if (channels == 6)
98 c->
decorrelate[0] = ff_flac_decorrelate_indep6_32_avx;
99 else if (ARCH_X86_64 && channels == 8)
100 c->
decorrelate[0] = ff_flac_decorrelate_indep8_32_avx;
108 #if CONFIG_FLAC_ENCODER void ff_flac_lpc_32_sse4(int32_t *samples, const int coeffs[32], int order, int qlevel, int len)
static atomic_int cpu_flags
void(* lpc32)(int32_t *samples, const int coeffs[32], int order, int qlevel, int len)
void ff_flac_lpc_32_xop(int32_t *samples, const int coeffs[32], int order, int qlevel, int len)
#define EXTERNAL_SSE4(flags)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
#define EXTERNAL_SSE2(flags)
#define DECORRELATE_FUNCS(fmt, opt)
void ff_flac_enc_lpc_16_sse4(int32_t *, const int32_t *, int, int, const int32_t *, int)
void(* lpc16_encode)(int32_t *res, const int32_t *smp, int len, int order, const int32_t coefs[32], int shift)
AVSampleFormat
Audio sample formats.
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
av_cold void ff_flacdsp_init_x86(FLACDSPContext *c, enum AVSampleFormat fmt, int channels, int bps)
#define EXTERNAL_XOP(flags)
Filter the word “frame” indicates either a video frame or a group of audio samples
#define EXTERNAL_AVX(flags)
void(* decorrelate[4])(uint8_t **out, int32_t **in, int channels, int len, int shift)