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

libavcodec/motion_est.c:1938:16: Call
1936.                                  s->b_forw_mv_table[xy][0], s->b_forw_mv_table[xy][1], 0);
1937.         c->current_mv_penalty= c->mv_penalty[s->b_code] + MAX_MV;
1938.         bimin= interlaced_search(s, 2,
                     ^
1939.                                  s->b_field_mv_table[1], s->b_field_select_table[1],
1940.                                  s->b_back_mv_table[xy][0], s->b_back_mv_table[xy][1], 0);

libavcodec/motion_est.c:893:1: Parameter `ref_index`
  891. }
  892. 
  893. static int interlaced_search(MpegEncContext *s, int ref_index,
       ^
  894.                              int16_t (*mv_tables[2][2])[2], uint8_t *field_select_tables[2], int mx, int my, int user_field_select)
  895. {

libavcodec/motion_est.c:953:20: Call
  951.             P_MV1[1]= my / 2;
  952. 
  953.             dmin = epzs_motion_search2(s, &mx_i, &my_i, P, block, field_select+ref_index, mv_table, (1<<16)>>1);
                          ^
  954. 
  955.             dmin= c->sub_motion_search(s, &mx_i, &my_i, dmin, block, field_select+ref_index, size, h);

libavcodec/motion_est_template.c:1191:1: Parameter `ref_index`
    1189. 
    1190. //try to merge with above FIXME (needs PSNR test)
    1191. static int epzs_motion_search2(MpegEncContext * s,
          ^
    1192.                              int *mx_ptr, int *my_ptr, int P[10][2],
    1193.                              int src_index, int ref_index, int16_t (*last_mv)[2],

libavcodec/motion_est_template.c:1241:11: Call
    1239.     }
    1240. 
    1241.     dmin= diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                    ^
    1242. 
    1243.     *mx_ptr= best[0];

libavcodec/motion_est_template.c:973:1: Parameter `ref_index`
      971. }
      972. 
      973. static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dmin,
           ^
      974.                                        int src_index, int ref_index, int const penalty_factor,
      975.                                        int size, int h, int flags){

libavcodec/motion_est_template.c:980:18: Call
      978.         return funny_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
      979.     else if(c->dia_size<-1)
      980.         return   sab_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                            ^
      981.     else if(c->dia_size<2)
      982.         return small_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);

libavcodec/motion_est_template.c:809:1: Parameter `ref_index`
        807. 
        808. #define MAX_SAB_SIZE ME_MAP_SIZE
        809. static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
             ^
        810.                                        int src_index, int ref_index, int const penalty_factor,
        811.                                        int size, int h, int flags)

libavcodec/motion_est_template.c:872:9: Call
        870.            continue;
        871. 
        872.         SAB_CHECK_MV(x-1, y)
                     ^
        873.         SAB_CHECK_MV(x+1, y)
        874.         SAB_CHECK_MV(x  , y-1)

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: [10, 11] (⇐ [2, 3] + 8) Size: 4 by call to `interlaced_search` 
          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.             }
