A motion-compensated video encoding scheme employs progressive fine-granularity
layered coding to encode macroblocks of video data into frames having multiple
layers, including a base layer of comparatively low quality video and multiple
enhancement layers of increasingly higher quality video. Some of the enhancement
layers in a current frame are predicted from different quality layers in reference
frames. The video encoding scheme estimates drifting errors during the encoding
and chooses a coding mode for each macroblock in the enhancement layer to maximize
high coding efficiency while minimizing drifting errors.