static void revert_acfilter(WmallDecodeCtx *s, int tile_size)

{

    int ich, pred, i, j;

    int16_t *filter_coeffs = s->acfilter_coeffs;

    int scaling            = s->acfilter_scaling;

    int order              = s->acfilter_order;



    for (ich = 0; ich < s->num_channels; ich++) {

        int *prevvalues = s->acfilter_prevvalues[ich];

        for (i = 0; i < order; i++) {

            pred = 0;

            for (j = 0; j < order; j++) {

                if (i <= j)

                    pred += filter_coeffs[j] * prevvalues[j - i];

                else

                    pred += s->channel_residues[ich][i - j - 1] * filter_coeffs[j];

            }

            pred >>= scaling;

            s->channel_residues[ich][i] += pred;

        }

        for (i = order; i < tile_size; i++) {

            pred = 0;

            for (j = 0; j < order; j++)

                pred += s->channel_residues[ich][i - j - 1] * filter_coeffs[j];

            pred >>= scaling;

            s->channel_residues[ich][i] += pred;

        }

        for (j = 0; j < order; j++)

            prevvalues[j] = s->channel_residues[ich][tile_size - j - 1];

    }

}

static void revert_acfilter(WmallDecodeCtx *s, int tile_size)

{

    int ich, pred, i, j;

    int16_t *filter_coeffs = s->acfilter_coeffs;

    int scaling            = s->acfilter_scaling;

    int order              = s->acfilter_order;



    for (ich = 0; ich < s->num_channels; ich++) {

        int *prevvalues = s->acfilter_prevvalues[ich];

        for (i = 0; i < order; i++) {

            pred = 0;

            for (j = 0; j < order; j++) {

                if (i <= j)

                    pred += filter_coeffs[j] * prevvalues[j - i];

                else

                    pred += s->channel_residues[ich][i - j - 1] * filter_coeffs[j];

            }

            pred >>= scaling;

            s->channel_residues[ich][i] += pred;

        }

        for (i = order; i < tile_size; i++) {

            pred = 0;

            for (j = 0; j < order; j++)

                pred += s->channel_residues[ich][i - j - 1] * filter_coeffs[j];

            pred >>= scaling;

            s->channel_residues[ich][i] += pred;

        }

        for (j = 0; j < order; j++)

            prevvalues[j] = s->channel_residues[ich][tile_size - j - 1];

    }

}

                pred += s->channel_residues[ich][i - j - 1] * filter_coeffs[j];
static void FUNC_0(WmallDecodeCtx *VAR_0, int VAR_1)

{

    int VAR_2, VAR_3, VAR_4, VAR_5;

    int16_t *filter_coeffs = VAR_0->acfilter_coeffs;

    int VAR_6            = VAR_0->acfilter_scaling;

    int VAR_7              = VAR_0->acfilter_order;



    for (VAR_2 = 0; VAR_2 < VAR_0->num_channels; VAR_2++) {

        int *prevvalues = VAR_0->acfilter_prevvalues[VAR_2];

        for (VAR_4 = 0; VAR_4 < VAR_7; VAR_4++) {

            VAR_3 = 0;

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

                if (VAR_4 <= VAR_5)

                    VAR_3 += filter_coeffs[VAR_5] * prevvalues[VAR_5 - VAR_4];

                else

                    VAR_3 += VAR_0->channel_residues[VAR_2][VAR_4 - VAR_5 - 1] * filter_coeffs[VAR_5];

            }

            VAR_3 >>= VAR_6;

            VAR_0->channel_residues[VAR_2][VAR_4] += VAR_3;

        }

        for (VAR_4 = VAR_7; VAR_4 < VAR_1; VAR_4++) {

            VAR_3 = 0;

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

                VAR_3 += VAR_0->channel_residues[VAR_2][VAR_4 - VAR_5 - 1] * filter_coeffs[VAR_5];

            VAR_3 >>= VAR_6;

            VAR_0->channel_residues[VAR_2][VAR_4] += VAR_3;

        }

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

            prevvalues[VAR_5] = VAR_0->channel_residues[VAR_2][VAR_1 - VAR_5 - 1];

    }

}

static void FUNC_0(WmallDecodeCtx *VAR_0, int VAR_1)
{ int VAR_2, VAR_3, VAR_4, VAR_5; int16_t *filter_coeffs = VAR_0->acfilter_coeffs; int VAR_6            = VAR_0->acfilter_scaling; int VAR_7              = VAR_0->acfilter_order; for (VAR_2 = 0; VAR_2 < VAR_0->num_channels; VAR_2++) { int *prevvalues = VAR_0->acfilter_prevvalues[VAR_2]; for (VAR_4 = 0; VAR_4 < VAR_7; VAR_4++) { VAR_3 = 0; for (VAR_5 = 0; VAR_5 < VAR_7; VAR_5++) { if (VAR_4 <= VAR_5)
VAR_3 += filter_coeffs[VAR_5] * prevvalues[VAR_5 - VAR_4]; else
VAR_3 += VAR_0->channel_residues[VAR_2][VAR_4 - VAR_5 - 1] * filter_coeffs[VAR_5]; } VAR_3 >>= VAR_6; VAR_0->channel_residues[VAR_2][VAR_4] += VAR_3; } for (VAR_4 = VAR_7; VAR_4 < VAR_1; VAR_4++) { VAR_3 = 0; for (VAR_5 = 0; VAR_5 < VAR_7; VAR_5++) VAR_3 += VAR_0->channel_residues[VAR_2][VAR_4 - VAR_5 - 1] * filter_coeffs[VAR_5]; VAR_3 >>= VAR_6; VAR_0->channel_residues[VAR_2][VAR_4] += VAR_3; } for (VAR_5 = 0; VAR_5 < VAR_7; VAR_5++) prevvalues[VAR_5] = VAR_0->channel_residues[VAR_2][VAR_1 - VAR_5 - 1]; } }