The usage of various prediction modes is the remarkable characteristic of H.264/AVC, however, it acquires heavy computation. Aiming at this problem, a fast mode decision algorithm is proposed for H.264/AVC encoding, which is on the basis of the application of all-zero blocks detection. By skipping some prediction modes after some comparisons, the algorithm can reduce the computational complexity of H.264/AVC encoding.