static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x,

                                                   int *dmv_y, int *pred_flag)

{

    int index, index1;

    int extend_x = 0, extend_y = 0;

    GetBitContext *gb = &v->s.gb;

    int bits, esc;

    int val, sign;

    const int* offs_tab;



    if (v->numref) {

        bits = VC1_2REF_MVDATA_VLC_BITS;

        esc  = 125;

    } else {

        bits = VC1_1REF_MVDATA_VLC_BITS;

        esc  = 71;

    }

    switch (v->dmvrange) {

    case 1:

        extend_x = 1;

        break;

    case 2:

        extend_y = 1;

        break;

    case 3:

        extend_x = extend_y = 1;

        break;

    }

    index = get_vlc2(gb, v->imv_vlc->table, bits, 3);

    if (index == esc) {

        *dmv_x = get_bits(gb, v->k_x);

        *dmv_y = get_bits(gb, v->k_y);

        if (v->numref) {

            *pred_flag = *dmv_y & 1;

            *dmv_y     = (*dmv_y + *pred_flag) >> 1;

        }

    }

    else {

        if (extend_x)

            offs_tab = offset_table2;

        else

            offs_tab = offset_table1;

        index1 = (index + 1) % 9;

        if (index1 != 0) {

            val    = get_bits(gb, index1 + extend_x);

            sign   = 0 -(val & 1);

            *dmv_x = (sign ^ ((val >> 1) + offs_tab[index1])) - sign;

        } else

            *dmv_x = 0;

        if (extend_y)

            offs_tab = offset_table2;

        else

            offs_tab = offset_table1;

        index1 = (index + 1) / 9;

        if (index1 > v->numref) {

            val    = get_bits(gb, (index1 + (extend_y << v->numref)) >> v->numref);

            sign   = 0 - (val & 1);

            *dmv_y = (sign ^ ((val >> 1) + offs_tab[index1 >> v->numref])) - sign;

        } else

            *dmv_y = 0;

        if (v->numref)

            *pred_flag = index1 & 1;

    }

}

static av_always_inline void get_mvdata_interlaced(VC1Context *v, int *dmv_x,

                                                   int *dmv_y, int *pred_flag)

{

    int index, index1;

    int extend_x = 0, extend_y = 0;

    GetBitContext *gb = &v->s.gb;

    int bits, esc;

    int val, sign;

    const int* offs_tab;



    if (v->numref) {

        bits = VC1_2REF_MVDATA_VLC_BITS;

        esc  = 125;

    } else {

        bits = VC1_1REF_MVDATA_VLC_BITS;

        esc  = 71;

    }

    switch (v->dmvrange) {

    case 1:

        extend_x = 1;

        break;

    case 2:

        extend_y = 1;

        break;

    case 3:

        extend_x = extend_y = 1;

        break;

    }

    index = get_vlc2(gb, v->imv_vlc->table, bits, 3);

    if (index == esc) {

        *dmv_x = get_bits(gb, v->k_x);

        *dmv_y = get_bits(gb, v->k_y);

        if (v->numref) {

            *pred_flag = *dmv_y & 1;

            *dmv_y     = (*dmv_y + *pred_flag) >> 1;

        }

    }

    else {

        if (extend_x)

            offs_tab = offset_table2;

        else

            offs_tab = offset_table1;

        index1 = (index + 1) % 9;

        if (index1 != 0) {

            val    = get_bits(gb, index1 + extend_x);

            sign   = 0 -(val & 1);

            *dmv_x = (sign ^ ((val >> 1) + offs_tab[index1])) - sign;

        } else

            *dmv_x = 0;

        if (extend_y)

            offs_tab = offset_table2;

        else

            offs_tab = offset_table1;

        index1 = (index + 1) / 9;

        if (index1 > v->numref) {

            val    = get_bits(gb, (index1 + (extend_y << v->numref)) >> v->numref);

            sign   = 0 - (val & 1);

            *dmv_y = (sign ^ ((val >> 1) + offs_tab[index1 >> v->numref])) - sign;

        } else

            *dmv_y = 0;

        if (v->numref)

            *pred_flag = index1 & 1;

    }

}

            *pred_flag = *dmv_y & 1;             *dmv_y     = (*dmv_y + *pred_flag) >> 1;         if (v->numref)
static av_always_inline void FUNC_0(VC1Context *v, int *dmv_x,

                                                   int *dmv_y, int *pred_flag)

{

    int VAR_0, VAR_1;

    int VAR_2 = 0, VAR_3 = 0;

    GetBitContext *gb = &v->s.gb;

    int VAR_4, VAR_5;

    int VAR_6, VAR_7;

    const int* VAR_8;



    if (v->numref) {

        VAR_4 = VC1_2REF_MVDATA_VLC_BITS;

        VAR_5  = 125;

    } else {

        VAR_4 = VC1_1REF_MVDATA_VLC_BITS;

        VAR_5  = 71;

    }

    switch (v->dmvrange) {

    case 1:

        VAR_2 = 1;

        break;

    case 2:

        VAR_3 = 1;

        break;

    case 3:

        VAR_2 = VAR_3 = 1;

        break;

    }

    VAR_0 = get_vlc2(gb, v->imv_vlc->table, VAR_4, 3);

    if (VAR_0 == VAR_5) {

        *dmv_x = get_bits(gb, v->k_x);

        *dmv_y = get_bits(gb, v->k_y);

        if (v->numref) {

            *pred_flag = *dmv_y & 1;

            *dmv_y     = (*dmv_y + *pred_flag) >> 1;

        }

    }

    else {

        if (VAR_2)

            VAR_8 = offset_table2;

        else

            VAR_8 = offset_table1;

        VAR_1 = (VAR_0 + 1) % 9;

        if (VAR_1 != 0) {

            VAR_6    = get_bits(gb, VAR_1 + VAR_2);

            VAR_7   = 0 -(VAR_6 & 1);

            *dmv_x = (VAR_7 ^ ((VAR_6 >> 1) + VAR_8[VAR_1])) - VAR_7;

        } else

            *dmv_x = 0;

        if (VAR_3)

            VAR_8 = offset_table2;

        else

            VAR_8 = offset_table1;

        VAR_1 = (VAR_0 + 1) / 9;

        if (VAR_1 > v->numref) {

            VAR_6    = get_bits(gb, (VAR_1 + (VAR_3 << v->numref)) >> v->numref);

            VAR_7   = 0 - (VAR_6 & 1);

            *dmv_y = (VAR_7 ^ ((VAR_6 >> 1) + VAR_8[VAR_1 >> v->numref])) - VAR_7;

        } else

            *dmv_y = 0;

        if (v->numref)

            *pred_flag = VAR_1 & 1;

    }

}

static av_always_inline void FUNC_0(VC1Context *v, int *dmv_x,
int *dmv_y, int *pred_flag)
{ int VAR_0, VAR_1; int VAR_2 = 0, VAR_3 = 0; GetBitContext *gb = &v->s.gb; int VAR_4, VAR_5; int VAR_6, VAR_7; const int* VAR_8; if (v->numref) { VAR_4 = VC1_2REF_MVDATA_VLC_BITS; VAR_5  = 125; } else { VAR_4 = VC1_1REF_MVDATA_VLC_BITS; VAR_5  = 71; } switch (v->dmvrange) { case 1:
VAR_2 = 1; break; case 2:
VAR_3 = 1; break; case 3:
VAR_2 = VAR_3 = 1; break; } VAR_0 = get_vlc2(gb, v->imv_vlc->table, VAR_4, 3); if (VAR_0 == VAR_5) { *dmv_x = get_bits(gb, v->k_x); *dmv_y = get_bits(gb, v->k_y); if (v->numref) { *pred_flag = *dmv_y & 1; *dmv_y     = (*dmv_y + *pred_flag) >> 1; } } else { if (VAR_2)
VAR_8 = offset_table2; else
VAR_8 = offset_table1; VAR_1 = (VAR_0 + 1) % 9; if (VAR_1 != 0) { VAR_6    = get_bits(gb, VAR_1 + VAR_2); VAR_7   = 0 -(VAR_6 & 1); *dmv_x = (VAR_7 ^ ((VAR_6 >> 1) + VAR_8[VAR_1])) - VAR_7; } else *dmv_x = 0; if (VAR_3)
VAR_8 = offset_table2; else
VAR_8 = offset_table1; VAR_1 = (VAR_0 + 1) / 9; if (VAR_1 > v->numref) { VAR_6    = get_bits(gb, (VAR_1 + (VAR_3 << v->numref)) >> v->numref); VAR_7   = 0 - (VAR_6 & 1); *dmv_y = (VAR_7 ^ ((VAR_6 >> 1) + VAR_8[VAR_1 >> v->numref])) - VAR_7; } else *dmv_y = 0; if (v->numref)
*pred_flag = VAR_1 & 1; } }