libavcodec/motion_est.c:1806: error: Buffer Overrun L1
  Offset: [10, 11] (⇐ [2, 3] + 8) Size: 4 by call to `interlaced_search`.

libavcodec/motion_est.c:1806:16: Call
1804.                                  s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1], 0);
1805.         c->current_mv_penalty= c->mv_penalty[s->b_code] + MAX_MV;
1806.         bimin= interlaced_search(s, 2,
                     ^
1807.                                  s->b_field_mv_table[1], s->b_field_select_table[1],
1808.                                  s->b_back_mv_table[xy][0], s->b_back_mv_table[xy][1], 0);

libavcodec/motion_est.c:745:1: Parameter `ref_index`
  743. }
  744. 
  745. static int interlaced_search(MpegEncContext *s, int ref_index,
       ^
  746.                              int16_t (*mv_tables[2][2])[2], uint8_t *field_select_tables[2], int mx, int my, int user_field_select)
  747. {

libavcodec/motion_est.c:805:20: Call
  803.             P_MV1[1]= my / 2;
  804. 
  805.             dmin = epzs_motion_search2(s, &mx_i, &my_i, P, block, field_select+ref_index, mv_table, (1<<16)>>1);
                          ^
  806. 
  807.             dmin= c->sub_motion_search(s, &mx_i, &my_i, dmin, block, field_select+ref_index, size, h);

libavcodec/motion_est_template.c:1228:1: Parameter `ref_index`
    1226. 
    1227. //try to merge with above FIXME (needs PSNR test)
    1228. static int epzs_motion_search2(MpegEncContext * s,
          ^
    1229.                              int *mx_ptr, int *my_ptr, int P[10][2],
    1230.                              int src_index, int ref_index, int16_t (*last_mv)[2],

libavcodec/motion_est_template.c:1278:11: Call
    1276.     }
    1277. 
    1278.     dmin= diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                    ^
    1279. 
    1280.     *mx_ptr= best[0];

libavcodec/motion_est_template.c:1008:1: Parameter `ref_index`
      1006. }
      1007. 
      1008. static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dmin,
            ^
      1009.                                        int src_index, int ref_index, int const penalty_factor,
      1010.                                        int size, int h, int flags){

libavcodec/motion_est_template.c:1021:26: Call
      1019.         return          full_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
      1020.     else if(c->dia_size>768)
      1021.         return           umh_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                                     ^
      1022.     else if(c->dia_size>512)
      1023.         return           hex_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags, c->dia_size&0xFF);

libavcodec/motion_est_template.c:732:1: Parameter `ref_index`
        730. }
        731. 
        732. static int umh_search(MpegEncContext * s, int *best, int dmin,
             ^
        733.                                        int src_index, int ref_index, int const penalty_factor,
        734.                                        int size, int h, int flags)

libavcodec/motion_est_template.c:754:9: Call
        752.     y= best[1];
        753.     for(x2=FFMAX(x-dia_size+1, xmin); x2<=FFMIN(x+dia_size-1,xmax); x2+=2){
        754.         CHECK_MV(x2, y);
                     ^
        755.     }
        756.     for(y2=FFMAX(y-dia_size/2+1, ymin); y2<=FFMIN(y+dia_size/2-1,ymax); y2+=2){

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

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

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

libavcodec/motion_est.c:235:16: Call
            233.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags){
            234.     if(flags&FLAG_DIRECT){
            235.         return cmp_direct_inline(s,x,y,0,0,size,h,ref_index,src_index, cmp_func, chroma_cmp_func, flags&FLAG_QPEL);
                                ^
            236.     }else{
            237.         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:107:1: <Length trace>
105. }
106. 
107. static av_always_inline int cmp_direct_inline(MpegEncContext *s, const int x, const int y, const int subx, const int suby,
     ^
108.                       const int size, const int h, int ref_index, int src_index,
109.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, int qpel){

libavcodec/motion_est.c:107:1: Parameter `ref_index`
              105. }
              106. 
              107. static av_always_inline int cmp_direct_inline(MpegEncContext *s, const int x, const int y, const int subx, const int suby,
                   ^
              108.                       const int size, const int h, int ref_index, int src_index,
              109.                       me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, int qpel){

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

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