static int mace3_decode_frame(AVCodecContext *avctx,

                              void *data, int *data_size,

                              const uint8_t *buf, int buf_size)

{

    int16_t *samples = data;

    MACEContext *ctx = avctx->priv_data;

    int i, j, k;



    for(i = 0; i < avctx->channels; i++) {

        int16_t *output = samples + i;



        for (j=0; j < buf_size / 2 / avctx->channels; j++)

            for (k=0; k < 2; k++) {

                uint8_t pkt = buf[i*2 + j*2*avctx->channels + k];

                chomp3(&ctx->chd[i], output, pkt       &7, MACEtab1, MACEtab2,

                       8, avctx->channels);

                output += avctx->channels;

                chomp3(&ctx->chd[i], output,(pkt >> 3) &3, MACEtab3, MACEtab4,

                       4, avctx->channels);

                output += avctx->channels;

                chomp3(&ctx->chd[i], output, pkt >> 5    , MACEtab1, MACEtab2,

                       8, avctx->channels);

                output += avctx->channels;

            }

    }



    *data_size = 2 * 3 * buf_size;



    return buf_size;

}

static int mace3_decode_frame(AVCodecContext *avctx,

                              void *data, int *data_size,

                              const uint8_t *buf, int buf_size)

{

    int16_t *samples = data;

    MACEContext *ctx = avctx->priv_data;

    int i, j, k;



    for(i = 0; i < avctx->channels; i++) {

        int16_t *output = samples + i;



        for (j=0; j < buf_size / 2 / avctx->channels; j++)

            for (k=0; k < 2; k++) {

                uint8_t pkt = buf[i*2 + j*2*avctx->channels + k];

                chomp3(&ctx->chd[i], output, pkt       &7, MACEtab1, MACEtab2,

                       8, avctx->channels);

                output += avctx->channels;

                chomp3(&ctx->chd[i], output,(pkt >> 3) &3, MACEtab3, MACEtab4,

                       4, avctx->channels);

                output += avctx->channels;

                chomp3(&ctx->chd[i], output, pkt >> 5    , MACEtab1, MACEtab2,

                       8, avctx->channels);

                output += avctx->channels;

            }

    }



    *data_size = 2 * 3 * buf_size;



    return buf_size;

}

                       8, avctx->channels);                        4, avctx->channels);                        8, avctx->channels);
static int FUNC_0(AVCodecContext *VAR_0,

                              void *VAR_1, int *VAR_2,

                              const uint8_t *VAR_3, int VAR_4)

{

    int16_t *samples = VAR_1;

    MACEContext *ctx = VAR_0->priv_data;

    int VAR_5, VAR_6, VAR_7;



    for(VAR_5 = 0; VAR_5 < VAR_0->channels; VAR_5++) {

        int16_t *output = samples + VAR_5;



        for (VAR_6=0; VAR_6 < VAR_4 / 2 / VAR_0->channels; VAR_6++)

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

                uint8_t pkt = VAR_3[VAR_5*2 + VAR_6*2*VAR_0->channels + VAR_7];

                chomp3(&ctx->chd[VAR_5], output, pkt       &7, MACEtab1, MACEtab2,

                       8, VAR_0->channels);

                output += VAR_0->channels;

                chomp3(&ctx->chd[VAR_5], output,(pkt >> 3) &3, MACEtab3, MACEtab4,

                       4, VAR_0->channels);

                output += VAR_0->channels;

                chomp3(&ctx->chd[VAR_5], output, pkt >> 5    , MACEtab1, MACEtab2,

                       8, VAR_0->channels);

                output += VAR_0->channels;

            }

    }



    *VAR_2 = 2 * 3 * VAR_4;



    return VAR_4;

}

static int FUNC_0(AVCodecContext *VAR_0,
void *VAR_1, int *VAR_2,
const uint8_t *VAR_3, int VAR_4)
{ int16_t *samples = VAR_1; MACEContext *ctx = VAR_0->priv_data; int VAR_5, VAR_6, VAR_7; for(VAR_5 = 0; VAR_5 < VAR_0->channels; VAR_5++) { int16_t *output = samples + VAR_5; for (VAR_6=0; VAR_6 < VAR_4 / 2 / VAR_0->channels; VAR_6++) for (VAR_7=0; VAR_7 < 2; VAR_7++) { uint8_t pkt = VAR_3[VAR_5*2 + VAR_6*2*VAR_0->channels + VAR_7]; chomp3(&ctx->chd[VAR_5], output, pkt       &7, MACEtab1, MACEtab2,
8, VAR_0->channels); output += VAR_0->channels; chomp3(&ctx->chd[VAR_5], output,(pkt >> 3) &3, MACEtab3, MACEtab4,
4, VAR_0->channels); output += VAR_0->channels; chomp3(&ctx->chd[VAR_5], output, pkt >> 5    , MACEtab1, MACEtab2,
8, VAR_0->channels); output += VAR_0->channels; } } *VAR_2 = 2 * 3 * VAR_4; return VAR_4; }