In order to deploy highly efficient video coding technologies on different hardware platforms, computational complexity controllable algorithms are required. These algorithms should not only provide controllable computational complexity but also attain high coding performance under different computational complexity constraints. Since one of the significant resource consumers is motion estimation (ME), we propose herein a computational complexity controllable ME algorithm. Firstly, we give an optimized frame level ME algorithm with adjustable computational complexity by constructing a model of distortion and computational complexity. The ME priority for each macroblocks (MBs) is the priority of distortion-complexity slope (DC-slope) which can be predicted by our proposed distortion and computational complexity model. The computational complexity of this algorithm can be adjusted by setting the number of MBs on which ME should perform. Secondly, an ordinary differential equation is being used to describe the relation between the parameter and the computational complexity of our algorithm. Then we give an efficient technique to adjust the parameter of the algorithm to meet any computational complexity constraints induced by the differing hardware platforms. According to our experimental results, the proposed algorithm precisely controls the complexity of motion estimation. Besides, our algorithm achieves better coding performance compared with other motion estimation algorithms.