123 #define DOWNMIX_FUNC_OPT(ch, opt) \ 124 void ff_ac3_downmix_ ## ch ## _to_1_ ## opt(float **samples, \ 125 float **matrix, int len); \ 126 void ff_ac3_downmix_ ## ch ## _to_2_ ## opt(float **samples, \ 127 float **matrix, int len); 129 #define DOWNMIX_FUNCS(opt) \ 130 DOWNMIX_FUNC_OPT(3, opt) \ 131 DOWNMIX_FUNC_OPT(4, opt) \ 132 DOWNMIX_FUNC_OPT(5, opt) \ 133 DOWNMIX_FUNC_OPT(6, opt) 143 #define SET_DOWNMIX(ch, suf, SUF) \ 144 if (ch == c->in_channels) { \ 145 if (EXTERNAL_ ## SUF (cpu_flags)) { \ 146 if (c->out_channels == 1) \ 147 c->downmix = ff_ac3_downmix_ ## ch ## _to_1_ ## suf; \ 149 c->downmix = ff_ac3_downmix_ ## ch ## _to_2_ ## suf; \ 153 #define SET_DOWNMIX_ALL(suf, SUF) \ 154 SET_DOWNMIX(3, suf, SUF) \ 155 SET_DOWNMIX(4, suf, SUF) \ 156 SET_DOWNMIX(5, suf, SUF) \ 157 SET_DOWNMIX(6, suf, SUF) #define EXTERNAL_MMX(flags)
static int shift(int a, int b)
int ff_ac3_max_msb_abs_int16_sse2(const int16_t *src, int len)
Memory handling functions.
int ff_ac3_max_msb_abs_int16_mmx(const int16_t *src, int len)
void ff_ac3dsp_set_downmix_x86(AC3DSPContext *c)
static int sse(MpegEncContext *s, uint8_t *src1, uint8_t *src2, int w, int h, int stride)
static atomic_int cpu_flags
#define EXTERNAL_SSE(flags)
void ff_float_to_fixed24_3dnow(int32_t *dst, const float *src, unsigned int len)
Macro definitions for various function/variable attributes.
void(* extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs)
void ff_float_to_fixed24_sse2(int32_t *dst, const float *src, unsigned int len)
void(* apply_window_int16)(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
Apply symmetric window in 16-bit fixed-point.
void ff_ac3_extract_exponents_ssse3(uint8_t *exp, int32_t *coef, int nb_coefs)
void ff_ac3_rshift_int32_mmx(int32_t *src, unsigned int len, unsigned int shift)
void ff_ac3_lshift_int16_mmx(int16_t *src, unsigned int len, unsigned int shift)
#define DOWNMIX_FUNCS(opt)
void ff_ac3_lshift_int16_sse2(int16_t *src, unsigned int len, unsigned int shift)
#define AV_CPU_FLAG_ATOM
Atom processor, some SSSE3 instructions are slower.
#define EXTERNAL_SSE2_FAST(flags)
#define EXTERNAL_SSE2(flags)
void ff_ac3_exponent_min_sse2(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
void ff_apply_window_int16_ssse3_atom(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact)
void ff_apply_window_int16_round_mmxext(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
void ff_ac3_rshift_int32_sse2(int32_t *src, unsigned int len, unsigned int shift)
int(* ac3_max_msb_abs_int16)(const int16_t *src, int len)
Calculate the maximum MSB of the absolute value of each element in an array of int16_t.
void(* ac3_lshift_int16)(int16_t *src, unsigned int len, unsigned int shift)
Left-shift each value in an array of int16_t by a specified amount.
void(* ac3_rshift_int32)(int32_t *src, unsigned int len, unsigned int shift)
Right-shift each value in an array of int32_t by a specified amount.
static SDL_Window * window
void ff_apply_window_int16_round_sse2(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
int ff_ac3_max_msb_abs_int16_ssse3(const int16_t *src, int len)
void ff_apply_window_int16_sse2(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
void ff_ac3_exponent_min_mmx(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
void ff_ac3_exponent_min_mmxext(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
void ff_apply_window_int16_mmxext(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
#define AV_CPU_FLAG_AVXSLOW
AVX supported, but slow when using YMM registers (e.g. Bulldozer)
void ff_apply_window_int16_ssse3(int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
typedef void(RENAME(mix_any_func_type))
int ff_ac3_max_msb_abs_int16_mmxext(const int16_t *src, int len)
void ff_float_to_fixed24_sse(int32_t *dst, const float *src, unsigned int len)
#define EXTERNAL_SSSE3(flags)
int(* compute_mantissa_size)(uint16_t mant_cnt[6][16])
Calculate the number of bits needed to encode a set of mantissas.
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
void(* ac3_exponent_min)(uint8_t *exp, int num_reuse_blocks, int nb_coefs)
Set each encoded exponent in a block to the minimum of itself and the exponents in the same frequency...
#define EXTERNAL_MMXEXT(flags)
#define SET_DOWNMIX_ALL(suf, SUF)
int ff_ac3_compute_mantissa_size_sse2(uint16_t mant_cnt[6][16])
void ff_ac3_extract_exponents_sse2(uint8_t *exp, int32_t *coef, int nb_coefs)
#define EXTERNAL_AMD3DNOW(flags)
Common code between the AC-3 encoder and decoder.
void(* float_to_fixed24)(int32_t *dst, const float *src, unsigned int len)
Convert an array of float in range [-1.0,1.0] to int32_t with range [-(1<<24),(1<<24)].