intra_prediction refactoring