static int ra288_decode_frame(AVCodecContext * avctx, void *data,

                              int *got_frame_ptr, AVPacket *avpkt)

{

    AVFrame *frame     = data;

    const uint8_t *buf = avpkt->data;

    int buf_size = avpkt->size;

    float *out;

    int i, ret;

    RA288Context *ractx = avctx->priv_data;

    GetBitContext gb;



    if (buf_size < avctx->block_align) {

        av_log(avctx, AV_LOG_ERROR,

               "Error! Input buffer is too small [%d<%d]\n",

               buf_size, avctx->block_align);

        return AVERROR_INVALIDDATA;

    }



    /* get output buffer */

    frame->nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;

    if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)

        return ret;

    out = (float *)frame->data[0];



    init_get_bits8(&gb, buf, avctx->block_align);



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

        float gain = amptable[get_bits(&gb, 3)];

        int cb_coef = get_bits(&gb, 6 + (i&1));



        decode(ractx, gain, cb_coef);



        memcpy(out, &ractx->sp_hist[70 + 36], RA288_BLOCK_SIZE * sizeof(*out));

        out += RA288_BLOCK_SIZE;



        if ((i & 7) == 3) {

            backward_filter(ractx, ractx->sp_hist, ractx->sp_rec, syn_window,

                            ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70);



            backward_filter(ractx, ractx->gain_hist, ractx->gain_rec, gain_window,

                            ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28);

        }

    }



    *got_frame_ptr = 1;



    return avctx->block_align;

}

static int ra288_decode_frame(AVCodecContext * avctx, void *data,

                              int *got_frame_ptr, AVPacket *avpkt)

{

    AVFrame *frame     = data;

    const uint8_t *buf = avpkt->data;

    int buf_size = avpkt->size;

    float *out;

    int i, ret;

    RA288Context *ractx = avctx->priv_data;

    GetBitContext gb;



    if (buf_size < avctx->block_align) {

        av_log(avctx, AV_LOG_ERROR,

               "Error! Input buffer is too small [%d<%d]\n",

               buf_size, avctx->block_align);

        return AVERROR_INVALIDDATA;

    }



    

    frame->nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;

    if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)

        return ret;

    out = (float *)frame->data[0];



    init_get_bits8(&gb, buf, avctx->block_align);



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

        float gain = amptable[get_bits(&gb, 3)];

        int cb_coef = get_bits(&gb, 6 + (i&1));



        decode(ractx, gain, cb_coef);



        memcpy(out, &ractx->sp_hist[70 + 36], RA288_BLOCK_SIZE * sizeof(*out));

        out += RA288_BLOCK_SIZE;



        if ((i & 7) == 3) {

            backward_filter(ractx, ractx->sp_hist, ractx->sp_rec, syn_window,

                            ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70);



            backward_filter(ractx, ractx->gain_hist, ractx->gain_rec, gain_window,

                            ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28);

        }

    }



    *got_frame_ptr = 1;



    return avctx->block_align;

}

    init_get_bits8(&gb, buf, avctx->block_align);
static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,

                              int *VAR_2, AVPacket *VAR_3)

{

    AVFrame *frame     = VAR_1;

    const uint8_t *VAR_4 = VAR_3->VAR_1;

    int VAR_5 = VAR_3->size;

    float *VAR_6;

    int VAR_7, VAR_8;

    RA288Context *ractx = VAR_0->priv_data;

    GetBitContext gb;



    if (VAR_5 < VAR_0->block_align) {

        av_log(VAR_0, AV_LOG_ERROR,

               "Error! Input buffer is too small [%d<%d]\n",

               VAR_5, VAR_0->block_align);

        return AVERROR_INVALIDDATA;

    }



    

    frame->nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;

    if ((VAR_8 = ff_get_buffer(VAR_0, frame, 0)) < 0)

        return VAR_8;

    VAR_6 = (float *)frame->VAR_1[0];



    init_get_bits8(&gb, VAR_4, VAR_0->block_align);



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

        float gain = amptable[get_bits(&gb, 3)];

        int cb_coef = get_bits(&gb, 6 + (VAR_7&1));



        decode(ractx, gain, cb_coef);



        memcpy(VAR_6, &ractx->sp_hist[70 + 36], RA288_BLOCK_SIZE * sizeof(*VAR_6));

        VAR_6 += RA288_BLOCK_SIZE;



        if ((VAR_7 & 7) == 3) {

            backward_filter(ractx, ractx->sp_hist, ractx->sp_rec, syn_window,

                            ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70);



            backward_filter(ractx, ractx->gain_hist, ractx->gain_rec, gain_window,

                            ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28);

        }

    }



    *VAR_2 = 1;



    return VAR_0->block_align;

}

static int FUNC_0(AVCodecContext * VAR_0, void *VAR_1,
int *VAR_2, AVPacket *VAR_3)
{ AVFrame *frame     = VAR_1; const uint8_t *VAR_4 = VAR_3->VAR_1; int VAR_5 = VAR_3->size; float *VAR_6; int VAR_7, VAR_8; RA288Context *ractx = VAR_0->priv_data; GetBitContext gb; if (VAR_5 < VAR_0->block_align) { av_log(VAR_0, AV_LOG_ERROR,
"Error! Input buffer is too small [%d<%d]\n",
VAR_5, VAR_0->block_align); return AVERROR_INVALIDDATA; } frame->nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME; if ((VAR_8 = ff_get_buffer(VAR_0, frame, 0)) < 0)
return VAR_8; VAR_6 = (float *)frame->VAR_1[0]; init_get_bits8(&gb, VAR_4, VAR_0->block_align); for (VAR_7=0; VAR_7 < RA288_BLOCKS_PER_FRAME; VAR_7++) { float gain = amptable[get_bits(&gb, 3)]; int cb_coef = get_bits(&gb, 6 + (VAR_7&1)); decode(ractx, gain, cb_coef); memcpy(VAR_6, &ractx->sp_hist[70 + 36], RA288_BLOCK_SIZE * sizeof(*VAR_6)); VAR_6 += RA288_BLOCK_SIZE; if ((VAR_7 & 7) == 3) { backward_filter(ractx, ractx->sp_hist, ractx->sp_rec, syn_window,
ractx->sp_lpc, syn_bw_tab, 36, 40, 35, 70); backward_filter(ractx, ractx->gain_hist, ractx->gain_rec, gain_window,
ractx->gain_lpc, gain_bw_tab, 10, 8, 20, 28); } } *VAR_2 = 1; return VAR_0->block_align; }