1. A method of encoding a sequence of video images, the method comprising: generating a current encoding solution by encoding the sequence of video images using a plurality of encoding parameters; from the sequence of video images encoded by the current encoding solution, identifying a plurality of video images that cause an underflow of an input buffer of a reference decoder, wherein each image in the plurality of video images successively worsens the underflow of the input buffer, wherein the input buffer of the reference decoder is used during encoding to simulate a decoder input buffer, wherein the input buffer underflows when a final arrival time of an image is after a nominal removal time of the image; adjusting a set of encoding parameters for the plurality of video images; encoding the plurality of video images using the adjusted set of encoding parameters to generate a new encoding solution that is designated as the current encoding solution; and repeating the identifying, the adjusting, and the encoding to generate the new encoding solution until the encoding of the sequence of video images does not cause an underflow of the input buffer of the reference decoder.