Patent ID: 8798140

Claim:
A method of processing video frames in an encoding system, said method comprising: receiving a sequence of video frames, wherein each of said sequence of frames comprises a corresponding sequence of pixel values; and encoding each of said sequence of frames according to limiting a number of bits of each encoded frame to a pre-specified upper limit for each encoded frame, wherein each of said sequence of frames is encoded using a respective quantization parameter based on said pre-specified upper limit; receiving an average bit rate, wherein said average bit rate represents an average number of bits per unit time formed by said encoding in a duration, wherein said pre-specified upper limit is computed based on said average bit rate, wherein said encoding comprises: generating a sequence of difference frames by comparing each of said sequence of video frames with a corresponding reference frame; applying a transform on each of said sequence of difference frames to generate a corresponding set of coefficients; determining a quantization parameter for each of said sequence of frames based on said pre-specified upper limit, wherein said determining comprises: examining each video frame to determine a corresponding complexity, wherein a number of bits required to represent the video frame for a same quality is proportionate to said complexity, wherein said examining comprises calculating an average of variances of macroblocks contained in each present frame, wherein a maximum target bits (MTB) per macroblock is calculated in the present frame, and wherein said MTB and said average of variances are used to set said quantization parameter for the present frame; and setting said quantization parameter for each frame to have a positive correlation with said complexity, wherein said quantization parameter is determined based on said upper limit; quantizing said set of coefficients according to said quantization parameter to generate a set of quantized coefficients; and coding said set of quantized coefficients to form a set of code words, which together represents the set of pixel values for the corresponding video frame; and maintaining a plurality of tables, one for each of non-overlapping ranges of MTB values, wherein each table indicates a corresponding quantization parameter for said average of variances, wherein said using includes performing a lookup of said plurality of tables.