A method compensates for drift in macroblocks of a partially decoded input
bitstream. The macroblocks include intra-mode and inter-mode macroblocks,
and each macroblock includes DCT coefficients, and at least one motion
vector. An estimate of drift is measured in the partially decoded input
bitstream. The estimated drift is translated into an intra refresh rate.
The modes of inter-mode macroblock are mapped to intra-mode macroblock
according to the refresh rate. The DCT coefficients and the motion vector
for each changed macroblock are modified in accordance with the mapping
for each changed macroblock.