H.264 is becoming the worldwide digital video standard for consumer electronics and personal computers. In particular, H.264 has already been selected as a key compression codec for the next generation of optical disc formats, HD-DVD and Blue-ray disc. Rate Control(RC) plays an important role in allocating H.264 bits to adapt to the actual channel bandwidth and meanwhile achieve high-quality reconstructed images. In this paper, a novel achievement to improve the precision of Mean Absolute Difference (MAD) prediction in H.264/AVC rate control is presented, which is different from the current standardized RC scheme (JVT-G012) in H.264 that uses a simple linear model, instead an formula is developed to dynamically calculate a ratio factor in the direct mean absolute difference method to optimize the bit allocation. Experimental results show that our method both improves the MAD prediction precision and decrease PSNR fluctuation between frames with less computing complexity.