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

libavcodec/vc1.c:3453:5: <Offset trace>
3451.         skipped = v->s.mbskip_table[mb_pos];
3452. 
3453.     s->dsp.clear_blocks(s->block[0]);
          ^
3454.     dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 0;
3455.     for(i = 0; i < 6; i++) {

libavcodec/vc1.c:3453:5: Unknown value from: non-const function
3451.         skipped = v->s.mbskip_table[mb_pos];
3452. 
3453.     s->dsp.clear_blocks(s->block[0]);
          ^
3454.     dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 0;
3455.     for(i = 0; i < 6; i++) {

libavcodec/vc1.c:3463:13: Call
3461.     if (!direct) {
3462.         if (!skipped) {
3463.             GET_MVDATA(dmv_x[0], dmv_y[0]);
                  ^
3464.             dmv_x[1] = dmv_x[0];
3465.             dmv_y[1] = dmv_y[0];

libavcodec/bitstream.h:866:1: Parameter `(*table)[*]`
  864.  *                  = (max_vlc_length + bits - 1) / bits
  865.  */
  866. static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2],
       ^
  867.                                   int bits, int max_depth)
  868. {

libavcodec/bitstream.h:874:5: Assignment
  872.     UPDATE_CACHE(re, s)
  873. 
  874.     GET_VLC(code, re, s, table, bits, max_depth)
           ^
  875. 
  876.     CLOSE_READER(re, s)

libavcodec/bitstream.h:877:5: Assignment
  875. 
  876.     CLOSE_READER(re, s)
  877.     return code;
           ^
  878. }
  879. 

libavcodec/vc1.c:3463:13: Assignment
3461.     if (!direct) {
3462.         if (!skipped) {
3463.             GET_MVDATA(dmv_x[0], dmv_y[0]);
                  ^
3464.             dmv_x[1] = dmv_x[0];
3465.             dmv_y[1] = dmv_y[0];

libavcodec/vc1.c:3463:13: Assignment
3461.     if (!direct) {
3462.         if (!skipped) {
3463.             GET_MVDATA(dmv_x[0], dmv_y[0]);
                  ^
3464.             dmv_x[1] = dmv_x[0];
3465.             dmv_y[1] = dmv_y[0];

libavcodec/vc1.c:3124:1: <Length trace>
3122. /** @} */ // Macroblock group
3123. 
3124. static const int size_table  [6] = { 0, 2, 3, 4,  5,  8 };
      ^
3125. static const int offset_table[6] = { 0, 1, 3, 7, 15, 31 };
3126. 

libavcodec/vc1.c:3124:1: Array declaration
3122. /** @} */ // Macroblock group
3123. 
3124. static const int size_table  [6] = { 0, 2, 3, 4,  5,  8 };
      ^
3125. static const int offset_table[6] = { 0, 1, 3, 7, 15, 31 };
3126. 

libavcodec/vc1.c:3463:13: Array access: Offset: [-5, 5] Size: 6
3461.     if (!direct) {
3462.         if (!skipped) {
3463.             GET_MVDATA(dmv_x[0], dmv_y[0]);
                  ^
3464.             dmv_x[1] = dmv_x[0];
3465.             dmv_y[1] = dmv_y[0];

static void vc1_decode_b_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 = 0;
    int mqdiff, mquant;
    int ttmb = v->ttfrm;
    int mb_has_coeffs = 0;
    int index, index1;
    int val, sign;
    int first_block = 1;
    int dst_idx, off;
    int skipped, direct;
    int dmv_x[2], dmv_y[2];
    int bmvtype = BMV_TYPE_BACKWARD;
    mquant = v->pq;
    s->mb_intra = 0;
    if (v->dmb_is_raw)
        direct = get_bits1(gb);
    else
        direct = v->direct_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]);
    dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 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.qscale_table[mb_pos] = 0;
    if (!direct) {
        if (!skipped) {
            GET_MVDATA(dmv_x[0], dmv_y[0]);
            dmv_x[1] = dmv_x[0];
            dmv_y[1] = dmv_y[0];
        }
        if(skipped || !s->mb_intra) {
            bmvtype = decode012(gb);
            switch(bmvtype) {
            case 0:
                bmvtype = (v->bfraction >= (B_FRACTION_DEN/2)) ? BMV_TYPE_BACKWARD : BMV_TYPE_FORWARD;
                break;
            case 1:
                bmvtype = (v->bfraction >= (B_FRACTION_DEN/2)) ? BMV_TYPE_FORWARD : BMV_TYPE_BACKWARD;
                break;
            case 2:
                bmvtype = BMV_TYPE_INTERPOLATED;
                dmv_x[0] = dmv_y[0] = 0;
            }
        }
    }
    for(i = 0; i < 6; i++)
        v->mb_type[0][s->block_index[i]] = s->mb_intra;
    if (skipped) {
        if(direct) bmvtype = BMV_TYPE_INTERPOLATED;
        vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
        vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
        return;
    }
    if (direct) {
        cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2);
        GET_MQUANT();
        s->mb_intra = 0;
        mb_has_coeffs = 0;
        s->current_picture.qscale_table[mb_pos] = mquant;
        if(!v->ttmbf)
            ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);
        dmv_x[0] = dmv_y[0] = dmv_x[1] = dmv_y[1] = 0;
        vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
        vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
    } else {
        if(!mb_has_coeffs && !s->mb_intra) {
            vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
            vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
            return;
        }
        if(s->mb_intra && !mb_has_coeffs) {
            GET_MQUANT();
            s->current_picture.qscale_table[mb_pos] = mquant;
            s->ac_pred = get_bits1(gb);
            cbp = 0;
            vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
        } else {
            if(bmvtype == BMV_TYPE_INTERPOLATED) {
                GET_MVDATA(dmv_x[0], dmv_y[0]);
                if(!mb_has_coeffs) {
                    vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
                    vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
                    return;
                }
            }
            vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);
            if(!s->mb_intra) {
                vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);
            }
            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();
            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);
        }
    }
    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));
        } else if(val) {
            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), 0, 0, 0);
            if(!v->ttmbf && ttmb < 8) ttmb = -1;
            first_block = 0;
        }
    }
}
['static void vc1_decode_b_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 = 0;\n    int mqdiff, mquant;\n    int ttmb = v->ttfrm;\n    int mb_has_coeffs = 0;\n    int index, index1;\n    int val, sign;\n    int first_block = 1;\n    int dst_idx, off;\n    int skipped, direct;\n    int dmv_x[2], dmv_y[2];\n    int bmvtype = BMV_TYPE_BACKWARD;\n    mquant = v->pq;\n    s->mb_intra = 0;\n    if (v->dmb_is_raw)\n        direct = get_bits1(gb);\n    else\n        direct = v->direct_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    dmv_x[0] = dmv_x[1] = dmv_y[0] = dmv_y[1] = 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.qscale_table[mb_pos] = 0;\n    if (!direct) {\n        if (!skipped) {\n            GET_MVDATA(dmv_x[0], dmv_y[0]);\n            dmv_x[1] = dmv_x[0];\n            dmv_y[1] = dmv_y[0];\n        }\n        if(skipped || !s->mb_intra) {\n            bmvtype = decode012(gb);\n            switch(bmvtype) {\n            case 0:\n                bmvtype = (v->bfraction >= (B_FRACTION_DEN/2)) ? BMV_TYPE_BACKWARD : BMV_TYPE_FORWARD;\n                break;\n            case 1:\n                bmvtype = (v->bfraction >= (B_FRACTION_DEN/2)) ? BMV_TYPE_FORWARD : BMV_TYPE_BACKWARD;\n                break;\n            case 2:\n                bmvtype = BMV_TYPE_INTERPOLATED;\n                dmv_x[0] = dmv_y[0] = 0;\n            }\n        }\n    }\n    for(i = 0; i < 6; i++)\n        v->mb_type[0][s->block_index[i]] = s->mb_intra;\n    if (skipped) {\n        if(direct) bmvtype = BMV_TYPE_INTERPOLATED;\n        vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);\n        vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);\n        return;\n    }\n    if (direct) {\n        cbp = get_vlc2(&v->s.gb, v->cbpcy_vlc->table, VC1_CBPCY_P_VLC_BITS, 2);\n        GET_MQUANT();\n        s->mb_intra = 0;\n        mb_has_coeffs = 0;\n        s->current_picture.qscale_table[mb_pos] = mquant;\n        if(!v->ttmbf)\n            ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v->tt_index].table, VC1_TTMB_VLC_BITS, 2);\n        dmv_x[0] = dmv_y[0] = dmv_x[1] = dmv_y[1] = 0;\n        vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);\n        vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);\n    } else {\n        if(!mb_has_coeffs && !s->mb_intra) {\n            vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);\n            vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);\n            return;\n        }\n        if(s->mb_intra && !mb_has_coeffs) {\n            GET_MQUANT();\n            s->current_picture.qscale_table[mb_pos] = mquant;\n            s->ac_pred = get_bits1(gb);\n            cbp = 0;\n            vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);\n        } else {\n            if(bmvtype == BMV_TYPE_INTERPOLATED) {\n                GET_MVDATA(dmv_x[0], dmv_y[0]);\n                if(!mb_has_coeffs) {\n                    vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);\n                    vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);\n                    return;\n                }\n            }\n            vc1_pred_b_mv(v, dmv_x, dmv_y, direct, bmvtype);\n            if(!s->mb_intra) {\n                vc1_b_mc(v, dmv_x, dmv_y, direct, bmvtype);\n            }\n            if(s->mb_intra)\n                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            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, VC1_TTMB_VLC_BITS, 2);\n        }\n    }\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        } else if(val) {\n            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), 0, 0, 0);\n            if(!v->ttmbf && ttmb < 8) ttmb = -1;\n            first_block = 0;\n        }\n    }\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}']