Patent attributes
An architecture of a fine granularity scalable (FGS) codec has an encoder and a decoder configurable in three prediction modes. The coarse prediction loop in the base layer of the encoder has a switch for selecting either coarse prediction output or fine prediction output in the encoder. The fine prediction loop in the enhancement layer of the encoder also has a switch for selecting either coarse prediction output or fine prediction output. 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.