Some refactoring to support warped motion mode

Change-Id: I15d54a3ae48b2b33082668116792c6595bdb3ddb
12 files changed