55
54
prev = lsf[i] = FFMAX(lsf[i], prev + min_spacing);
58
/* Cosine table: base_cos[i] = (1 << 15) * cos(i * PI / 64) */
59
static const int16_t tab_cos[65] =
61
32767, 32738, 32617, 32421, 32145, 31793, 31364, 30860,
62
30280, 29629, 28905, 28113, 27252, 26326, 25336, 24285,
63
23176, 22011, 20793, 19525, 18210, 16851, 15451, 14014,
64
12543, 11043, 9515, 7965, 6395, 4810, 3214, 1609,
65
1, -1607, -3211, -4808, -6393, -7962, -9513, -11040,
66
-12541, -14012, -15449, -16848, -18207, -19523, -20791, -22009,
67
-23174, -24283, -25334, -26324, -27250, -28111, -28904, -29627,
68
-30279, -30858, -31363, -31792, -32144, -32419, -32616, -32736, -32768,
71
static int16_t ff_cos(uint16_t arg)
74
uint8_t ind = arg >> 8;
76
assert(arg <= 0x3fff);
78
return tab_cos[ind] + (offset * (tab_cos[ind+1] - tab_cos[ind]) >> 8);
58
81
void ff_acelp_lsf2lsp(int16_t *lsp, const int16_t *lsf, int lp_order)