28 #define ORDER_METHOD_EST 0
29 #define ORDER_METHOD_2LEVEL 1
30 #define ORDER_METHOD_4LEVEL 2
31 #define ORDER_METHOD_8LEVEL 3
32 #define ORDER_METHOD_SEARCH 4
33 #define ORDER_METHOD_LOG 5
35 #define MIN_LPC_ORDER 1
36 #define MAX_LPC_ORDER 32
90 int max_order,
int precision,
93 int omethod,
int max_shift,
int zero_shift);
110 #ifdef LPC_USE_DOUBLE
111 #define LPC_TYPE double
113 #define LPC_TYPE float
127 for (i = 0; i < max_order; i++)
128 gen0[i] = gen1[i] = autoc[i + 1];
131 ref[0] = -gen1[0] / err;
132 err += gen1[0] * ref[0];
135 for (i = 1; i < max_order; i++) {
136 for (j = 0; j < max_order - i; j++) {
137 gen1[j] = gen1[j + 1] + ref[i - 1] * gen0[j];
138 gen0[j] = gen1[j + 1] * ref[i - 1] + gen0[j];
140 ref[i] = -gen1[0] / err;
141 err += gen1[0] * ref[i];
152 LPC_TYPE *lpc,
int lpc_stride,
int fail,
164 if (fail && (autoc[max_order - 1] == 0 || err <= 0))
167 for(i=0; i<max_order; i++) {
172 r -= lpc_last[j] * autoc[i-j-1];
175 err *= 1.0 - (r *
r);
180 for(j=0; j < (i+1)>>1; j++) {
184 lpc[i-1-j] = b + r * f;