global motion implementation fixed to decrease computation time. Should help avoid frame drops.