libavcodec/vc1.c:3144: error: Buffer Overrun L3
  Offset: [-5, 5] Size: 6.

libavcodec/vc1.c:3137:5: <Offset trace>
3135.         skipped = v->s.mbskip_table[mb_pos];
3136. 
3137.     s->dsp.clear_blocks(s->block[0]);
          ^
3138. 
3139.     apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);

libavcodec/vc1.c:3137:5: Unknown value from: non-const function
3135.         skipped = v->s.mbskip_table[mb_pos];
3136. 
3137.     s->dsp.clear_blocks(s->block[0]);
          ^
3138. 
3139.     apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);

libavcodec/vc1.c:3144:13: Call
3142.         if (!skipped)
3143.         {
3144.             GET_MVDATA(dmv_x, dmv_y);
                  ^
3145. 
3146.             if (s->mb_intra) {

libavcodec/bitstream.h:874:1: Parameter `(*table)[*]`
  872.  *                  = (max_vlc_length + bits - 1) / bits
  873.  */
  874. static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2],
       ^
  875.                                   int bits, int max_depth)
  876. {

libavcodec/bitstream.h:882:5: Assignment
  880.     UPDATE_CACHE(re, s)
  881. 
  882.     GET_VLC(code, re, s, table, bits, max_depth)
           ^
  883. 
  884.     CLOSE_READER(re, s)

libavcodec/bitstream.h:885:5: Assignment
  883. 
  884.     CLOSE_READER(re, s)
  885.     return code;
           ^
  886. }
  887. 

libavcodec/vc1.c:3144:13: Assignment
3142.         if (!skipped)
3143.         {
3144.             GET_MVDATA(dmv_x, dmv_y);
                  ^
3145. 
3146.             if (s->mb_intra) {

libavcodec/vc1.c:3144:13: Assignment
3142.         if (!skipped)
3143.         {
3144.             GET_MVDATA(dmv_x, dmv_y);
                  ^
3145. 
3146.             if (s->mb_intra) {

libavcodec/vc1.c:3114:5: <Length trace>
3112.     int ttmb = v->ttfrm; /* MB Transform type */
3113. 
3114.     static const int size_table[6] = { 0, 2, 3, 4, 5, 8 },
          ^
3115.       offset_table[6] = { 0, 1, 3, 7, 15, 31 };
3116.     int mb_has_coeffs = 1; /* last_flag */

libavcodec/vc1.c:3114:5: Array declaration
3112.     int ttmb = v->ttfrm; /* MB Transform type */
3113. 
3114.     static const int size_table[6] = { 0, 2, 3, 4, 5, 8 },
          ^
3115.       offset_table[6] = { 0, 1, 3, 7, 15, 31 };
3116.     int mb_has_coeffs = 1; /* last_flag */

libavcodec/vc1.c:3144:13: Array access: Offset: [-5, 5] Size: 6
3142.         if (!skipped)
3143.         {
3144.             GET_MVDATA(dmv_x, dmv_y);
                  ^
3145. 
3146.             if (s->mb_intra) {

static int vc1_decode_p_mb(VC1Context *v)
{
    MpegEncContext *s = &v->s;
    GetBitContext *gb = &s->gb;
    int i, j;
    int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
    int cbp;
    int mqdiff, mquant;
    int ttmb = v->ttfrm;
    static const int size_table[6] = { 0, 2, 3, 4, 5, 8 },
      offset_table[6] = { 0, 1, 3, 7, 15, 31 };
    int mb_has_coeffs = 1;
    int dmv_x, dmv_y;
    int index, index1;
    int val, sign;
    int first_block = 1;
    int dst_idx, off;
    int skipped, fourmv;
    int block_cbp = 0, pat;
    int apply_loop_filter;
    mquant = v->pq;
    if (v->mv_type_is_raw)
        fourmv = get_bits1(gb);
    else
        fourmv = v->mv_type_mb_plane[mb_pos];
    if (v->skip_is_raw)
        skipped = get_bits1(gb);
    else
        skipped = v->s.mbskip_table[mb_pos];
    s->dsp.clear_blocks(s->block[0]);
    apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);
    if (!fourmv)
    {
        if (!skipped)
        {
            GET_MVDATA(dmv_x, dmv_y);
            if (s->mb_intra) {
                s->current_picture.motion_val[1][s->block_index[0]][0] = 0;
                s->current_picture.motion_val[1][s->block_index[0]][1] = 0;
            }
            s->current_picture.mb_type[mb_pos] = s->mb_intra ? MB_TYPE_INTRA : MB_TYPE_16x16;
            vc1_pred_mv(s, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0]);
            if (s->mb_intra && !mb_has_coeffs)
            {
                GET_MQUANT();
                s->ac_pred = get_bits1(gb);
                cbp = 0;
            }
            else if (mb_has_coeffs)
            {
                if (s->mb_intra) s->ac_pred = get_bits1(gb);
                cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2);
                GET_MQUANT();
            }
            else
            {
                mquant = v->pq;
                cbp = 0;
            }
            s->current_picture.qscale_table[mb_pos] = mquant;
            if (!v->ttmbf && !s->mb_intra && mb_has_coeffs)
                ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table,
                                VC1_TTMB_VLC_BITS, 2);
            if(!s->mb_intra) vc1_mc_1mv(v, 0);
            dst_idx = 0;
            for (i=0; i<6; i++)
            {
                s->dc_val[0][s->block_index[i]] = 0;
                dst_idx += i >> 2;
                val = ((cbp >> (5 - i)) & 1);
                off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);
                v->mb_type[0][s->block_index[i]] = s->mb_intra;
                if(s->mb_intra) {
                    v->a_avail = v->c_avail = 0;
                    if(i == 2 || i == 3 || !s->first_slice_line)
                        v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]];
                    if(i == 1 || i == 3 || s->mb_x)
                        v->c_avail = v->mb_type[0][s->block_index[i] - 1];
                    vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset);
                    if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
                    s->dsp.vc1_inv_trans_8x8(s->block[i]);
                    if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
                    s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));
                    if(v->pq >= 9 && v->overlap) {
                        if(v->c_avail)
                            s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));
                        if(v->a_avail)
                            s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));
                    }
                    if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
                        int left_cbp, top_cbp;
                        if(i & 4){
                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);
                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);
                        }else{
                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));
                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
                        }
                        if(left_cbp & 0xC)
                            vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);
                        if(top_cbp  & 0xA)
                            vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);
                    }
                    block_cbp |= 0xF << (i << 2);
                } else if(val) {
                    int left_cbp = 0, top_cbp = 0, filter = 0;
                    if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
                        filter = 1;
                        if(i & 4){
                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);
                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);
                        }else{
                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));
                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
                        }
                    }
                    pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), filter, left_cbp, top_cbp);
                    block_cbp |= pat << (i << 2);
                    if(!v->ttmbf && ttmb < 8) ttmb = -1;
                    first_block = 0;
                }
            }
        }
        else
        {
            s->mb_intra = 0;
            for(i = 0; i < 6; i++) {
                v->mb_type[0][s->block_index[i]] = 0;
                s->dc_val[0][s->block_index[i]] = 0;
            }
            s->current_picture.mb_type[mb_pos] = MB_TYPE_SKIP;
            s->current_picture.qscale_table[mb_pos] = 0;
            vc1_pred_mv(s, 0, 0, 0, 1, v->range_x, v->range_y, v->mb_type[0]);
            vc1_mc_1mv(v, 0);
            return 0;
        }
    }
    else
    {
        if (!skipped  )
        {
            int intra_count = 0, coded_inter = 0;
            int is_intra[6], is_coded[6];
            cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2);
            for (i=0; i<6; i++)
            {
                val = ((cbp >> (5 - i)) & 1);
                s->dc_val[0][s->block_index[i]] = 0;
                s->mb_intra = 0;
                if(i < 4) {
                    dmv_x = dmv_y = 0;
                    s->mb_intra = 0;
                    mb_has_coeffs = 0;
                    if(val) {
                        GET_MVDATA(dmv_x, dmv_y);
                    }
                    vc1_pred_mv(s, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0]);
                    if(!s->mb_intra) vc1_mc_4mv_luma(v, i);
                    intra_count += s->mb_intra;
                    is_intra[i] = s->mb_intra;
                    is_coded[i] = mb_has_coeffs;
                }
                if(i&4){
                    is_intra[i] = (intra_count >= 3);
                    is_coded[i] = val;
                }
                if(i == 4) vc1_mc_4mv_chroma(v);
                v->mb_type[0][s->block_index[i]] = is_intra[i];
                if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];
            }
            if(!intra_count && !coded_inter) return 0;
            dst_idx = 0;
            GET_MQUANT();
            s->current_picture.qscale_table[mb_pos] = mquant;
            {
                int intrapred = 0;
                for(i=0; i<6; i++)
                    if(is_intra[i]) {
                        if(((!s->first_slice_line || (i==2 || i==3)) && v->mb_type[0][s->block_index[i] - s->block_wrap[i]])
                            || ((s->mb_x || (i==1 || i==3)) && v->mb_type[0][s->block_index[i] - 1])) {
                            intrapred = 1;
                            break;
                        }
                    }
                if(intrapred)s->ac_pred = get_bits1(gb);
                else s->ac_pred = 0;
            }
            if (!v->ttmbf && coded_inter)
                ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
            for (i=0; i<6; i++)
            {
                dst_idx += i >> 2;
                off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);
                s->mb_intra = is_intra[i];
                if (is_intra[i]) {
                    v->a_avail = v->c_avail = 0;
                    if(i == 2 || i == 3 || !s->first_slice_line)
                        v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]];
                    if(i == 1 || i == 3 || s->mb_x)
                        v->c_avail = v->mb_type[0][s->block_index[i] - 1];
                    vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset);
                    if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
                    s->dsp.vc1_inv_trans_8x8(s->block[i]);
                    if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
                    s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize);
                    if(v->pq >= 9 && v->overlap) {
                        if(v->c_avail)
                            s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));
                        if(v->a_avail)
                            s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));
                    }
                    if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
                        int left_cbp, top_cbp;
                        if(i & 4){
                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);
                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);
                        }else{
                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));
                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
                        }
                        if(left_cbp & 0xC)
                            vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);
                        if(top_cbp  & 0xA)
                            vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);
                    }
                    block_cbp |= 0xF << (i << 2);
                } else if(is_coded[i]) {
                    int left_cbp = 0, top_cbp = 0, filter = 0;
                    if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
                        filter = 1;
                        if(i & 4){
                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);
                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);
                        }else{
                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));
                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
                        }
                    }
                    pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), filter, left_cbp, top_cbp);
                    block_cbp |= pat << (i << 2);
                    if(!v->ttmbf && ttmb < 8) ttmb = -1;
                    first_block = 0;
                }
            }
            return 0;
        }
        else
        {
            s->mb_intra = 0;
            s->current_picture.qscale_table[mb_pos] = 0;
            for (i=0; i<6; i++) {
                v->mb_type[0][s->block_index[i]] = 0;
                s->dc_val[0][s->block_index[i]] = 0;
            }
            for (i=0; i<4; i++)
            {
                vc1_pred_mv(s, i, 0, 0, 0, v->range_x, v->range_y, v->mb_type[0]);
                vc1_mc_4mv_luma(v, i);
            }
            vc1_mc_4mv_chroma(v);
            s->current_picture.qscale_table[mb_pos] = 0;
            return 0;
        }
    }
    v->cbp[s->mb_x] = block_cbp;
    return -1;
}
['static int vc1_decode_p_mb(VC1Context *v)\n{\n    MpegEncContext *s = &v->s;\n    GetBitContext *gb = &s->gb;\n    int i, j;\n    int mb_pos = s->mb_x + s->mb_y * s->mb_stride;\n    int cbp;\n    int mqdiff, mquant;\n    int ttmb = v->ttfrm;\n    static const int size_table[6] = { 0, 2, 3, 4, 5, 8 },\n      offset_table[6] = { 0, 1, 3, 7, 15, 31 };\n    int mb_has_coeffs = 1;\n    int dmv_x, dmv_y;\n    int index, index1;\n    int val, sign;\n    int first_block = 1;\n    int dst_idx, off;\n    int skipped, fourmv;\n    int block_cbp = 0, pat;\n    int apply_loop_filter;\n    mquant = v->pq;\n    if (v->mv_type_is_raw)\n        fourmv = get_bits1(gb);\n    else\n        fourmv = v->mv_type_mb_plane[mb_pos];\n    if (v->skip_is_raw)\n        skipped = get_bits1(gb);\n    else\n        skipped = v->s.mbskip_table[mb_pos];\n    s->dsp.clear_blocks(s->block[0]);\n    apply_loop_filter = s->loop_filter && !(s->avctx->skip_loop_filter >= AVDISCARD_NONKEY);\n    if (!fourmv)\n    {\n        if (!skipped)\n        {\n            GET_MVDATA(dmv_x, dmv_y);\n            if (s->mb_intra) {\n                s->current_picture.motion_val[1][s->block_index[0]][0] = 0;\n                s->current_picture.motion_val[1][s->block_index[0]][1] = 0;\n            }\n            s->current_picture.mb_type[mb_pos] = s->mb_intra ? MB_TYPE_INTRA : MB_TYPE_16x16;\n            vc1_pred_mv(s, 0, dmv_x, dmv_y, 1, v->range_x, v->range_y, v->mb_type[0]);\n            if (s->mb_intra && !mb_has_coeffs)\n            {\n                GET_MQUANT();\n                s->ac_pred = get_bits1(gb);\n                cbp = 0;\n            }\n            else if (mb_has_coeffs)\n            {\n                if (s->mb_intra) s->ac_pred = get_bits1(gb);\n                cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2);\n                GET_MQUANT();\n            }\n            else\n            {\n                mquant = v->pq;\n                cbp = 0;\n            }\n            s->current_picture.qscale_table[mb_pos] = mquant;\n            if (!v->ttmbf && !s->mb_intra && mb_has_coeffs)\n                ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table,\n                                VC1_TTMB_VLC_BITS, 2);\n            if(!s->mb_intra) vc1_mc_1mv(v, 0);\n            dst_idx = 0;\n            for (i=0; i<6; i++)\n            {\n                s->dc_val[0][s->block_index[i]] = 0;\n                dst_idx += i >> 2;\n                val = ((cbp >> (5 - i)) & 1);\n                off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);\n                v->mb_type[0][s->block_index[i]] = s->mb_intra;\n                if(s->mb_intra) {\n                    v->a_avail = v->c_avail = 0;\n                    if(i == 2 || i == 3 || !s->first_slice_line)\n                        v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]];\n                    if(i == 1 || i == 3 || s->mb_x)\n                        v->c_avail = v->mb_type[0][s->block_index[i] - 1];\n                    vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset);\n                    if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;\n                    s->dsp.vc1_inv_trans_8x8(s->block[i]);\n                    if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;\n                    s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));\n                    if(v->pq >= 9 && v->overlap) {\n                        if(v->c_avail)\n                            s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));\n                        if(v->a_avail)\n                            s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));\n                    }\n                    if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){\n                        int left_cbp, top_cbp;\n                        if(i & 4){\n                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);\n                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);\n                        }else{\n                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));\n                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));\n                        }\n                        if(left_cbp & 0xC)\n                            vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);\n                        if(top_cbp  & 0xA)\n                            vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);\n                    }\n                    block_cbp |= 0xF << (i << 2);\n                } else if(val) {\n                    int left_cbp = 0, top_cbp = 0, filter = 0;\n                    if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){\n                        filter = 1;\n                        if(i & 4){\n                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);\n                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);\n                        }else{\n                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));\n                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));\n                        }\n                    }\n                    pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), filter, left_cbp, top_cbp);\n                    block_cbp |= pat << (i << 2);\n                    if(!v->ttmbf && ttmb < 8) ttmb = -1;\n                    first_block = 0;\n                }\n            }\n        }\n        else\n        {\n            s->mb_intra = 0;\n            for(i = 0; i < 6; i++) {\n                v->mb_type[0][s->block_index[i]] = 0;\n                s->dc_val[0][s->block_index[i]] = 0;\n            }\n            s->current_picture.mb_type[mb_pos] = MB_TYPE_SKIP;\n            s->current_picture.qscale_table[mb_pos] = 0;\n            vc1_pred_mv(s, 0, 0, 0, 1, v->range_x, v->range_y, v->mb_type[0]);\n            vc1_mc_1mv(v, 0);\n            return 0;\n        }\n    }\n    else\n    {\n        if (!skipped  )\n        {\n            int intra_count = 0, coded_inter = 0;\n            int is_intra[6], is_coded[6];\n            cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2);\n            for (i=0; i<6; i++)\n            {\n                val = ((cbp >> (5 - i)) & 1);\n                s->dc_val[0][s->block_index[i]] = 0;\n                s->mb_intra = 0;\n                if(i < 4) {\n                    dmv_x = dmv_y = 0;\n                    s->mb_intra = 0;\n                    mb_has_coeffs = 0;\n                    if(val) {\n                        GET_MVDATA(dmv_x, dmv_y);\n                    }\n                    vc1_pred_mv(s, i, dmv_x, dmv_y, 0, v->range_x, v->range_y, v->mb_type[0]);\n                    if(!s->mb_intra) vc1_mc_4mv_luma(v, i);\n                    intra_count += s->mb_intra;\n                    is_intra[i] = s->mb_intra;\n                    is_coded[i] = mb_has_coeffs;\n                }\n                if(i&4){\n                    is_intra[i] = (intra_count >= 3);\n                    is_coded[i] = val;\n                }\n                if(i == 4) vc1_mc_4mv_chroma(v);\n                v->mb_type[0][s->block_index[i]] = is_intra[i];\n                if(!coded_inter) coded_inter = !is_intra[i] & is_coded[i];\n            }\n            if(!intra_count && !coded_inter) return 0;\n            dst_idx = 0;\n            GET_MQUANT();\n            s->current_picture.qscale_table[mb_pos] = mquant;\n            {\n                int intrapred = 0;\n                for(i=0; i<6; i++)\n                    if(is_intra[i]) {\n                        if(((!s->first_slice_line || (i==2 || i==3)) && v->mb_type[0][s->block_index[i] - s->block_wrap[i]])\n                            || ((s->mb_x || (i==1 || i==3)) && v->mb_type[0][s->block_index[i] - 1])) {\n                            intrapred = 1;\n                            break;\n                        }\n                    }\n                if(intrapred)s->ac_pred = get_bits1(gb);\n                else s->ac_pred = 0;\n            }\n            if (!v->ttmbf && coded_inter)\n                ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);\n            for (i=0; i<6; i++)\n            {\n                dst_idx += i >> 2;\n                off = (i & 4) ? 0 : ((i & 1) * 8 + (i & 2) * 4 * s->linesize);\n                s->mb_intra = is_intra[i];\n                if (is_intra[i]) {\n                    v->a_avail = v->c_avail = 0;\n                    if(i == 2 || i == 3 || !s->first_slice_line)\n                        v->a_avail = v->mb_type[0][s->block_index[i] - s->block_wrap[i]];\n                    if(i == 1 || i == 3 || s->mb_x)\n                        v->c_avail = v->mb_type[0][s->block_index[i] - 1];\n                    vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset);\n                    if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;\n                    s->dsp.vc1_inv_trans_8x8(s->block[i]);\n                    if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;\n                    s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize);\n                    if(v->pq >= 9 && v->overlap) {\n                        if(v->c_avail)\n                            s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));\n                        if(v->a_avail)\n                            s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, s->linesize >> ((i & 4) >> 2));\n                    }\n                    if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){\n                        int left_cbp, top_cbp;\n                        if(i & 4){\n                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);\n                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);\n                        }else{\n                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));\n                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));\n                        }\n                        if(left_cbp & 0xC)\n                            vc1_loop_filter(s->dest[dst_idx] + off, 1, i & 4 ? s->uvlinesize : s->linesize, 8, mquant);\n                        if(top_cbp  & 0xA)\n                            vc1_loop_filter(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, 1, 8, mquant);\n                    }\n                    block_cbp |= 0xF << (i << 2);\n                } else if(is_coded[i]) {\n                    int left_cbp = 0, top_cbp = 0, filter = 0;\n                    if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){\n                        filter = 1;\n                        if(i & 4){\n                            left_cbp = v->cbp[s->mb_x - 1]            >> (i * 4);\n                            top_cbp  = v->cbp[s->mb_x - s->mb_stride] >> (i * 4);\n                        }else{\n                            left_cbp = (i & 1) ? (pat >> ((i-1)*4)) : (v->cbp[s->mb_x - 1]           >> ((i+1)*4));\n                            top_cbp  = (i & 2) ? (pat >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));\n                        }\n                    }\n                    pat = vc1_decode_p_block(v, s->block[i], i, mquant, ttmb, first_block, s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize, (i&4) && (s->flags & CODEC_FLAG_GRAY), filter, left_cbp, top_cbp);\n                    block_cbp |= pat << (i << 2);\n                    if(!v->ttmbf && ttmb < 8) ttmb = -1;\n                    first_block = 0;\n                }\n            }\n            return 0;\n        }\n        else\n        {\n            s->mb_intra = 0;\n            s->current_picture.qscale_table[mb_pos] = 0;\n            for (i=0; i<6; i++) {\n                v->mb_type[0][s->block_index[i]] = 0;\n                s->dc_val[0][s->block_index[i]] = 0;\n            }\n            for (i=0; i<4; i++)\n            {\n                vc1_pred_mv(s, i, 0, 0, 0, v->range_x, v->range_y, v->mb_type[0]);\n                vc1_mc_4mv_luma(v, i);\n            }\n            vc1_mc_4mv_chroma(v);\n            s->current_picture.qscale_table[mb_pos] = 0;\n            return 0;\n        }\n    }\n    v->cbp[s->mb_x] = block_cbp;\n    return -1;\n}', 'static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2],\n                                  int bits, int max_depth)\n{\n    int code;\n    OPEN_READER(re, s)\n    UPDATE_CACHE(re, s)\n    GET_VLC(code, re, s, table, bits, max_depth)\n    CLOSE_READER(re, s)\n    return code;\n}']