static void parcor_to_lpc(unsigned int k, const int32_t *par, int32_t *cof)
{
    int i, j;
    for (i = 0, j = k - 1; i < j; i++, j--) {
        int tmp1 = ((MUL64(par[k], cof[j]) + (1 << 19)) >> 20);
        cof[j]  += ((MUL64(par[k], cof[i]) + (1 << 19)) >> 20);
        cof[i]  += tmp1;
    }
    if (i == j)
        cof[i] += ((MUL64(par[k], cof[j]) + (1 << 19)) >> 20);
    cof[k] = par[k];
}
['static int decode_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    ALSSpecificConfig *sconf = &ctx->sconf;\n    unsigned int block_length = bd->block_length;\n    unsigned int smp = 0;\n    unsigned int k;\n    int opt_order             = *bd->opt_order;\n    int sb;\n    int64_t y;\n    int32_t *quant_cof        = bd->quant_cof;\n    int32_t *lpc_cof          = bd->lpc_cof;\n    int32_t *raw_samples      = bd->raw_samples;\n    int32_t *raw_samples_end  = bd->raw_samples + bd->block_length;\n    int32_t *lpc_cof_reversed = ctx->lpc_cof_reversed_buffer;\n    if (*bd->use_ltp) {\n        int ltp_smp;\n        for (ltp_smp = FFMAX(*bd->ltp_lag - 2, 0); ltp_smp < block_length; ltp_smp++) {\n            int center = ltp_smp - *bd->ltp_lag;\n            int begin  = FFMAX(0, center - 2);\n            int end    = center + 3;\n            int tab    = 5 - (end - begin);\n            int base;\n            y = 1 << 6;\n            for (base = begin; base < end; base++, tab++)\n                y += MUL64(bd->ltp_gain[tab], raw_samples[base]);\n            raw_samples[ltp_smp] += y >> 7;\n        }\n    }\n    if (bd->ra_block) {\n        for (smp = 0; smp < opt_order; smp++) {\n            y = 1 << 19;\n            for (sb = 0; sb < smp; sb++)\n                y += MUL64(lpc_cof[sb], raw_samples[-(sb + 1)]);\n            *raw_samples++ -= y >> 20;\n            parcor_to_lpc(smp, quant_cof, lpc_cof);\n        }\n    } else {\n        for (k = 0; k < opt_order; k++)\n            parcor_to_lpc(k, quant_cof, lpc_cof);\n        if (*bd->store_prev_samples)\n            memcpy(bd->prev_raw_samples, raw_samples - sconf->max_order,\n                   sizeof(*bd->prev_raw_samples) * sconf->max_order);\n        if (bd->js_blocks && bd->raw_other) {\n            int32_t *left, *right;\n            if (bd->raw_other > raw_samples) {\n                left  = raw_samples;\n                right = bd->raw_other;\n            } else {\n                left  = bd->raw_other;\n                right = raw_samples;\n            }\n            for (sb = -1; sb >= -sconf->max_order; sb--)\n                raw_samples[sb] = right[sb] - left[sb];\n        }\n        if (*bd->shift_lsbs)\n            for (sb = -1; sb >= -sconf->max_order; sb--)\n                raw_samples[sb] >>= *bd->shift_lsbs;\n    }\n    lpc_cof = lpc_cof + opt_order;\n    for (sb = 0; sb < opt_order; sb++)\n        lpc_cof_reversed[sb] = lpc_cof[-(sb + 1)];\n    raw_samples = bd->raw_samples + smp;\n    lpc_cof     = lpc_cof_reversed + opt_order;\n    for (; raw_samples < raw_samples_end; raw_samples++) {\n        y = 1 << 19;\n        for (sb = -opt_order; sb < 0; sb++)\n            y += MUL64(lpc_cof[sb], raw_samples[sb]);\n        *raw_samples -= y >> 20;\n    }\n    raw_samples = bd->raw_samples;\n    if (*bd->store_prev_samples)\n        memcpy(raw_samples - sconf->max_order, bd->prev_raw_samples,\n               sizeof(*raw_samples) * sconf->max_order);\n    return 0;\n}', 'static void parcor_to_lpc(unsigned int k, const int32_t *par, int32_t *cof)\n{\n    int i, j;\n    for (i = 0, j = k - 1; i < j; i++, j--) {\n        int tmp1 = ((MUL64(par[k], cof[j]) + (1 << 19)) >> 20);\n        cof[j]  += ((MUL64(par[k], cof[i]) + (1 << 19)) >> 20);\n        cof[i]  += tmp1;\n    }\n    if (i == j)\n        cof[i] += ((MUL64(par[k], cof[j]) + (1 << 19)) >> 20);\n    cof[k] = par[k];\n}']