Abstract
An architecture of a fine granularity scalable (FGS) codec has an encoder and a decoder configurable in three prediction modes. The prediction loop in the base layer of the encoder has a switch for selecting either coarse prediction or fine prediction in the encoder as the reference. The prediction loop in the enhancement layer of the encoder also has a switch for selecting either coarse prediction or fine prediction as the reference. Two-pass encoding is used in the encoder. The first pass extracts coding parameters and classifies macroblocks of a video frame into three groups each being assigned with all-coarse prediction mode, all-fine prediction mode or mix prediction. The second pass uses the assigned modes to encode the macroblocks. A rate adaptation algorithm is provided to truncate the enhancement bit-planes for low bit rate, medium bit rate and high bit rate and allocate bit efficiently for achieving higher video quality.