Merge "Refactor inter_predictor function."