32 {(float)0.00635, (
float)0.003175, (float)0.0015875,
41 float old_p, old_q, *old;
43 float omega, old_omega;
45 float hlp, hlp1, hlp2, hlp3, hlp4, hlp5;
52 p_pre[0] = (float)-1.0 - p[0];
53 p_pre[1] = - p_pre[0] - p[1];
54 p_pre[2] = - p_pre[1] - p[2];
55 p_pre[3] = - p_pre[2] - p[3];
56 p_pre[4] = - p_pre[3] - p[4];
57 p_pre[4] = p_pre[4] / 2;
59 q_pre[0] = (float)1.0 - q[0];
60 q_pre[1] = q_pre[0] - q[1];
61 q_pre[2] = q_pre[1] - q[2];
62 q_pre[3] = q_pre[2] - q[3];
63 q_pre[4] = q_pre[3] - q[4];
64 q_pre[4] = q_pre[4] / 2;
86 if ((lsp_index & 0x1) == 0) {
96 for (step_idx = 0, step = steps[step_idx];
103 hlp1 = (float)2.0 * hlp + pq_coef[0];
104 hlp2 = (float)2.0 * hlp * hlp1 - (
float)1.0 +
106 hlp3 = (float)2.0 * hlp * hlp2 - hlp1 + pq_coef[2];
107 hlp4 = (float)2.0 * hlp * hlp3 - hlp2 + pq_coef[3];
108 hlp5 = hlp * hlp4 - hlp3 + pq_coef[4];
111 if (((hlp5 * (*old)) <= 0.0) || (omega >= 0.5)){
115 if (fabs(hlp5) >= fabs(*old)) {
116 freq[lsp_index] = omega - step;
118 freq[lsp_index] = omega;
144 omega -= steps[step_idx];
148 step = steps[step_idx];
162 freq[i] = freq[i] *
TWO_PI;
188 freq[i] = freq[i] *
PI2;
202 if (freq[0] <= 0.0) {
203 freq[0] = (float)0.022;
215 freq[i] = freq[i - 1] + hlp;
239 q[i] = (float)
cos(
TWO_PI * freq[2 * i + 1]);
246 a[i + 1] =
a[i] - 2 * p[i] * a1[i] + a2[i];
247 b[i + 1] =
b[i] - 2 * q[i] * b1[i] + b2[i];
264 a[i + 1] =
a[i] - 2 * p[i] * a1[i] + a2[i];
265 b[i + 1] =
b[i] - 2 * q[i] * b1[i] + b2[i];
#define LSF_NUMBER_OF_STEPS
void a2lsf(float *freq, float *a)
void lsf2a(float *a_coef, float *freq)