One embodiment disclosed relates to a method for encoding and decoding a
video sequence in which a keyframe is used to bi-directionally predict
frames in the sequence. The keyframe is coded independently of other
frames in the sequence. Both a prior frame occurring before the keyframe
and a subsequent frame occurring after the keyframe are predicted using
data from the keyframe. Another embodiment disclosed relates to a method
for allocating bits to a keyframe during video encoding. Effects of a
plurality of keyframe bit allocations on quality of a predicted frame are
measured. Said effects are used to determine a near optimal keyframe bit
allocation.