Patent ID: 7403562

Claim:
A method of performing rate control in a predictive video encoder, comprising: classifying pictures in a video sequence into respective categories; estimating a first quantization parameter; calculating a respective prediction cost and residual cost for each of the pictures in the video sequence based on the estimated quantization parameter; initializing rate control data for each category; computing a respective picture cost for each picture using the respective prediction cost and residual cost, and the rate control data for the respective category; performing bit allocation and quantization parameter selection for a picture selected from the video sequence using the respective picture cost and the respective rate control data for all the pictures in a respective group of pictures to which the selected picture belongs; encoding the selected picture; updating the rate control data for the respective category; and performing bit allocation and quantization parameter selection for a second picture selected from the video sequence using the respective picture cost and the respective rate control data for all the pictures in a respective group of pictures to which the second picture belongs.