static int decode_subframe_fixed(FLACContext *s, int channel, int pred_order)

{

    int i;

        

    av_log(s->avctx, AV_LOG_DEBUG, "  SUBFRAME FIXED\n");

        

    /* warm up samples */

    av_log(s->avctx, AV_LOG_DEBUG, "   warm up samples: %d\n", pred_order);

        

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

    {

        s->decoded[channel][i] = get_sbits(&s->gb, s->curr_bps);

//        av_log(s->avctx, AV_LOG_DEBUG, "    %d: %d\n", i, s->decoded[channel][i]);

    }

    

    if (decode_residuals(s, channel, pred_order) < 0)

        return -1;



    switch(pred_order)

    {

        case 0:

            break;

        case 1:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] +=   s->decoded[channel][i-1];

            break;

        case 2:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] += 2*s->decoded[channel][i-1]

                                          - s->decoded[channel][i-2];

            break;

        case 3:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] += 3*s->decoded[channel][i-1] 

                                        - 3*s->decoded[channel][i-2]

                                        +   s->decoded[channel][i-3];

            break;

        case 4:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] += 4*s->decoded[channel][i-1] 

                                        - 6*s->decoded[channel][i-2]

                                        + 4*s->decoded[channel][i-3]

                                        -   s->decoded[channel][i-4];

            break;

        default:

            av_log(s->avctx, AV_LOG_ERROR, "illegal pred order %d\n", pred_order);

            return -1;

    }



    return 0;

}

static int decode_subframe_fixed(FLACContext *s, int channel, int pred_order)

{

    int i;

        

    av_log(s->avctx, AV_LOG_DEBUG, "  SUBFRAME FIXED\n");

        

    

    av_log(s->avctx, AV_LOG_DEBUG, "   warm up samples: %d\n", pred_order);

        

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

    {

        s->decoded[channel][i] = get_sbits(&s->gb, s->curr_bps);



    }

    

    if (decode_residuals(s, channel, pred_order) < 0)

        return -1;



    switch(pred_order)

    {

        case 0:

            break;

        case 1:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] +=   s->decoded[channel][i-1];

            break;

        case 2:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] += 2*s->decoded[channel][i-1]

                                          - s->decoded[channel][i-2];

            break;

        case 3:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] += 3*s->decoded[channel][i-1] 

                                        - 3*s->decoded[channel][i-2]

                                        +   s->decoded[channel][i-3];

            break;

        case 4:

            for (i = pred_order; i < s->blocksize; i++)

                s->decoded[channel][i] += 4*s->decoded[channel][i-1] 

                                        - 6*s->decoded[channel][i-2]

                                        + 4*s->decoded[channel][i-3]

                                        -   s->decoded[channel][i-4];

            break;

        default:

            av_log(s->avctx, AV_LOG_ERROR, "illegal pred order %d\n", pred_order);

            return -1;

    }



    return 0;

}

static int FUNC_0(FLACContext *VAR_0, int VAR_1, int VAR_2)

{

    int VAR_3;

        

    av_log(VAR_0->avctx, AV_LOG_DEBUG, "  SUBFRAME FIXED\n");

        

    

    av_log(VAR_0->avctx, AV_LOG_DEBUG, "   warm up samples: %d\n", VAR_2);

        

    for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++)

    {

        VAR_0->decoded[VAR_1][VAR_3] = get_sbits(&VAR_0->gb, VAR_0->curr_bps);



    }

    

    if (decode_residuals(VAR_0, VAR_1, VAR_2) < 0)

        return -1;



    switch(VAR_2)

    {

        case 0:

            break;

        case 1:

            for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++)

                VAR_0->decoded[VAR_1][VAR_3] +=   VAR_0->decoded[VAR_1][VAR_3-1];

            break;

        case 2:

            for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++)

                VAR_0->decoded[VAR_1][VAR_3] += 2*VAR_0->decoded[VAR_1][VAR_3-1]

                                          - VAR_0->decoded[VAR_1][VAR_3-2];

            break;

        case 3:

            for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++)

                VAR_0->decoded[VAR_1][VAR_3] += 3*VAR_0->decoded[VAR_1][VAR_3-1] 

                                        - 3*VAR_0->decoded[VAR_1][VAR_3-2]

                                        +   VAR_0->decoded[VAR_1][VAR_3-3];

            break;

        case 4:

            for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++)

                VAR_0->decoded[VAR_1][VAR_3] += 4*VAR_0->decoded[VAR_1][VAR_3-1] 

                                        - 6*VAR_0->decoded[VAR_1][VAR_3-2]

                                        + 4*VAR_0->decoded[VAR_1][VAR_3-3]

                                        -   VAR_0->decoded[VAR_1][VAR_3-4];

            break;

        default:

            av_log(VAR_0->avctx, AV_LOG_ERROR, "illegal pred order %d\n", VAR_2);

            return -1;

    }



    return 0;

}

static int FUNC_0(FLACContext *VAR_0, int VAR_1, int VAR_2)
{ int VAR_3; av_log(VAR_0->avctx, AV_LOG_DEBUG, "  SUBFRAME FIXED\n"); av_log(VAR_0->avctx, AV_LOG_DEBUG, "   warm up samples: %d\n", VAR_2); for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) { VAR_0->decoded[VAR_1][VAR_3] = get_sbits(&VAR_0->gb, VAR_0->curr_bps); } if (decode_residuals(VAR_0, VAR_1, VAR_2) < 0)
return -1; switch(VAR_2)
{ case 0:
break; case 1:
for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++) VAR_0->decoded[VAR_1][VAR_3] +=   VAR_0->decoded[VAR_1][VAR_3-1]; break; case 2:
for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++) VAR_0->decoded[VAR_1][VAR_3] += 2*VAR_0->decoded[VAR_1][VAR_3-1]
- VAR_0->decoded[VAR_1][VAR_3-2]; break; case 3:
for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++) VAR_0->decoded[VAR_1][VAR_3] += 3*VAR_0->decoded[VAR_1][VAR_3-1]
- 3*VAR_0->decoded[VAR_1][VAR_3-2]
+   VAR_0->decoded[VAR_1][VAR_3-3]; break; case 4:
for (VAR_3 = VAR_2; VAR_3 < VAR_0->blocksize; VAR_3++) VAR_0->decoded[VAR_1][VAR_3] += 4*VAR_0->decoded[VAR_1][VAR_3-1]
- 6*VAR_0->decoded[VAR_1][VAR_3-2]
+ 4*VAR_0->decoded[VAR_1][VAR_3-3]
-   VAR_0->decoded[VAR_1][VAR_3-4]; break; default:
av_log(VAR_0->avctx, AV_LOG_ERROR, "illegal pred order %d\n", VAR_2); return -1; } return 0; }