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

libavcodec/motion_est.c:1826:15: Call
1824. 
1825.     if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip)
1826.         dmin= ff_get_mb_score(s, mx, my, 0, 0, 0, 16, 1);
                    ^
1827. 
1828.     get_limits(s, 16*mb_x, 16*mb_y); //restore c->?min/max, maybe not needed

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_get_mb_score` 
    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.             }
