A fast lossless motion estimation algorithm using selective scan order and sequential elimination