This paper presents an on bit allocation and Lagrange multiplier (λMODE) adjustment for H.264 rate control. To enhance the precision of the complexity estimation and bit allocation, a frequency-domain parameter named mean-absolute-transform-difference (MATD) is adopted to represent frame and macroblock (MB) residual complexity. Second, the MATD ratio is utilized to enhance the accuracy of frame layer bit prediction. Then, by considering the bit usage status of whole sequence, a measurements combining forward and backward bit analysis is proposed to optimize the λMODE on frame layer. On MB layer, bits are allocated by proposed remaining complexity analysis. The computed quantization parameter (QP) is further adjusted according to predicted MB texture bits. Simulation results verify the performance of the proposed algorithm. Compared with the recommended rate control in H.264 reference software JM13.2, the PSNR improvement is up to 1.13 dB by using our algorithm.