Global motion compensation