libavcodec/h264_loopfilter.c:359: error: Buffer Overrun L2
  Offset: [3, 4] Size: 4 by call to `filter_mb_edgecv`.

libavcodec/h264_loopfilter.c:340:26: Assignment
338. 
339.     if( IS_INTRA(mb_type) ) {
340.         int16_t bS4[4] = {4,4,4,4};
                              ^
341.         int16_t bS3[4] = {3,3,3,3};
342.         int16_t *bSH = FIELD_PICTURE ? bS3 : bS4;

libavcodec/h264_loopfilter.c:359:13: Call
357.         }
358.         if(left_type){
359.             filter_mb_edgecv( &img_cb[2*0], uvlinesize, bS4, qpc0, h);
                 ^
360.             filter_mb_edgecv( &img_cr[2*0], uvlinesize, bS4, qpc0, h);
361.         }

libavcodec/h264_loopfilter.c:119:1: <Offset trace>
117.     }
118. }
119. static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
     ^
120.     const unsigned int index_a = qp + h->slice_alpha_c0_offset;
121.     const int alpha = alpha_table[index_a];

libavcodec/h264_loopfilter.c:119:1: Parameter `*bS`
  117.     }
  118. }
  119. static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
       ^
  120.     const unsigned int index_a = qp + h->slice_alpha_c0_offset;
  121.     const int alpha = alpha_table[index_a];

libavcodec/h264_loopfilter.c:72:1: <Length trace>
70.     18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
71. };
72. static const uint8_t tc0_table[52*3][4] = {
    ^
73.     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
74.     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },

libavcodec/h264_loopfilter.c:72:1: Array declaration
  70.     18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
  71. };
  72. static const uint8_t tc0_table[52*3][4] = {
      ^
  73.     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
  74.     {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },

libavcodec/h264_loopfilter.c:127:17: Array access: Offset: [3, 4] Size: 4 by call to `filter_mb_edgecv` 
  125.     if( bS[0] < 4 ) {
  126.         int8_t tc[4];
  127.         tc[0] = tc0_table[index_a][bS[0]]+1;
                       ^
  128.         tc[1] = tc0_table[index_a][bS[1]]+1;
  129.         tc[2] = tc0_table[index_a][bS[2]]+1;

static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
    const unsigned int index_a = qp + h->slice_alpha_c0_offset;
    const int alpha = alpha_table[index_a];
    const int beta  = beta_table[qp + h->slice_beta_offset];
    if (alpha ==0 || beta == 0) return;
    if( bS[0] < 4 ) {
        int8_t tc[4];
        tc[0] = tc0_table[index_a][bS[0]]+1;
        tc[1] = tc0_table[index_a][bS[1]]+1;
        tc[2] = tc0_table[index_a][bS[2]]+1;
        tc[3] = tc0_table[index_a][bS[3]]+1;
        h->s.dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc);
    } else {
        h->s.dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta);
    }
}
['void ff_h264_filter_mb_fast( H264Context *h, int mb_x, int mb_y, uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr, unsigned int linesize, unsigned int uvlinesize) {\n    MpegEncContext * const s = &h->s;\n    int mb_xy;\n    int mb_type, left_type;\n    int qp, qp0, qp1, qpc, qpc0, qpc1, qp_thresh;\n    mb_xy = h->mb_xy;\n    if(!h->top_type || !s->dsp.h264_loop_filter_strength || h->pps.chroma_qp_diff) {\n        ff_h264_filter_mb(h, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize);\n        return;\n    }\n    assert(!FRAME_MBAFF);\n    left_type= h->left_type[0];\n    mb_type = s->current_picture.mb_type[mb_xy];\n    qp = s->current_picture.qscale_table[mb_xy];\n    qp0 = s->current_picture.qscale_table[mb_xy-1];\n    qp1 = s->current_picture.qscale_table[h->top_mb_xy];\n    qpc = get_chroma_qp( h, 0, qp );\n    qpc0 = get_chroma_qp( h, 0, qp0 );\n    qpc1 = get_chroma_qp( h, 0, qp1 );\n    qp0 = (qp + qp0 + 1) >> 1;\n    qp1 = (qp + qp1 + 1) >> 1;\n    qpc0 = (qpc + qpc0 + 1) >> 1;\n    qpc1 = (qpc + qpc1 + 1) >> 1;\n    qp_thresh = 15+52 - h->slice_alpha_c0_offset;\n    if(qp <= qp_thresh && qp0 <= qp_thresh && qp1 <= qp_thresh &&\n       qpc <= qp_thresh && qpc0 <= qp_thresh && qpc1 <= qp_thresh)\n        return;\n    if( IS_INTRA(mb_type) ) {\n        int16_t bS4[4] = {4,4,4,4};\n        int16_t bS3[4] = {3,3,3,3};\n        int16_t *bSH = FIELD_PICTURE ? bS3 : bS4;\n        if(left_type)\n            filter_mb_edgev( &img_y[4*0], linesize, bS4, qp0, h);\n        if( IS_8x8DCT(mb_type) ) {\n            filter_mb_edgev( &img_y[4*2], linesize, bS3, qp, h);\n            filter_mb_edgeh( &img_y[4*0*linesize], linesize, bSH, qp1, h);\n            filter_mb_edgeh( &img_y[4*2*linesize], linesize, bS3, qp, h);\n        } else {\n            filter_mb_edgev( &img_y[4*1], linesize, bS3, qp, h);\n            filter_mb_edgev( &img_y[4*2], linesize, bS3, qp, h);\n            filter_mb_edgev( &img_y[4*3], linesize, bS3, qp, h);\n            filter_mb_edgeh( &img_y[4*0*linesize], linesize, bSH, qp1, h);\n            filter_mb_edgeh( &img_y[4*1*linesize], linesize, bS3, qp, h);\n            filter_mb_edgeh( &img_y[4*2*linesize], linesize, bS3, qp, h);\n            filter_mb_edgeh( &img_y[4*3*linesize], linesize, bS3, qp, h);\n        }\n        if(left_type){\n            filter_mb_edgecv( &img_cb[2*0], uvlinesize, bS4, qpc0, h);\n            filter_mb_edgecv( &img_cr[2*0], uvlinesize, bS4, qpc0, h);\n        }\n        filter_mb_edgecv( &img_cb[2*2], uvlinesize, bS3, qpc, h);\n        filter_mb_edgecv( &img_cr[2*2], uvlinesize, bS3, qpc, h);\n        filter_mb_edgech( &img_cb[2*0*uvlinesize], uvlinesize, bSH, qpc1, h);\n        filter_mb_edgech( &img_cb[2*2*uvlinesize], uvlinesize, bS3, qpc, h);\n        filter_mb_edgech( &img_cr[2*0*uvlinesize], uvlinesize, bSH, qpc1, h);\n        filter_mb_edgech( &img_cr[2*2*uvlinesize], uvlinesize, bS3, qpc, h);\n        return;\n    } else {\n        DECLARE_ALIGNED_8(int16_t, bS)[2][4][4];\n        uint64_t (*bSv)[4] = (uint64_t(*)[4])bS;\n        int edges;\n        if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 ) {\n            edges = 4;\n            bSv[0][0] = bSv[0][2] = bSv[1][0] = bSv[1][2] = 0x0002000200020002ULL;\n        } else {\n            int mask_edge1 = (3*(((5*mb_type)>>5)&1)) | (mb_type>>4);\n            int mask_edge0 = 3*((mask_edge1>>1) & ((5*left_type)>>5)&1);\n            int step =  1+(mb_type>>24);\n            edges = 4 - 3*((mb_type>>3) & !(h->cbp & 15));\n            s->dsp.h264_loop_filter_strength( bS, h->non_zero_count_cache, h->ref_cache, h->mv_cache,\n                                              h->list_count==2, edges, step, mask_edge0, mask_edge1, FIELD_PICTURE);\n        }\n        if( IS_INTRA(left_type) )\n            bSv[0][0] = 0x0004000400040004ULL;\n        if( IS_INTRA(h->top_type) )\n            bSv[1][0] = FIELD_PICTURE ? 0x0003000300030003ULL : 0x0004000400040004ULL;\n#define FILTER(hv,dir,edge)\\\n        if(bSv[dir][edge]) {\\\n            filter_mb_edge##hv( &img_y[4*edge*(dir?linesize:1)], linesize, bS[dir][edge], edge ? qp : qp##dir, h );\\\n            if(!(edge&1)) {\\\n                filter_mb_edgec##hv( &img_cb[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, h );\\\n                filter_mb_edgec##hv( &img_cr[2*edge*(dir?uvlinesize:1)], uvlinesize, bS[dir][edge], edge ? qpc : qpc##dir, h );\\\n            }\\\n        }\n        if(left_type)\n            FILTER(v,0,0);\n        if( edges == 1 ) {\n            FILTER(h,1,0);\n        } else if( IS_8x8DCT(mb_type) ) {\n            FILTER(v,0,2);\n            FILTER(h,1,0);\n            FILTER(h,1,2);\n        } else {\n            FILTER(v,0,1);\n            FILTER(v,0,2);\n            FILTER(v,0,3);\n            FILTER(h,1,0);\n            FILTER(h,1,1);\n            FILTER(h,1,2);\n            FILTER(h,1,3);\n        }\n#undef FILTER\n    }\n}', 'static void av_always_inline filter_mb_edgecv( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {\n    const unsigned int index_a = qp + h->slice_alpha_c0_offset;\n    const int alpha = alpha_table[index_a];\n    const int beta  = beta_table[qp + h->slice_beta_offset];\n    if (alpha ==0 || beta == 0) return;\n    if( bS[0] < 4 ) {\n        int8_t tc[4];\n        tc[0] = tc0_table[index_a][bS[0]]+1;\n        tc[1] = tc0_table[index_a][bS[1]]+1;\n        tc[2] = tc0_table[index_a][bS[2]]+1;\n        tc[3] = tc0_table[index_a][bS[3]]+1;\n        h->s.dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc);\n    } else {\n        h->s.dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta);\n    }\n}']