hevc: templatize intra_pred