static int eval_refl(const int16_t *coefs, int *refl, RA144Context *ractx)

{

    int retval = 0;

    int b, c, i;

    unsigned int u;

    int buffer1[10];

    int buffer2[10];

    int *bp1 = buffer1;

    int *bp2 = buffer2;



    for (i=0; i < 10; i++)

        buffer2[i] = coefs[i];



    u = refl[9] = bp2[9];



    if (u + 0x1000 > 0x1fff) {

        av_log(ractx, AV_LOG_ERROR, "Overflow. Broken sample?\n");

        return 0;

    }



    for (c=8; c >= 0; c--) {

        if (u == 0x1000)

            u++;



        if (u == 0xfffff000)

            u--;



        b = 0x1000-((u * u) >> 12);



        if (b == 0)

            b++;



        for (u=0; u<=c; u++)

            bp1[u] = ((bp2[u] - ((refl[c+1] * bp2[c-u]) >> 12)) * (0x1000000 / b)) >> 12;



        refl[c] = u = bp1[c];



        if ((u + 0x1000) > 0x1fff)

            retval = 1;



        FFSWAP(int *, bp1, bp2);

    }

    return retval;

}

static int eval_refl(const int16_t *coefs, int *refl, RA144Context *ractx)

{

    int retval = 0;

    int b, c, i;

    unsigned int u;

    int buffer1[10];

    int buffer2[10];

    int *bp1 = buffer1;

    int *bp2 = buffer2;



    for (i=0; i < 10; i++)

        buffer2[i] = coefs[i];



    u = refl[9] = bp2[9];



    if (u + 0x1000 > 0x1fff) {

        av_log(ractx, AV_LOG_ERROR, "Overflow. Broken sample?\n");

        return 0;

    }



    for (c=8; c >= 0; c--) {

        if (u == 0x1000)

            u++;



        if (u == 0xfffff000)

            u--;



        b = 0x1000-((u * u) >> 12);



        if (b == 0)

            b++;



        for (u=0; u<=c; u++)

            bp1[u] = ((bp2[u] - ((refl[c+1] * bp2[c-u]) >> 12)) * (0x1000000 / b)) >> 12;



        refl[c] = u = bp1[c];



        if ((u + 0x1000) > 0x1fff)

            retval = 1;



        FFSWAP(int *, bp1, bp2);

    }

    return retval;

}

        return 0;
static int FUNC_0(const int16_t *VAR_0, int *VAR_1, RA144Context *VAR_2)

{

    int VAR_3 = 0;

    int VAR_4, VAR_5, VAR_6;

    unsigned int VAR_7;

    int VAR_8[10];

    int VAR_9[10];

    int *VAR_10 = VAR_8;

    int *VAR_11 = VAR_9;



    for (VAR_6=0; VAR_6 < 10; VAR_6++)

        VAR_9[VAR_6] = VAR_0[VAR_6];



    VAR_7 = VAR_1[9] = VAR_11[9];



    if (VAR_7 + 0x1000 > 0x1fff) {

        av_log(VAR_2, AV_LOG_ERROR, "Overflow. Broken sample?\n");

        return 0;

    }



    for (VAR_5=8; VAR_5 >= 0; VAR_5--) {

        if (VAR_7 == 0x1000)

            VAR_7++;



        if (VAR_7 == 0xfffff000)

            VAR_7--;



        VAR_4 = 0x1000-((VAR_7 * VAR_7) >> 12);



        if (VAR_4 == 0)

            VAR_4++;



        for (VAR_7=0; VAR_7<=VAR_5; VAR_7++)

            VAR_10[VAR_7] = ((VAR_11[VAR_7] - ((VAR_1[VAR_5+1] * VAR_11[VAR_5-VAR_7]) >> 12)) * (0x1000000 / VAR_4)) >> 12;



        VAR_1[VAR_5] = VAR_7 = VAR_10[VAR_5];



        if ((VAR_7 + 0x1000) > 0x1fff)

            VAR_3 = 1;



        FFSWAP(int *, VAR_10, VAR_11);

    }

    return VAR_3;

}

static int FUNC_0(const int16_t *VAR_0, int *VAR_1, RA144Context *VAR_2)
{ int VAR_3 = 0; int VAR_4, VAR_5, VAR_6; unsigned int VAR_7; int VAR_8[10]; int VAR_9[10]; int *VAR_10 = VAR_8; int *VAR_11 = VAR_9; for (VAR_6=0; VAR_6 < 10; VAR_6++) VAR_9[VAR_6] = VAR_0[VAR_6]; VAR_7 = VAR_1[9] = VAR_11[9]; if (VAR_7 + 0x1000 > 0x1fff) { av_log(VAR_2, AV_LOG_ERROR, "Overflow. Broken sample?\n"); return 0; } for (VAR_5=8; VAR_5 >= 0; VAR_5--) { if (VAR_7 == 0x1000)
VAR_7++; if (VAR_7 == 0xfffff000)
VAR_7--; VAR_4 = 0x1000-((VAR_7 * VAR_7) >> 12); if (VAR_4 == 0)
VAR_4++; for (VAR_7=0; VAR_7<=VAR_5; VAR_7++) VAR_10[VAR_7] = ((VAR_11[VAR_7] - ((VAR_1[VAR_5+1] * VAR_11[VAR_5-VAR_7]) >> 12)) * (0x1000000 / VAR_4)) >> 12; VAR_1[VAR_5] = VAR_7 = VAR_10[VAR_5]; if ((VAR_7 + 0x1000) > 0x1fff)
VAR_3 = 1; FFSWAP(int *, VAR_10, VAR_11); } return VAR_3; }