libavcodec/motion_est.c:1890: error: Buffer Overrun L1
  Offset: 8 Size: 4 by call to `ff_estimate_motion_b`.

libavcodec/motion_est.c:1890:17: Call
1888.             if(type == CANDIDATE_MB_TYPE_FORWARD || type == CANDIDATE_MB_TYPE_BIDIR){
1889.                 c->skip=0;
1890.                 ff_estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code);
                      ^
1891.             }
1892.             if(type == CANDIDATE_MB_TYPE_BACKWARD || type == CANDIDATE_MB_TYPE_BIDIR){

libavcodec/motion_est.c:1481:1: Parameter `ref_index`
  1479. }
  1480. 
  1481. static int ff_estimate_motion_b(MpegEncContext * s,
        ^
  1482.                        int mb_x, int mb_y, int16_t (*mv_table)[2], int ref_index, int f_code)
  1483. {

libavcodec/motion_est.c:1564:15: Call
  1562. 
  1563.     if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip)
  1564.         dmin= ff_get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1);
                      ^
  1565. 
  1566. //printf("%d %d %d %d//", s->mb_x, s->mb_y, mx, my);

libavcodec/motion_est_template.c:235:1: Parameter `ref_index`
    233. }
    234. 
    235. inline int ff_get_mb_score(MpegEncContext * s, int mx, int my, int src_index,
         ^
    236.                                int ref_index, int size, int h, int add_rate)
    237. {

libavcodec/motion_est_template.c:257:8: Call
    255. //    assert(c->avctx->me_sub_cmp != c->avctx->mb_cmp);
    256. 
    257.     d= cmp(s, mx>>(qpel+1), my>>(qpel+1), mx&mask, my&mask, size, h, ref_index, src_index, cmp_sub, chroma_cmp_sub, flags);
                ^
    258.     //FIXME check cbp before adding penalty for (0,0) vector
    259.     if(add_rate && (mx || my || size>0))

libavcodec/motion_est.c:108:1: <Length trace>
106.     against a proposed motion-compensated prediction of that block
107.  */
108. static av_always_inline int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby,
     ^
109.                       const int size, const int h, int ref_index, int src_index,
110.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags){

libavcodec/motion_est.c:108:1: Parameter `ref_index`
      106.     against a proposed motion-compensated prediction of that block
      107.  */
      108. static av_always_inline int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby,
           ^
      109.                       const int size, const int h, int ref_index, int src_index,
      110.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags){

libavcodec/motion_est.c:119:5: Assignment
      117.     const int hx= subx + (x<<(1+qpel));
      118.     const int hy= suby + (y<<(1+qpel));
      119.     uint8_t * const * const ref= c->ref[ref_index];
               ^
      120.     uint8_t * const * const src= c->src[src_index];
      121.     int d;

libavcodec/motion_est.c:176:50: Array access: Offset: 8 Size: 4 by call to `ff_estimate_motion_b` 
      174. 
      175.                     c->hpel_put[0][fxy](c->temp, ref[0] + (fx>>1) + (fy>>1)*stride, stride, 16);
      176.                     c->hpel_avg[0][bxy](c->temp, ref[8] + (bx>>1) + (by>>1)*stride, stride, 16);
                                                            ^
      177.                 }
      178.             }
