libavcodec/h264_loopfilter.c:803: error: Buffer Overrun L2
  Offset: [1, 4] Size: 4 by call to `filter_mb_mbaff_edgecv`.

libavcodec/h264_loopfilter.c:765:21: Assignment
763. 
764.                 if( IS_INTRA( mbn_type ) )
765.                     bS[i] = 4;
                         ^
766.                 else{
767.                     bS[i] = 1 + !!(sl->non_zero_count_cache[12+8*(i>>1)] |

libavcodec/h264_loopfilter.c:803:21: Call
801.                     filter_mb_mbaff_edgev ( h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1 );
802.                 } else if (CHROMA422(h)) {
803.                     filter_mb_mbaff_edgecv(h, img_cb,                uvlinesize, bS  , 1, bqp[0], a, b, 1);
                         ^
804.                     filter_mb_mbaff_edgecv(h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1);
805.                     filter_mb_mbaff_edgecv(h, img_cr,                uvlinesize, bS  , 1, rqp[0], a, b, 1);

libavcodec/h264_loopfilter.c:170:1: <Offset trace>
168. }
169. 
170. static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h,
     ^
171.                                                     uint8_t *pix, int stride,
172.                                                     const int16_t bS[7],

libavcodec/h264_loopfilter.c:170:1: Parameter `*bS`
  168. }
  169. 
  170. static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h,
       ^
  171.                                                     uint8_t *pix, int stride,
  172.                                                     const int16_t bS[7],

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:183:17: Array access: Offset: [1, 4] Size: 4 by call to `filter_mb_mbaff_edgecv` 
  181.     if( bS[0] < 4 || !intra ) {
  182.         int8_t tc[4];
  183.         tc[0] = tc0_table[index_a][bS[0*bsi]] + 1;
                       ^
  184.         tc[1] = tc0_table[index_a][bS[1*bsi]] + 1;
  185.         tc[2] = tc0_table[index_a][bS[2*bsi]] + 1;

static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h,
                                                    uint8_t *pix, int stride,
                                                    const int16_t bS[7],
                                                    int bsi, int qp, int a,
                                                    int b, int intra)
{
    const unsigned int index_a = qp + a;
    const int alpha = alpha_table[index_a];
    const int beta  = beta_table[qp + b];
    if (alpha ==0 || beta == 0) return;
    if( bS[0] < 4 || !intra ) {
        int8_t tc[4];
        tc[0] = tc0_table[index_a][bS[0*bsi]] + 1;
        tc[1] = tc0_table[index_a][bS[1*bsi]] + 1;
        tc[2] = tc0_table[index_a][bS[2*bsi]] + 1;
        tc[3] = tc0_table[index_a][bS[3*bsi]] + 1;
        h->h264dsp.h264_h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc);
    } else {
        h->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta);
    }
}
['void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl,\n                       int mb_x, int mb_y,\n                       uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,\n                       unsigned int linesize, unsigned int uvlinesize)\n{\n    const int mb_xy= mb_x + mb_y*h->mb_stride;\n    const int mb_type = h->cur_pic.mb_type[mb_xy];\n    const int mvy_limit = IS_INTERLACED(mb_type) ? 2 : 4;\n    int first_vertical_edge_done = 0;\n    int chroma = !(CONFIG_GRAY && (h->flags & AV_CODEC_FLAG_GRAY));\n    int qp_bd_offset = 6 * (h->sps.bit_depth_luma - 8);\n    int a = 52 + sl->slice_alpha_c0_offset - qp_bd_offset;\n    int b = 52 + sl->slice_beta_offset - qp_bd_offset;\n    if (FRAME_MBAFF(h)\n            && IS_INTERLACED(mb_type ^ sl->left_type[LTOP])\n            && sl->left_type[LTOP]) {\n        DECLARE_ALIGNED(8, int16_t, bS)[8];\n        int qp[2];\n        int bqp[2];\n        int rqp[2];\n        int mb_qp, mbn0_qp, mbn1_qp;\n        int i;\n        first_vertical_edge_done = 1;\n        if( IS_INTRA(mb_type) ) {\n            AV_WN64A(&bS[0], 0x0004000400040004ULL);\n            AV_WN64A(&bS[4], 0x0004000400040004ULL);\n        } else {\n            static const uint8_t offset[2][2][8]={\n                {\n                    {3+4*0, 3+4*0, 3+4*0, 3+4*0, 3+4*1, 3+4*1, 3+4*1, 3+4*1},\n                    {3+4*2, 3+4*2, 3+4*2, 3+4*2, 3+4*3, 3+4*3, 3+4*3, 3+4*3},\n                },{\n                    {3+4*0, 3+4*1, 3+4*2, 3+4*3, 3+4*0, 3+4*1, 3+4*2, 3+4*3},\n                    {3+4*0, 3+4*1, 3+4*2, 3+4*3, 3+4*0, 3+4*1, 3+4*2, 3+4*3},\n                }\n            };\n            const uint8_t *off= offset[MB_FIELD(sl)][mb_y&1];\n            for( i = 0; i < 8; i++ ) {\n                int j= MB_FIELD(sl) ? i>>2 : i&1;\n                int mbn_xy = sl->left_mb_xy[LEFT(j)];\n                int mbn_type = sl->left_type[LEFT(j)];\n                if( IS_INTRA( mbn_type ) )\n                    bS[i] = 4;\n                else{\n                    bS[i] = 1 + !!(sl->non_zero_count_cache[12+8*(i>>1)] |\n                         ((!h->pps.cabac && IS_8x8DCT(mbn_type)) ?\n                            (h->cbp_table[mbn_xy] & (((MB_FIELD(sl) ? (i&2) : (mb_y&1)) ? 8 : 2) << 12))\n                                                                       :\n                            h->non_zero_count[mbn_xy][ off[i] ]));\n                }\n            }\n        }\n        mb_qp   = h->cur_pic.qscale_table[mb_xy];\n        mbn0_qp = h->cur_pic.qscale_table[sl->left_mb_xy[0]];\n        mbn1_qp = h->cur_pic.qscale_table[sl->left_mb_xy[1]];\n        qp[0] = ( mb_qp + mbn0_qp + 1 ) >> 1;\n        bqp[0] = ( get_chroma_qp( h, 0, mb_qp ) +\n                   get_chroma_qp( h, 0, mbn0_qp ) + 1 ) >> 1;\n        rqp[0] = ( get_chroma_qp( h, 1, mb_qp ) +\n                   get_chroma_qp( h, 1, mbn0_qp ) + 1 ) >> 1;\n        qp[1] = ( mb_qp + mbn1_qp + 1 ) >> 1;\n        bqp[1] = ( get_chroma_qp( h, 0, mb_qp ) +\n                   get_chroma_qp( h, 0, mbn1_qp ) + 1 ) >> 1;\n        rqp[1] = ( get_chroma_qp( h, 1, mb_qp ) +\n                   get_chroma_qp( h, 1, mbn1_qp ) + 1 ) >> 1;\n        ff_tlog(h->avctx, "filter mb:%d/%d MBAFF, QPy:%d/%d, QPb:%d/%d QPr:%d/%d ls:%d uvls:%d", mb_x, mb_y, qp[0], qp[1], bqp[0], bqp[1], rqp[0], rqp[1], linesize, uvlinesize);\n        { int i; for (i = 0; i < 8; i++) ff_tlog(h->avctx, " bS[%d]:%d", i, bS[i]); ff_tlog(h->avctx, "\\n"); }\n        if (MB_FIELD(sl)) {\n            filter_mb_mbaff_edgev ( h, img_y                ,   linesize, bS  , 1, qp [0], a, b, 1 );\n            filter_mb_mbaff_edgev ( h, img_y  + 8*  linesize,   linesize, bS+4, 1, qp [1], a, b, 1 );\n            if (chroma){\n                if (CHROMA444(h)) {\n                    filter_mb_mbaff_edgev ( h, img_cb,                uvlinesize, bS  , 1, bqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgev ( h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1 );\n                    filter_mb_mbaff_edgev ( h, img_cr,                uvlinesize, bS  , 1, rqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgev ( h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1 );\n                } else if (CHROMA422(h)) {\n                    filter_mb_mbaff_edgecv(h, img_cb,                uvlinesize, bS  , 1, bqp[0], a, b, 1);\n                    filter_mb_mbaff_edgecv(h, img_cb + 8*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1);\n                    filter_mb_mbaff_edgecv(h, img_cr,                uvlinesize, bS  , 1, rqp[0], a, b, 1);\n                    filter_mb_mbaff_edgecv(h, img_cr + 8*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1);\n                }else{\n                    filter_mb_mbaff_edgecv( h, img_cb,                uvlinesize, bS  , 1, bqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgecv( h, img_cb + 4*uvlinesize, uvlinesize, bS+4, 1, bqp[1], a, b, 1 );\n                    filter_mb_mbaff_edgecv( h, img_cr,                uvlinesize, bS  , 1, rqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgecv( h, img_cr + 4*uvlinesize, uvlinesize, bS+4, 1, rqp[1], a, b, 1 );\n                }\n            }\n        }else{\n            filter_mb_mbaff_edgev ( h, img_y              , 2*  linesize, bS  , 2, qp [0], a, b, 1 );\n            filter_mb_mbaff_edgev ( h, img_y  +   linesize, 2*  linesize, bS+1, 2, qp [1], a, b, 1 );\n            if (chroma){\n                if (CHROMA444(h)) {\n                    filter_mb_mbaff_edgev ( h, img_cb,              2*uvlinesize, bS  , 2, bqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgev ( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1], a, b, 1 );\n                    filter_mb_mbaff_edgev ( h, img_cr,              2*uvlinesize, bS  , 2, rqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgev ( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1], a, b, 1 );\n                }else{\n                    filter_mb_mbaff_edgecv( h, img_cb,              2*uvlinesize, bS  , 2, bqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgecv( h, img_cb + uvlinesize, 2*uvlinesize, bS+1, 2, bqp[1], a, b, 1 );\n                    filter_mb_mbaff_edgecv( h, img_cr,              2*uvlinesize, bS  , 2, rqp[0], a, b, 1 );\n                    filter_mb_mbaff_edgecv( h, img_cr + uvlinesize, 2*uvlinesize, bS+1, 2, rqp[1], a, b, 1 );\n                }\n            }\n        }\n    }\n#if CONFIG_SMALL\n    {\n        int dir;\n        for (dir = 0; dir < 2; dir++)\n            filter_mb_dir(h, sl, mb_x, mb_y, img_y, img_cb, img_cr, linesize,\n                          uvlinesize, mb_xy, mb_type, mvy_limit,\n                          dir ? 0 : first_vertical_edge_done, a, b,\n                          chroma, dir);\n    }\n#else\n    filter_mb_dir(h, sl, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, first_vertical_edge_done, a, b, chroma, 0);\n    filter_mb_dir(h, sl, mb_x, mb_y, img_y, img_cb, img_cr, linesize, uvlinesize, mb_xy, mb_type, mvy_limit, 0,                        a, b, chroma, 1);\n#endif\n}', 'static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h,\n                                                    uint8_t *pix, int stride,\n                                                    const int16_t bS[7],\n                                                    int bsi, int qp, int a,\n                                                    int b, int intra)\n{\n    const unsigned int index_a = qp + a;\n    const int alpha = alpha_table[index_a];\n    const int beta  = beta_table[qp + b];\n    if (alpha ==0 || beta == 0) return;\n    if( bS[0] < 4 || !intra ) {\n        int8_t tc[4];\n        tc[0] = tc0_table[index_a][bS[0*bsi]] + 1;\n        tc[1] = tc0_table[index_a][bS[1*bsi]] + 1;\n        tc[2] = tc0_table[index_a][bS[2*bsi]] + 1;\n        tc[3] = tc0_table[index_a][bS[3*bsi]] + 1;\n        h->h264dsp.h264_h_loop_filter_chroma_mbaff(pix, stride, alpha, beta, tc);\n    } else {\n        h->h264dsp.h264_h_loop_filter_chroma_mbaff_intra(pix, stride, alpha, beta);\n    }\n}']