libavcodec/h264.c:6359: error: Buffer Overrun L1
  Offset: [2, 21] (⇐ [2, 20] + [0, 1]) Size: 2.

libavcodec/h264.c:6358:22: <Offset trace>
6356.                 int v = 0;
6357. 
6358.                 for( l = 0; !v && l < 1 + (h->slice_type_nos == FF_B_TYPE); l++ ) {
                           ^
6359.                     v |= ref2frm[l][h->ref_cache[l][b_idx]] != ref2frmn[l][h->ref_cache[l][bn_idx]] ||
6360.                          FFABS( h->mv_cache[l][b_idx][0] - h->mv_cache[l][bn_idx][0] ) >= 4 ||

libavcodec/h264.c:6358:22: Assignment
6356.                 int v = 0;
6357. 
6358.                 for( l = 0; !v && l < 1 + (h->slice_type_nos == FF_B_TYPE); l++ ) {
                           ^
6359.                     v |= ref2frm[l][h->ref_cache[l][b_idx]] != ref2frmn[l][h->ref_cache[l][bn_idx]] ||
6360.                          FFABS( h->mv_cache[l][b_idx][0] - h->mv_cache[l][bn_idx][0] ) >= 4 ||

libavcodec/h264.c:6245:1: <Length trace>
6243. 
6244. 
6245. static void av_always_inline filter_mb_dir(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, int mb_xy, int mb_type, int mvy_limit, int first_vertical_edge_done, int dir) {
      ^
6246.     MpegEncContext * const s = &h->s;
6247.     int edge;

libavcodec/h264.c:6245:1: Parameter `h->ref2frm[*][*]`
6243. 
6244. 
6245. static void av_always_inline filter_mb_dir(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, int mb_xy, int mb_type, int mvy_limit, int first_vertical_edge_done, int dir) {
      ^
6246.     MpegEncContext * const s = &h->s;
6247.     int edge;

libavcodec/h264.c:6250:5: Assignment
6248.     const int mbm_xy = dir == 0 ? mb_xy -1 : h->top_mb_xy;
6249.     const int mbm_type = s->current_picture.mb_type[mbm_xy];
6250.     int (*ref2frm) [64] = h->ref2frm[ h->slice_num          &(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);
          ^
6251.     int (*ref2frmm)[64] = h->ref2frm[ h->slice_table[mbm_xy]&(MAX_SLICES-1) ][0] + (MB_MBAFF ? 20 : 2);
6252.     int start = h->slice_table[mbm_xy] == 0xFFFF ? 1 : 0;

libavcodec/h264.c:6359:26: Array access: Offset: [2, 21] (⇐ [2, 20] + [0, 1]) Size: 2
6357. 
6358.                 for( l = 0; !v && l < 1 + (h->slice_type_nos == FF_B_TYPE); l++ ) {
6359.                     v |= ref2frm[l][h->ref_cache[l][b_idx]] != ref2frmn[l][h->ref_cache[l][bn_idx]] ||
                               ^
6360.                          FFABS( h->mv_cache[l][b_idx][0] - h->mv_cache[l][bn_idx][0] ) >= 4 ||
6361.                          FFABS( h->mv_cache[l][b_idx][1] - h->mv_cache[l][bn_idx][1] ) >= mvy_limit;
