static void vp6_parse_coeff_huffman(VP56Context *s)

{

    VP56Model *model = s->modelp;

    uint8_t *permute = s->scantable.permutated;

    VLC *vlc_coeff;

    int coeff, sign, coeff_idx;

    int b, cg, idx;

    int pt = 0;    /* plane type (0 for Y, 1 for U or V) */



    for (b=0; b<6; b++) {

        int ct = 0;    /* code type */

        if (b > 3) pt = 1;

        vlc_coeff = &s->dccv_vlc[pt];



        for (coeff_idx=0; coeff_idx<64; ) {

            int run = 1;

            if (coeff_idx<2 && s->nb_null[coeff_idx][pt]) {

                s->nb_null[coeff_idx][pt]--;

                if (coeff_idx)

                    break;

            } else {

                if (get_bits_count(&s->gb) >= s->gb.size_in_bits)

                    return;

                coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);

                if (coeff == 0) {

                    if (coeff_idx) {

                        int pt = (coeff_idx >= 6);

                        run += get_vlc2(&s->gb, s->runv_vlc[pt].table, 9, 3);

                        if (run >= 9)

                            run += get_bits(&s->gb, 6);

                    } else

                        s->nb_null[0][pt] = vp6_get_nb_null(s);

                    ct = 0;

                } else if (coeff == 11) {  /* end of block */

                    if (coeff_idx == 1)    /* first AC coeff ? */

                        s->nb_null[1][pt] = vp6_get_nb_null(s);

                    break;

                } else {

                    int coeff2 = vp56_coeff_bias[coeff];

                    if (coeff > 4)

                        coeff2 += get_bits(&s->gb, coeff <= 9 ? coeff - 4 : 11);

                    ct = 1 + (coeff2 > 1);

                    sign = get_bits1(&s->gb);

                    coeff2 = (coeff2 ^ -sign) + sign;

                    if (coeff_idx)

                        coeff2 *= s->dequant_ac;

                    idx = model->coeff_index_to_pos[coeff_idx];

                    s->block_coeff[b][permute[idx]] = coeff2;

                }

            }

            coeff_idx+=run;

            cg = FFMIN(vp6_coeff_groups[coeff_idx], 3);

            vlc_coeff = &s->ract_vlc[pt][ct][cg];

        }

    }

}

static void vp6_parse_coeff_huffman(VP56Context *s)

{

    VP56Model *model = s->modelp;

    uint8_t *permute = s->scantable.permutated;

    VLC *vlc_coeff;

    int coeff, sign, coeff_idx;

    int b, cg, idx;

    int pt = 0;    



    for (b=0; b<6; b++) {

        int ct = 0;    

        if (b > 3) pt = 1;

        vlc_coeff = &s->dccv_vlc[pt];



        for (coeff_idx=0; coeff_idx<64; ) {

            int run = 1;

            if (coeff_idx<2 && s->nb_null[coeff_idx][pt]) {

                s->nb_null[coeff_idx][pt]--;

                if (coeff_idx)

                    break;

            } else {

                if (get_bits_count(&s->gb) >= s->gb.size_in_bits)

                    return;

                coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);

                if (coeff == 0) {

                    if (coeff_idx) {

                        int pt = (coeff_idx >= 6);

                        run += get_vlc2(&s->gb, s->runv_vlc[pt].table, 9, 3);

                        if (run >= 9)

                            run += get_bits(&s->gb, 6);

                    } else

                        s->nb_null[0][pt] = vp6_get_nb_null(s);

                    ct = 0;

                } else if (coeff == 11) {  

                    if (coeff_idx == 1)    

                        s->nb_null[1][pt] = vp6_get_nb_null(s);

                    break;

                } else {

                    int coeff2 = vp56_coeff_bias[coeff];

                    if (coeff > 4)

                        coeff2 += get_bits(&s->gb, coeff <= 9 ? coeff - 4 : 11);

                    ct = 1 + (coeff2 > 1);

                    sign = get_bits1(&s->gb);

                    coeff2 = (coeff2 ^ -sign) + sign;

                    if (coeff_idx)

                        coeff2 *= s->dequant_ac;

                    idx = model->coeff_index_to_pos[coeff_idx];

                    s->block_coeff[b][permute[idx]] = coeff2;

                }

            }

            coeff_idx+=run;

            cg = FFMIN(vp6_coeff_groups[coeff_idx], 3);

            vlc_coeff = &s->ract_vlc[pt][ct][cg];

        }

    }

}

        for (coeff_idx=0; coeff_idx<64; ) {
static void FUNC_0(VP56Context *VAR_0)

{

    VP56Model *model = VAR_0->modelp;

    uint8_t *permute = VAR_0->scantable.permutated;

    VLC *vlc_coeff;

    int VAR_1, VAR_2, VAR_3;

    int VAR_4, VAR_5, VAR_6;

    int VAR_10 = 0;    



    for (VAR_4=0; VAR_4<6; VAR_4++) {

        int VAR_8 = 0;    

        if (VAR_4 > 3) VAR_10 = 1;

        vlc_coeff = &VAR_0->dccv_vlc[VAR_10];



        for (VAR_3=0; VAR_3<64; ) {

            int VAR_9 = 1;

            if (VAR_3<2 && VAR_0->nb_null[VAR_3][VAR_10]) {

                VAR_0->nb_null[VAR_3][VAR_10]--;

                if (VAR_3)

                    break;

            } else {

                if (get_bits_count(&VAR_0->gb) >= VAR_0->gb.size_in_bits)

                    return;

                VAR_1 = get_vlc2(&VAR_0->gb, vlc_coeff->table, 9, 3);

                if (VAR_1 == 0) {

                    if (VAR_3) {

                        int VAR_10 = (VAR_3 >= 6);

                        VAR_9 += get_vlc2(&VAR_0->gb, VAR_0->runv_vlc[VAR_10].table, 9, 3);

                        if (VAR_9 >= 9)

                            VAR_9 += get_bits(&VAR_0->gb, 6);

                    } else

                        VAR_0->nb_null[0][VAR_10] = vp6_get_nb_null(VAR_0);

                    VAR_8 = 0;

                } else if (VAR_1 == 11) {  

                    if (VAR_3 == 1)    

                        VAR_0->nb_null[1][VAR_10] = vp6_get_nb_null(VAR_0);

                    break;

                } else {

                    int VAR_10 = vp56_coeff_bias[VAR_1];

                    if (VAR_1 > 4)

                        VAR_10 += get_bits(&VAR_0->gb, VAR_1 <= 9 ? VAR_1 - 4 : 11);

                    VAR_8 = 1 + (VAR_10 > 1);

                    VAR_2 = get_bits1(&VAR_0->gb);

                    VAR_10 = (VAR_10 ^ -VAR_2) + VAR_2;

                    if (VAR_3)

                        VAR_10 *= VAR_0->dequant_ac;

                    VAR_6 = model->coeff_index_to_pos[VAR_3];

                    VAR_0->block_coeff[VAR_4][permute[VAR_6]] = VAR_10;

                }

            }

            VAR_3+=VAR_9;

            VAR_5 = FFMIN(vp6_coeff_groups[VAR_3], 3);

            vlc_coeff = &VAR_0->ract_vlc[VAR_10][VAR_8][VAR_5];

        }

    }

}

static void FUNC_0(VP56Context *VAR_0)
{ VP56Model *model = VAR_0->modelp; uint8_t *permute = VAR_0->scantable.permutated; VLC *vlc_coeff; int VAR_1, VAR_2, VAR_3; int VAR_4, VAR_5, VAR_6; int VAR_10 = 0; for (VAR_4=0; VAR_4<6; VAR_4++) { int VAR_8 = 0; if (VAR_4 > 3) VAR_10 = 1; vlc_coeff = &VAR_0->dccv_vlc[VAR_10]; for (VAR_3=0; VAR_3<64; ) { int VAR_9 = 1; if (VAR_3<2 && VAR_0->nb_null[VAR_3][VAR_10]) { VAR_0->nb_null[VAR_3][VAR_10]--; if (VAR_3)
break; } else { if (get_bits_count(&VAR_0->gb) >= VAR_0->gb.size_in_bits)
return; VAR_1 = get_vlc2(&VAR_0->gb, vlc_coeff->table, 9, 3); if (VAR_1 == 0) { if (VAR_3) { int VAR_10 = (VAR_3 >= 6); VAR_9 += get_vlc2(&VAR_0->gb, VAR_0->runv_vlc[VAR_10].table, 9, 3); if (VAR_9 >= 9)
VAR_9 += get_bits(&VAR_0->gb, 6); } else VAR_0->nb_null[0][VAR_10] = vp6_get_nb_null(VAR_0); VAR_8 = 0; } else if (VAR_1 == 11) { if (VAR_3 == 1)
VAR_0->nb_null[1][VAR_10] = vp6_get_nb_null(VAR_0); break; } else { int VAR_10 = vp56_coeff_bias[VAR_1]; if (VAR_1 > 4)
VAR_10 += get_bits(&VAR_0->gb, VAR_1 <= 9 ? VAR_1 - 4 : 11); VAR_8 = 1 + (VAR_10 > 1); VAR_2 = get_bits1(&VAR_0->gb); VAR_10 = (VAR_10 ^ -VAR_2) + VAR_2; if (VAR_3)
VAR_10 *= VAR_0->dequant_ac; VAR_6 = model->coeff_index_to_pos[VAR_3]; VAR_0->block_coeff[VAR_4][permute[VAR_6]] = VAR_10; } } VAR_3+=VAR_9; VAR_5 = FFMIN(vp6_coeff_groups[VAR_3], 3); vlc_coeff = &VAR_0->ract_vlc[VAR_10][VAR_8][VAR_5]; } } }