libavcodec/motion_est_template.c:591: error: Uninitialized Value
  The value read from ymax was never initialized.

libavcodec/motion_est_template.c:591:22: 
589.         if(dir!=3 && y>ymin) CHECK_MV_DIR(x  , y-1, 1)
590.         if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y  , 2)
591.         if(dir!=1 && y<ymax) CHECK_MV_DIR(x  , y+1, 3)
                          ^
592. 
593.         if(next_dir==-1){
