Loading...
Searching...
No Matches
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_RENAME2(x) x ## _fixed
40#define FIXR(a) ((int)((a) * 1 + 0.5))
41#define FIXR10(a) ((int)((a) * 1024.0 + 0.5))
42#define Q23(a) (int)((a) * 8388608.0 + 0.5)
43#define Q30(x) (int)((x)*1073741824.0 + 0.5)
44#define Q31(x) (int)((x)*2147483648.0 + 0.5)
45#define GET_GAIN(x, y) (-(y) * (1 << (x))) + 1024
46#define AAC_MUL16(x, y) (int)(((int64_t)(x) * (y) + 0x8000) >> 16)
47#define AAC_MUL26(x, y) (int)(((int64_t)(x) * (y) + 0x2000000) >> 26)
48#define AAC_MUL30(x, y) (int)(((int64_t)(x) * (y) + 0x20000000) >> 30)
49#define AAC_MUL31(x, y) (int)(((int64_t)(x) * (y) + 0x40000000) >> 31)
50#define AAC_MADD28(x, y, a, b) (int)((((int64_t)(x) * (y)) + \
51 ((int64_t)(a) * (b)) + \
53#define AAC_MADD30(x, y, a, b) (int)((((int64_t)(x) * (y)) + \
54 ((int64_t)(a) * (b)) + \
56#define AAC_MADD30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \
57 ((int64_t)(a) * (b)) + \
58 ((int64_t)(c) * (d)) + \
59 ((int64_t)(e) * (f)) + \
61#define AAC_MSUB30(x, y, a, b) (int)((((int64_t)(x) * (y)) - \
62 ((int64_t)(a) * (b)) + \
64#define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \
65 ((int64_t)(a) * (b)) - \
66 ((int64_t)(c) * (d)) - \
67 ((int64_t)(e) * (f)) + \
69#define AAC_MSUB31_V3(x, y, z) (int)((((int64_t)(x) * (z)) - \
70 ((int64_t)(y) * (z)) + \
72#define AAC_HALF_SUM(x, y) (((x) >> 1) + ((y) >> 1))
77typedef struct PredictorStateFixed {
89#error aac_defines.h must be included before lpc_functions.h for fixed point decoder
92#define LPC_USE_FIXED 1
93#define LPC_MUL26(x, y) AAC_MUL26((x), (y))
94#define LPC_FIXR(x) FIXR(x)
95#define LPC_SRA_R(x, y) (int)(((x) + (1 << ((y) - 1))) >> (y))
99#define AAC_RENAME(x) x
100#define AAC_RENAME2(x) ff_ ## x
107#define FIXR(x) ((float)(x))
108#define FIXR10(x) ((float)(x))
109#define Q23(x) ((float)(x))
110#define Q30(x) ((float)(x))
111#define Q31(x) ((float)(x))
112#define GET_GAIN(x, y) powf((x), -(y))
113#define AAC_MUL16(x, y) ((x) * (y))
114#define AAC_MUL26(x, y) ((x) * (y))
115#define AAC_MUL30(x, y) ((x) * (y))
116#define AAC_MUL31(x, y) ((x) * (y))
117#define AAC_MADD28(x, y, a, b) ((x) * (y) + (a) * (b))
118#define AAC_MADD30(x, y, a, b) ((x) * (y) + (a) * (b))
119#define AAC_MADD30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) + \
120 (c) * (d) + (e) * (f))
121#define AAC_MSUB30(x, y, a, b) ((x) * (y) - (a) * (b))
122#define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) - \
123 (c) * (d) - (e) * (f))
124#define AAC_MSUB31_V3(x, y, z) ((x) - (y)) * (z)
125#define AAC_HALF_SUM(x, y) ((x) + (y)) * 0.5f