23 #ifndef AVCODEC_APTX_H
24 #define AVCODEC_APTX_H
48 #define FILTER_TAPS 16
102 typedef const struct {
115 #define RSHIFT_SIZE(size) \
117 static int##size##_t rshift##size(int##size##_t value, int shift) \
119 int##size##_t rounding = (int##size##_t)1 << (shift - 1); \
120 int##size##_t mask = ((int##size##_t)1 << (shift + 1)) - 1; \
121 return ((value + rounding) >> shift) - ((value & mask) == rounding); \
124 static int##size##_t rshift##size##_clip24(int##size##_t value, int shift) \
126 return av_clip_intp2(rshift##size(value, shift), 23); \
137 730, -413, -9611, 43626, -121026, 269973, -585547, 2801966,
138 697128, -160481, 27611, 8478, -10043, 3511, 688, -897,
141 -897, 688, 3511, -10043, 8478, 27611, -160481, 697128,
142 2801966, -585547, 269973, -121026, 43626, -9611, -413, 730,
152 1033, -584, -13592, 61697, -171156, 381799, -828088, 3962579,
153 985888, -226954, 39048, 11990, -14203, 4966, 973, -1268,
156 -1268, 973, 4966, -14203, 11990, 39048, -226954, 985888,
157 3962579, -828088, 381799, -171156, 61697, -13592, -584, 1033,
188 return rshift64_clip24(e,
shift);
196 for (subband = 0; subband <
NB_SUBBANDS; subband++)
209 int eighth = *idx == 7;
210 *idx = (*idx + 1) & 7;