static int interp(RA144Context *ractx, int16_t *out, int block_num,

                  int copyold, int energy)

{

    int work[10];

    int a = block_num + 1;

    int b = NBLOCKS - a;

    int x;



    // Interpolate block coefficients from the this frame forth block and

    // last frame forth block

    for (x=0; x<30; x++)

        out[x] = (a * ractx->lpc_coef[0][x] + b * ractx->lpc_coef[1][x])>> 2;



    if (eval_refl(work, out, ractx)) {

        // The interpolated coefficients are unstable, copy either new or old

        // coefficients

        int_to_int16(out, ractx->lpc_coef[copyold]);

        return rescale_rms(ractx->lpc_refl_rms[copyold], energy);

    } else {

        return rescale_rms(rms(work), energy);

    }

}

static int interp(RA144Context *ractx, int16_t *out, int block_num,

                  int copyold, int energy)

{

    int work[10];

    int a = block_num + 1;

    int b = NBLOCKS - a;

    int x;



    

    

    for (x=0; x<30; x++)

        out[x] = (a * ractx->lpc_coef[0][x] + b * ractx->lpc_coef[1][x])>> 2;



    if (eval_refl(work, out, ractx)) {

        

        

        int_to_int16(out, ractx->lpc_coef[copyold]);

        return rescale_rms(ractx->lpc_refl_rms[copyold], energy);

    } else {

        return rescale_rms(rms(work), energy);

    }

}

static int FUNC_0(RA144Context *VAR_0, int16_t *VAR_1, int VAR_2,

                  int VAR_3, int VAR_4)

{

    int VAR_5[10];

    int VAR_6 = VAR_2 + 1;

    int VAR_7 = NBLOCKS - VAR_6;

    int VAR_8;



    

    

    for (VAR_8=0; VAR_8<30; VAR_8++)

        VAR_1[VAR_8] = (VAR_6 * VAR_0->lpc_coef[0][VAR_8] + VAR_7 * VAR_0->lpc_coef[1][VAR_8])>> 2;



    if (eval_refl(VAR_5, VAR_1, VAR_0)) {

        

        

        int_to_int16(VAR_1, VAR_0->lpc_coef[VAR_3]);

        return rescale_rms(VAR_0->lpc_refl_rms[VAR_3], VAR_4);

    } else {

        return rescale_rms(rms(VAR_5), VAR_4);

    }

}

static int FUNC_0(RA144Context *VAR_0, int16_t *VAR_1, int VAR_2,
int VAR_3, int VAR_4)
{ int VAR_5[10]; int VAR_6 = VAR_2 + 1; int VAR_7 = NBLOCKS - VAR_6; int VAR_8; for (VAR_8=0; VAR_8<30; VAR_8++) VAR_1[VAR_8] = (VAR_6 * VAR_0->lpc_coef[0][VAR_8] + VAR_7 * VAR_0->lpc_coef[1][VAR_8])>> 2; if (eval_refl(VAR_5, VAR_1, VAR_0)) { int_to_int16(VAR_1, VAR_0->lpc_coef[VAR_3]); return rescale_rms(VAR_0->lpc_refl_rms[VAR_3], VAR_4); } else { return rescale_rms(rms(VAR_5), VAR_4); } }