Patent 7346106 was granted and assigned to Apple (company) on March, 2008 by the United States Patent and Trademark Office.
An encoding manager performs a first-pass encoding of a video sequence, collecting modeling data concerning the sequence in the process. The encoding manager utilizes collected data to construct a model concerning the sequence, the model including bit overhead for each frame and data concerning transitions that occur during the sequence. The encoding manager uses the data model to generate a rate profile for the video sequence, avoiding buffer underflow by allocating bits from hard to easy segments as needed. The encoding manager utilizes the rate profile to perform a second-pass encoding of the video sequence, adjusting quantization and bit rate for frames as necessary to avoid underflow and conform to the bit budget for the video sequence.