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

libavcodec/motion_est.c:986:16: Call
984.         if ((s->avctx->flags & AV_CODEC_FLAG_INTERLACED_ME)
985.            && !c->skip){ //FIXME varc/d checks
986.             if(interlaced_search(s, 0, s->p_field_mv_table, s->p_field_select_table, mx, my, 0) < INT_MAX)
                    ^
987.                 mb_type |= CANDIDATE_MB_TYPE_INTER_I;
988.         }

libavcodec/motion_est.c:732:1: Parameter `ref_index`
  730. }
  731. 
  732. static int interlaced_search(MpegEncContext *s, int ref_index,
       ^
  733.                              int16_t (*mv_tables[2][2])[2], uint8_t *field_select_tables[2], int mx, int my, int user_field_select)
  734. {

libavcodec/motion_est.c:792:20: Call
  790.             P_MV1[1]= my / 2;
  791. 
  792.             dmin = epzs_motion_search2(s, &mx_i, &my_i, P, block, field_select+ref_index, mv_table, (1<<16)>>1);
                          ^
  793. 
  794.             dmin= c->sub_motion_search(s, &mx_i, &my_i, dmin, block, field_select+ref_index, size, h);

libavcodec/motion_est_template.c:1051:1: Parameter `ref_index`
    1049. 
    1050. //try to merge with above FIXME (needs PSNR test)
    1051. static int epzs_motion_search2(MpegEncContext * s,
          ^
    1052.                              int *mx_ptr, int *my_ptr, int P[10][2],
    1053.                              int src_index, int ref_index, int16_t (*last_mv)[2],

libavcodec/motion_est_template.c:1079:9: Call
    1077.     /* first line */
    1078.     if (s->first_slice_line) {
    1079.         CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift)
                  ^
    1080.         CHECK_CLIPPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
    1081.                         (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)

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

libavcodec/motion_est.c:266:16: Call
      264.     }else if(av_builtin_constant_p(subx) && av_builtin_constant_p(suby)
      265.        && subx==0 && suby==0){
      266.         return cmp_fpel_internal(s,x,y,size,h,ref_index,src_index, cmp_func, chroma_cmp_func,flags);
                          ^
      267.     }else{
      268.         return cmp_internal(s,x,y,subx,suby,size,h,ref_index,src_index, cmp_func, chroma_cmp_func, flags);

libavcodec/motion_est.c:234:1: Parameter `ref_index`
        232. }
        233. 
        234. static int cmp_fpel_internal(MpegEncContext *s, const int x, const int y,
             ^
        235.                       const int size, const int h, int ref_index, int src_index,
        236.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags){

libavcodec/motion_est.c:238:16: Call
        236.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags){
        237.     if(flags&FLAG_DIRECT){
        238.         return cmp_direct_inline(s,x,y,0,0,size,h,ref_index,src_index, cmp_func, chroma_cmp_func, flags&FLAG_QPEL);
                            ^
        239.     }else{
        240.         return cmp_inline(s,x,y,0,0,size,h,ref_index,src_index, cmp_func, chroma_cmp_func, 0, flags&FLAG_CHROMA);

libavcodec/motion_est.c:110:1: <Length trace>
108. }
109. 
110. static av_always_inline int cmp_direct_inline(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, int qpel){

libavcodec/motion_est.c:110:1: Parameter `ref_index`
          108. }
          109. 
          110. static av_always_inline int cmp_direct_inline(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, int qpel){

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

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