A context-based fast mode decision scheme for P slices in the H.264 video coding standard is presented. Based on the coding modes and the statistical distribution of rate-distortion costs of the collocated macroblocks in the previous frames, a context modelling technique has been developed to design adaptive threshold values for the fast mode decision. The simulation results show that the proposed method can reduce the encoding time by about 83% on average without significant loss of rate-distortion performance.