libavcodec/motion_est.c:630: error: Buffer Overrun L1
  Offset: [8, 11] (⇐ [0, 3] + 8) Size: 4 by call to `epzs_motion_search4`.

libavcodec/motion_est.c:594:9: Assignment
592.     init_mv4_ref(c);
593. 
594.     for(block=0; block<4; block++){
             ^
595.         int mx4, my4;
596.         int pred_x4, pred_y4;

libavcodec/motion_est.c:630:17: Call
628.         P_MV1[1]= my;
629. 
630.         dmin4 = epzs_motion_search4(s, &mx4, &my4, P, block, block, s->p_mv_table, (1<<16)>>shift);
                     ^
631. 
632.         dmin4= c->sub_motion_search(s, &mx4, &my4, dmin4, block, block, size, h);

libavcodec/motion_est_template.c:993:1: Parameter `ref_index`
  991. }
  992. 
  993. static int epzs_motion_search4(MpegEncContext * s,
       ^
  994.                              int *mx_ptr, int *my_ptr, int P[10][2],
  995.                              int src_index, int ref_index, int16_t (*last_mv)[2],

libavcodec/motion_est_template.c:1043:11: Call
  1041.     }
  1042. 
  1043.     dmin= diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                  ^
  1044. 
  1045.     *mx_ptr= best[0];

libavcodec/motion_est_template.c:832:1: Parameter `ref_index`
    830. }
    831. 
    832. static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dmin,
         ^
    833.                                        int src_index, int ref_index, const int penalty_factor,
    834.                                        int size, int h, int flags){

libavcodec/motion_est_template.c:843:25: Call
    841.         return small_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
    842.     else if(c->dia_size>1024)
    843.         return          full_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
                                 ^
    844.     else if(c->dia_size>768)
    845.         return           umh_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);

libavcodec/motion_est_template.c:620:1: Parameter `ref_index`
      618. }
      619. 
      620. static int full_search(MpegEncContext * s, int *best, int dmin,
           ^
      621.                                        int src_index, int ref_index, const int penalty_factor,
      622.                                        int size, int h, int flags)

libavcodec/motion_est_template.c:644:5: Call
      642.     y= best[1];
      643.     d= dmin;
      644.     CHECK_CLIPPED_MV(x  , y);
               ^
      645.     CHECK_CLIPPED_MV(x+1, y);
      646.     CHECK_CLIPPED_MV(x, y+1);

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