Moved motion feature computation to c++.