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

libavcodec/h264_loopfilter.c:247:26: Assignment
245. 
246.     if( IS_INTRA(mb_type) ) {
247.         int16_t bS4[4] = {4,4,4,4};
                              ^
248.         int16_t bS3[4] = {3,3,3,3};
249.         int16_t *bSH = FIELD_PICTURE ? bS3 : bS4;

libavcodec/h264_loopfilter.c:254:13: Call
252.         if( IS_8x8DCT(mb_type) ) {
253.             filter_mb_edgev( &img_y[4*2], linesize, bS3, qp, h);
254.             filter_mb_edgeh( &img_y[4*0*linesize], linesize, bSH, qp1, h);
                 ^
255.             filter_mb_edgeh( &img_y[4*2*linesize], linesize, bS3, qp, h);
256.         } else {

libavcodec/h264_loopfilter.c:177:1: <Offset trace>
175. }
176. 
177. static void av_always_inline filter_mb_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
     ^
178.     const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
179.     const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;

libavcodec/h264_loopfilter.c:177:1: Parameter `*bS`
  175. }
  176. 
  177. static void av_always_inline filter_mb_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
       ^
  178.     const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
  179.     const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;

libavcodec/h264_loopfilter.c:73:1: <Length trace>
71.     18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
72. };
73. static const uint8_t tc0_table[52*3][4] = {
    ^
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 },
75.     {-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:73:1: Array declaration
  71.     18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
  72. };
  73. static const uint8_t tc0_table[52*3][4] = {
      ^
  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 },
  75.     {-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:186:17: Array access: Offset: [3, 4] Size: 4 by call to `filter_mb_edgeh` 
  184.     if( bS[0] < 4 ) {
  185.         int8_t tc[4];
  186.         tc[0] = tc0_table[index_a][bS[0]];
                       ^
  187.         tc[1] = tc0_table[index_a][bS[1]];
  188.         tc[2] = tc0_table[index_a][bS[2]];

static void av_always_inline filter_mb_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {
    const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);
    const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;
    const int alpha = alpha_table[index_a];
    const int beta  = beta_table[qp - qp_bd_offset + 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]];
        tc[1] = tc0_table[index_a][bS[1]];
        tc[2] = tc0_table[index_a][bS[2]];
        tc[3] = tc0_table[index_a][bS[3]];
        h->h264dsp.h264_v_loop_filter_luma(pix, stride, alpha, beta, tc);
    } else {
        h->h264dsp.h264_v_loop_filter_luma_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 || !h->h264dsp.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        LOCAL_ALIGNED_8(int16_t, bS, [2], [4][4]);\n        int edges;\n        if( IS_8x8DCT(mb_type) && (h->cbp&7) == 7 ) {\n            edges = 4;\n            AV_WN64A(bS[0][0], 0x0002000200020002ULL);\n            AV_WN64A(bS[0][2], 0x0002000200020002ULL);\n            AV_WN64A(bS[1][0], 0x0002000200020002ULL);\n            AV_WN64A(bS[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            h->h264dsp.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            AV_WN64A(bS[0][0], 0x0004000400040004ULL);\n        if( IS_INTRA(h->top_type) )\n            AV_WN64A(bS[1][0], FIELD_PICTURE ? 0x0003000300030003ULL : 0x0004000400040004ULL);\n#define FILTER(hv,dir,edge)\\\n        if(AV_RN64A(bS[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_edgeh( uint8_t *pix, int stride, int16_t bS[4], unsigned int qp, H264Context *h ) {\n    const int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);\n    const unsigned int index_a = qp - qp_bd_offset + h->slice_alpha_c0_offset;\n    const int alpha = alpha_table[index_a];\n    const int beta  = beta_table[qp - qp_bd_offset + 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]];\n        tc[1] = tc0_table[index_a][bS[1]];\n        tc[2] = tc0_table[index_a][bS[2]];\n        tc[3] = tc0_table[index_a][bS[3]];\n        h->h264dsp.h264_v_loop_filter_luma(pix, stride, alpha, beta, tc);\n    } else {\n        h->h264dsp.h264_v_loop_filter_luma_intra(pix, stride, alpha, beta);\n    }\n}']