static int vmdaudio_decode_init(AVCodecContext *avctx)

{

    VmdAudioContext *s = (VmdAudioContext *)avctx->priv_data;

    int i;



    s->channels = avctx->channels;

    s->bits = avctx->bits_per_sample;

    s->block_align = avctx->block_align;



printf ("  %d channels, %d bits/sample, block align = %d\n",

  s->channels, s->bits, s->block_align);



    /* set up the steps8 and steps16 tables */

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

        if (i < 4)

            s->steps8[i] = i;

        else

            s->steps8[i] = s->steps8[i - 1] + i - 1;



        if (i == 0)

            s->steps16[i] = 0;

        else if (i == 1)

            s->steps16[i] = 4;

        else if (i == 2)

            s->steps16[i] = 16;

        else

            s->steps16[i] = 1 << (i + 4);

    }



    /* set up the step128 table */

    s->steps128[0] = 0;

    s->steps128[1] = 8;

    for (i = 0x02; i <= 0x20; i++)

        s->steps128[i] = (i - 1) << 4;

    for (i = 0x21; i <= 0x60; i++)

        s->steps128[i] = (i + 0x1F) << 3;

    for (i = 0x61; i <= 0x70; i++)

        s->steps128[i] = (i - 0x51) << 6;

    for (i = 0x71; i <= 0x78; i++)

        s->steps128[i] = (i - 0x69) << 8;

    for (i = 0x79; i <= 0x7D; i++)

        s->steps128[i] = (i - 0x75) << 10;

    s->steps128[0x7E] = 0x3000;

    s->steps128[0x7F] = 0x4000;



    /* set up the negative half of each table */

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

        s->steps8[i + 8] = -s->steps8[i];

        s->steps16[i + 8] = -s->steps16[i];

    }

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

      s->steps128[i + 128] = -s->steps128[i];



    return 0;

}

static int vmdaudio_decode_init(AVCodecContext *avctx)

{

    VmdAudioContext *s = (VmdAudioContext *)avctx->priv_data;

    int i;



    s->channels = avctx->channels;

    s->bits = avctx->bits_per_sample;

    s->block_align = avctx->block_align;



printf ("  %d channels, %d bits/sample, block align = %d\n",

  s->channels, s->bits, s->block_align);



    

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

        if (i < 4)

            s->steps8[i] = i;

        else

            s->steps8[i] = s->steps8[i - 1] + i - 1;



        if (i == 0)

            s->steps16[i] = 0;

        else if (i == 1)

            s->steps16[i] = 4;

        else if (i == 2)

            s->steps16[i] = 16;

        else

            s->steps16[i] = 1 << (i + 4);

    }



    

    s->steps128[0] = 0;

    s->steps128[1] = 8;

    for (i = 0x02; i <= 0x20; i++)

        s->steps128[i] = (i - 1) << 4;

    for (i = 0x21; i <= 0x60; i++)

        s->steps128[i] = (i + 0x1F) << 3;

    for (i = 0x61; i <= 0x70; i++)

        s->steps128[i] = (i - 0x51) << 6;

    for (i = 0x71; i <= 0x78; i++)

        s->steps128[i] = (i - 0x69) << 8;

    for (i = 0x79; i <= 0x7D; i++)

        s->steps128[i] = (i - 0x75) << 10;

    s->steps128[0x7E] = 0x3000;

    s->steps128[0x7F] = 0x4000;



    

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

        s->steps8[i + 8] = -s->steps8[i];

        s->steps16[i + 8] = -s->steps16[i];

    }

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

      s->steps128[i + 128] = -s->steps128[i];



    return 0;

}

printf ("  %d channels, %d bits/sample, block align = %d\n",   s->channels, s->bits, s->block_align);
static int FUNC_0(AVCodecContext *VAR_0)

{

    VmdAudioContext *s = (VmdAudioContext *)VAR_0->priv_data;

    int VAR_1;



    s->channels = VAR_0->channels;

    s->bits = VAR_0->bits_per_sample;

    s->block_align = VAR_0->block_align;



printf ("  %d channels, %d bits/sample, block align = %d\n",

  s->channels, s->bits, s->block_align);



    

    for (VAR_1 = 0; VAR_1 < 8; VAR_1++) {

        if (VAR_1 < 4)

            s->steps8[VAR_1] = VAR_1;

        else

            s->steps8[VAR_1] = s->steps8[VAR_1 - 1] + VAR_1 - 1;



        if (VAR_1 == 0)

            s->steps16[VAR_1] = 0;

        else if (VAR_1 == 1)

            s->steps16[VAR_1] = 4;

        else if (VAR_1 == 2)

            s->steps16[VAR_1] = 16;

        else

            s->steps16[VAR_1] = 1 << (VAR_1 + 4);

    }



    

    s->steps128[0] = 0;

    s->steps128[1] = 8;

    for (VAR_1 = 0x02; VAR_1 <= 0x20; VAR_1++)

        s->steps128[VAR_1] = (VAR_1 - 1) << 4;

    for (VAR_1 = 0x21; VAR_1 <= 0x60; VAR_1++)

        s->steps128[VAR_1] = (VAR_1 + 0x1F) << 3;

    for (VAR_1 = 0x61; VAR_1 <= 0x70; VAR_1++)

        s->steps128[VAR_1] = (VAR_1 - 0x51) << 6;

    for (VAR_1 = 0x71; VAR_1 <= 0x78; VAR_1++)

        s->steps128[VAR_1] = (VAR_1 - 0x69) << 8;

    for (VAR_1 = 0x79; VAR_1 <= 0x7D; VAR_1++)

        s->steps128[VAR_1] = (VAR_1 - 0x75) << 10;

    s->steps128[0x7E] = 0x3000;

    s->steps128[0x7F] = 0x4000;



    

    for (VAR_1 = 0; VAR_1 < 8; VAR_1++) {

        s->steps8[VAR_1 + 8] = -s->steps8[VAR_1];

        s->steps16[VAR_1 + 8] = -s->steps16[VAR_1];

    }

    for (VAR_1 = 0; VAR_1 < 128; VAR_1++)

      s->steps128[VAR_1 + 128] = -s->steps128[VAR_1];



    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0)
{ VmdAudioContext *s = (VmdAudioContext *)VAR_0->priv_data; int VAR_1; s->channels = VAR_0->channels; s->bits = VAR_0->bits_per_sample; s->block_align = VAR_0->block_align; printf ("  %d channels, %d bits/sample, block align = %d\n",
s->channels, s->bits, s->block_align); for (VAR_1 = 0; VAR_1 < 8; VAR_1++) { if (VAR_1 < 4)
s->steps8[VAR_1] = VAR_1; else
s->steps8[VAR_1] = s->steps8[VAR_1 - 1] + VAR_1 - 1; if (VAR_1 == 0)
s->steps16[VAR_1] = 0; else if (VAR_1 == 1)
s->steps16[VAR_1] = 4; else if (VAR_1 == 2)
s->steps16[VAR_1] = 16; else
s->steps16[VAR_1] = 1 << (VAR_1 + 4); } s->steps128[0] = 0; s->steps128[1] = 8; for (VAR_1 = 0x02; VAR_1 <= 0x20; VAR_1++) s->steps128[VAR_1] = (VAR_1 - 1) << 4; for (VAR_1 = 0x21; VAR_1 <= 0x60; VAR_1++) s->steps128[VAR_1] = (VAR_1 + 0x1F) << 3; for (VAR_1 = 0x61; VAR_1 <= 0x70; VAR_1++) s->steps128[VAR_1] = (VAR_1 - 0x51) << 6; for (VAR_1 = 0x71; VAR_1 <= 0x78; VAR_1++) s->steps128[VAR_1] = (VAR_1 - 0x69) << 8; for (VAR_1 = 0x79; VAR_1 <= 0x7D; VAR_1++) s->steps128[VAR_1] = (VAR_1 - 0x75) << 10; s->steps128[0x7E] = 0x3000; s->steps128[0x7F] = 0x4000; for (VAR_1 = 0; VAR_1 < 8; VAR_1++) { s->steps8[VAR_1 + 8] = -s->steps8[VAR_1]; s->steps16[VAR_1 + 8] = -s->steps16[VAR_1]; } for (VAR_1 = 0; VAR_1 < 128; VAR_1++) s->steps128[VAR_1 + 128] = -s->steps128[VAR_1]; return 0; }