libavcodec/motion_est.c:875: error: Buffer Overrun L1
  Offset: [8, 9] (⇐ [0, 1] + 8) Size: 4 by call to `cmp`.

libavcodec/motion_est.c:815:1: Parameter `*s->current_picture_ptr->ref_index[*]`
813. }
814. 
815. static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int p_type){
     ^
816.     MotionEstContext * const c= &s->me;
817.     Picture *p= s->current_picture_ptr;

libavcodec/motion_est.c:853:13: Assignment
851. 
852.         if(USES_LIST(mb_type, 0)){
853.             int field_select0= p->ref_index[0][4*mb_xy  ];
                 ^
854.             int field_select1= p->ref_index[0][4*mb_xy+2];
855.             assert(field_select0==0 ||field_select0==1);

libavcodec/motion_est.c:875:17: Call
873.             x= p->motion_val[0][xy ][0];
874.             y= p->motion_val[0][xy ][1];
875.             d = cmp(s, x>>shift, y>>shift, x&mask, y&mask, 0, 8, field_select0, 0, cmpf, chroma_cmpf, flags);
                     ^
876.             x= p->motion_val[0][xy2][0];
877.             y= p->motion_val[0][xy2][1];

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

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

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

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