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

libavcodec/motion_est.c:1473:12: Call
1471.     }
1472. 
1473.     dmin = ff_epzs_motion_search(s, &mx, &my, P, 0, 0, s->p_mv_table, (1<<16)>>shift, 0, 16);
                 ^
1474. 
1475.     s->p_mv_table[xy][0] = mx<<shift;

libavcodec/motion_est_template.c:1116:1: Parameter `ref_index`
  1114. 
  1115. //this function is dedicated to the braindamaged gcc
  1116. inline int ff_epzs_motion_search(MpegEncContext * s, int *mx_ptr, int *my_ptr,
        ^
  1117.                              int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2],
  1118.                              int ref_mv_scale, int size, int h)

libavcodec/motion_est_template.c:1123:16: Call
  1121. //FIXME convert other functions in the same way if faster
  1122.     if(c->flags==0 && h==16 && size==0){
  1123.         return epzs_motion_search_internal(s, mx_ptr, my_ptr, P, src_index, ref_index, last_mv, ref_mv_scale, 0, 0, 16);
                       ^
  1124. //    case FLAG_QPEL:
  1125. //        return epzs_motion_search_internal(s, mx_ptr, my_ptr, P, src_index, ref_index, last_mv, ref_mv_scale, FLAG_QPEL);

libavcodec/motion_est_template.c:999:1: Parameter `ref_index`
     997.    optimal mv.
     998.  */
     999. static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx_ptr, int *my_ptr,
          ^
    1000.                              int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2],
    1001.                              int ref_mv_scale, int flags, int size, int h)

libavcodec/motion_est_template.c:1105:11: Call
    1103. 
    1104. //check(best[0],best[1],0, b0)
    1105.     dmin= diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                    ^
    1106. 
    1107. //check(best[0],best[1],0, b1)

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:990:18: Call
      988.         return       l2s_dia_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
      989.     else
      990.         return   var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                            ^
      991. }
      992. 

libavcodec/motion_est_template.c:896:1: Parameter `ref_index`
        894. }
        895. 
        896. static int var_diamond_search(MpegEncContext * s, int *best, int dmin,
             ^
        897.                                        int src_index, int ref_index, int const penalty_factor,
        898.                                        int size, int h, int flags)

libavcodec/motion_est_template.c:921:13: Call
        919. 
        920. //check(x + dir,y + dia_size - dir,0, a0)
        921.             CHECK_MV(x + dir           , y + dia_size - dir);
                         ^
        922.         }
        923. 

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_epzs_motion_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.             }
