Patent ID: 8532169

Claim:
A two-pass encoder to determine a quantization parameter (QP) value to control an actual number of bits consumed in a second encoding pass, the two-pass encoder comprising: a first encoding module including a circuit configured to perform a first encoding pass to encode an input video sequence; a rate control module configured to determine R, wherein R is a target bit rate for encoding a picture i in the input video sequence in a second encoding pass, determine Q based on R and α, wherein α is a variable dependent on a QP value range, a picture type, and complexity, and Q is a QP value for the picture i or an MB of the picture i in the second encoding pass; a second encoding module configured to use Q to encode the picture i or the macroblock (MB) of the picture i in the second encoding pass to form an output bitstream; and wherein the rate control module is further configured to update α to encode a next picture or a next MB of the picture in the input video sequence for a further implementation of the second encoding pass, and wherein the rate control module is configured to determine Q based on a Q-R modeling equation represented by Q=−α×log 2 R+β, wherein β is adjusted for the QP value ranges, the picture type, and the complexity.