When making mode decisions of inter frames in H.264 [1], the encoder must perform exhaustive calculations of the costs of Rate Distortion (RD) on all modes and find the optimal one. This procedure has high computational complexity for many redundant calculations. A Machine Learning based mode division strategy is proposed in this paper, which can accurately and quickly predict unnecessary modes and improve the overall encoding speed. The strategy uses the logistic regression model [2] and includes three features: the Quantization Parameter (QP), the variance, and the best RD cost of the 16x16 macroblock. The experimental results on different video scenes show that compared with the existing fast mode in x264, the speed is increased by 13.5% and the quality is improved by 0.15%.