Go to the documentation of this file.
19 #ifndef AVCODEC_FFT_INTERNAL_H
20 #define AVCODEC_FFT_INTERNAL_H
25 #define sqrthalf (float)M_SQRT1_2
27 #define BF(x, y, a, b) do { \
32 #define CMUL(dre, dim, are, aim, bre, bim) do { \
33 (dre) = (are) * (bre) - (aim) * (bim); \
34 (dim) = (are) * (bim) + (aim) * (bre); \
39 #define SCALE_FLOAT(a, bits) lrint((a) * (double)(1 << (bits)))
43 #define CMUL(dre, dim, are, aim, bre, bim) do { \
45 (accu) = (int64_t)(bre) * (are); \
46 (accu) -= (int64_t)(bim) * (aim); \
47 (dre) = (int)(((accu) + 0x40000000) >> 31); \
48 (accu) = (int64_t)(bre) * (aim); \
49 (accu) += (int64_t)(bim) * (are); \
50 (dim) = (int)(((accu) + 0x40000000) >> 31); \
53 #define FIX15(a) av_clip(SCALE_FLOAT(a, 31), -2147483647, 2147483647)
62 #define FIX15(a) av_clip(SCALE_FLOAT(a, 15), -32767, 32767)
64 #define sqrthalf ((int16_t)((1<<15)*M_SQRT1_2))
66 #define BF(x, y, a, b) do { \
71 #define CMULS(dre, dim, are, aim, bre, bim, sh) do { \
72 (dre) = (MUL16(are, bre) - MUL16(aim, bim)) >> sh; \
73 (dim) = (MUL16(are, bim) + MUL16(aim, bre)) >> sh; \
76 #define CMUL(dre, dim, are, aim, bre, bim) \
77 CMULS(dre, dim, are, aim, bre, bim, 15)
79 #define CMULL(dre, dim, are, aim, bre, bim) \
80 CMULS(dre, dim, are, aim, bre, bim, 0)
86 #define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c)
87 #define ff_imdct_half_c FFT_NAME(ff_imdct_half_c)
88 #define ff_mdct_calc_c FFT_NAME(ff_mdct_calc_c)