static int adx_decode(ADXContext *c, int16_t *out, int offset,

                      const uint8_t *in, int ch)

{

    ADXChannelState *prev = &c->prev[ch];

    GetBitContext gb;

    int scale = AV_RB16(in);

    int i;

    int s0, s1, s2, d;



    /* check if this is an EOF packet */

    if (scale & 0x8000)

        return -1;



    init_get_bits(&gb, in + 2, (BLOCK_SIZE - 2) * 8);

    out += offset;

    s1 = prev->s1;

    s2 = prev->s2;

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

        d  = get_sbits(&gb, 4);

        s0 = ((d << COEFF_BITS) * scale + c->coeff[0] * s1 + c->coeff[1] * s2) >> COEFF_BITS;

        s2 = s1;

        s1 = av_clip_int16(s0);

        *out++ = s1;

    }

    prev->s1 = s1;

    prev->s2 = s2;



    return 0;

}

static int adx_decode(ADXContext *c, int16_t *out, int offset,

                      const uint8_t *in, int ch)

{

    ADXChannelState *prev = &c->prev[ch];

    GetBitContext gb;

    int scale = AV_RB16(in);

    int i;

    int s0, s1, s2, d;



    

    if (scale & 0x8000)

        return -1;



    init_get_bits(&gb, in + 2, (BLOCK_SIZE - 2) * 8);

    out += offset;

    s1 = prev->s1;

    s2 = prev->s2;

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

        d  = get_sbits(&gb, 4);

        s0 = ((d << COEFF_BITS) * scale + c->coeff[0] * s1 + c->coeff[1] * s2) >> COEFF_BITS;

        s2 = s1;

        s1 = av_clip_int16(s0);

        *out++ = s1;

    }

    prev->s1 = s1;

    prev->s2 = s2;



    return 0;

}

        s0 = ((d << COEFF_BITS) * scale + c->coeff[0] * s1 + c->coeff[1] * s2) >> COEFF_BITS;
static int FUNC_0(ADXContext *VAR_0, int16_t *VAR_1, int VAR_2,

                      const uint8_t *VAR_3, int VAR_4)

{

    ADXChannelState *prev = &VAR_0->prev[VAR_4];

    GetBitContext gb;

    int VAR_5 = AV_RB16(VAR_3);

    int VAR_6;

    int VAR_7, VAR_8, VAR_9, VAR_10;



    

    if (VAR_5 & 0x8000)

        return -1;



    init_get_bits(&gb, VAR_3 + 2, (BLOCK_SIZE - 2) * 8);

    VAR_1 += VAR_2;

    VAR_8 = prev->VAR_8;

    VAR_9 = prev->VAR_9;

    for (VAR_6 = 0; VAR_6 < BLOCK_SAMPLES; VAR_6++) {

        VAR_10  = get_sbits(&gb, 4);

        VAR_7 = ((VAR_10 << COEFF_BITS) * VAR_5 + VAR_0->coeff[0] * VAR_8 + VAR_0->coeff[1] * VAR_9) >> COEFF_BITS;

        VAR_9 = VAR_8;

        VAR_8 = av_clip_int16(VAR_7);

        *VAR_1++ = VAR_8;

    }

    prev->VAR_8 = VAR_8;

    prev->VAR_9 = VAR_9;



    return 0;

}

static int FUNC_0(ADXContext *VAR_0, int16_t *VAR_1, int VAR_2,
const uint8_t *VAR_3, int VAR_4)
{ ADXChannelState *prev = &VAR_0->prev[VAR_4]; GetBitContext gb; int VAR_5 = AV_RB16(VAR_3); int VAR_6; int VAR_7, VAR_8, VAR_9, VAR_10; if (VAR_5 & 0x8000)
return -1; init_get_bits(&gb, VAR_3 + 2, (BLOCK_SIZE - 2) * 8); VAR_1 += VAR_2; VAR_8 = prev->VAR_8; VAR_9 = prev->VAR_9; for (VAR_6 = 0; VAR_6 < BLOCK_SAMPLES; VAR_6++) { VAR_10  = get_sbits(&gb, 4); VAR_7 = ((VAR_10 << COEFF_BITS) * VAR_5 + VAR_0->coeff[0] * VAR_8 + VAR_0->coeff[1] * VAR_9) >> COEFF_BITS; VAR_9 = VAR_8; VAR_8 = av_clip_int16(VAR_7); *VAR_1++ = VAR_8; } prev->VAR_8 = VAR_8; prev->VAR_9 = VAR_9; return 0; }