Go to the documentation of this file.
21 #ifndef AVCODEC_AAC_DEFINES_H
22 #define AVCODEC_AAC_DEFINES_H
32 #define AAC_RENAME(x) x ## _fixed
33 #define AAC_RENAME_32(x) x ## _fixed_32
34 #define AAC_RENAME2(x) x ## _fixed
41 #define FIXR(a) ((int)((a) * 1 + 0.5))
42 #define FIXR10(a) ((int)((a) * 1024.0 + 0.5))
43 #define Q23(a) (int)((a) * 8388608.0 + 0.5)
44 #define Q30(x) (int)((x)*1073741824.0 + 0.5)
45 #define Q31(x) (int)((x)*2147483648.0 + 0.5)
46 #define TX_SCALE(x) ((x) * 128.0f)
47 #define GET_GAIN(x, y) (-(y) * (1 << (x))) + 1024
48 #define AAC_MUL16(x, y) (int)(((int64_t)(x) * (y) + 0x8000) >> 16)
49 #define AAC_MUL26(x, y) (int)(((int64_t)(x) * (y) + 0x2000000) >> 26)
50 #define AAC_MUL30(x, y) (int)(((int64_t)(x) * (y) + 0x20000000) >> 30)
51 #define AAC_MUL31(x, y) (int)(((int64_t)(x) * (y) + 0x40000000) >> 31)
52 #define AAC_MADD28(x, y, a, b) (int)((((int64_t)(x) * (y)) + \
53 ((int64_t)(a) * (b)) + \
55 #define AAC_MADD30(x, y, a, b) (int)((((int64_t)(x) * (y)) + \
56 ((int64_t)(a) * (b)) + \
58 #define AAC_MADD30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \
59 ((int64_t)(a) * (b)) + \
60 ((int64_t)(c) * (d)) + \
61 ((int64_t)(e) * (f)) + \
63 #define AAC_MSUB30(x, y, a, b) (int)((((int64_t)(x) * (y)) - \
64 ((int64_t)(a) * (b)) + \
66 #define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \
67 ((int64_t)(a) * (b)) - \
68 ((int64_t)(c) * (d)) - \
69 ((int64_t)(e) * (f)) + \
71 #define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \
72 ((int64_t)(y) * (z)) + \
74 #define AAC_HALF_SUM(x, y) (((x) >> 1) + ((y) >> 1))
75 #define AAC_SRA_R(x, y) (int)(((x) + (1 << ((y) - 1))) >> (y))
79 #define AAC_RENAME(x) x
80 #define AAC_RENAME_32(x) x
81 #define AAC_RENAME2(x) ff_ ## x
88 #define FIXR(x) ((float)(x))
89 #define FIXR10(x) ((float)(x))
90 #define Q23(x) ((float)(x))
91 #define Q30(x) ((float)(x))
92 #define Q31(x) ((float)(x))
93 #define TX_SCALE(x) ((x) / 32768.0f)
94 #define GET_GAIN(x, y) powf((x), -(y))
95 #define AAC_MUL16(x, y) ((x) * (y))
96 #define AAC_MUL26(x, y) ((x) * (y))
97 #define AAC_MUL30(x, y) ((x) * (y))
98 #define AAC_MUL31(x, y) ((x) * (y))
99 #define AAC_MADD28(x, y, a, b) ((x) * (y) + (a) * (b))
100 #define AAC_MADD30(x, y, a, b) ((x) * (y) + (a) * (b))
101 #define AAC_MADD30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) + \
102 (c) * (d) + (e) * (f))
103 #define AAC_MSUB30(x, y, a, b) ((x) * (y) - (a) * (b))
104 #define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) - \
105 (c) * (d) - (e) * (f))
106 #define AAC_MSUB31_V3(x, y, z) ((x) - (y)) * (z)
107 #define AAC_HALF_SUM(x, y) ((x) + (y)) * 0.5f
108 #define AAC_SRA_R(x, y) (x)