inter_prediction refactoring