void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order)
{
    int i, j;
    f[0] = 1.0;
    f[1] = -2 * lsp[0];
    lsp -= 2;
    for(i=2; i<=lp_half_order; i++)
    {
        double val = -2 * lsp[2*i];
        f[i] = val * f[i-1] + 2*f[i-2];
        for(j=i-1; j>1; j--)
            f[j] += f[j-1] * val + f[j-2];
        f[1] += val;
    }
}
['void ff_amrwb_lsp2lpc(const double *lsp, float *lp, int lp_order)\n{\n    int lp_half_order = lp_order >> 1;\n    double buf[lp_half_order + 1];\n    double pa[lp_half_order + 1];\n    double *qa = buf + 1;\n    int i,j;\n    qa[-1] = 0.0;\n    ff_lsp2polyf(lsp    , pa, lp_half_order    );\n    ff_lsp2polyf(lsp + 1, qa, lp_half_order - 1);\n    for (i = 1, j = lp_order - 1; i < lp_half_order; i++, j--) {\n        double paf =  pa[i]            * (1 + lsp[lp_order - 1]);\n        double qaf = (qa[i] - qa[i-2]) * (1 - lsp[lp_order - 1]);\n        lp[i-1]  = (paf + qaf) * 0.5;\n        lp[j-1]  = (paf - qaf) * 0.5;\n    }\n    lp[lp_half_order - 1] = (1.0 + lsp[lp_order - 1]) *\n        pa[lp_half_order] * 0.5;\n    lp[lp_order - 1] = lsp[lp_order - 1];\n}', 'void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order)\n{\n    int i, j;\n    f[0] = 1.0;\n    f[1] = -2 * lsp[0];\n    lsp -= 2;\n    for(i=2; i<=lp_half_order; i++)\n    {\n        double val = -2 * lsp[2*i];\n        f[i] = val * f[i-1] + 2*f[i-2];\n        for(j=i-1; j>1; j--)\n            f[j] += f[j-1] * val + f[j-2];\n        f[1] += val;\n    }\n}']