Patent ID: 8582645

Claim:
A method of encoding a sequence of image frames, the method comprising: encoding a first image frame in the sequence according to a first encoding approach and using a first quantization parameter to form a first encoded image frame, wherein the first quantization parameter is computed to have a value designed to achieve a desired transmission rate for transmitting bits representing the first encoded image frame; computing a second quantization parameter for encoding a second image frame according to a second encoding approach, wherein the second encoding approach is not the same as the first encoding approach, wherein the second image frame immediately follows the first image frame in display order and wherein the second quantization step size derived from the quantization error associated with a co-located macro-block of a previous frame; determining if the value of the second quantization parameter is less than or equal to the value of the first quantization parameter; reducing the value of the second quantization parameter to a reduced value not greater than the value of the first quantization parameter if the second quantization parameter is greater than the value of the first quantization parameter, wherein the reduced value results in a transmission rate less than a desired transmission rate for transmitting bits representing the second encoded image frame; and encoding the second image frame according to the second encoding approach and using the second quantization parameter; wherein the first encoding approach comprises inter-frame encoding, the first encoded image frame being a P-frame, wherein the second encoding approach comprises only intra-frame encoding, the second encoded image frame being an I-frame, wherein the first quantization error of the first macro-block is specified by the equation: Dsse=Σ i Σ j ( O i,j −R i,j ) 2 wherein, Dsse represents the first quantization error, Σ represents a summation operator, O i,j represents the value of a pixel at co-ordinates (i,j) in a macro-block ‘O’ in the first image frame, R i,j represents the value of a pixel at co-ordinates (i,j) in a macro-block ‘R’ in a reconstructed frame obtained by reconstructing the first encoded image frame, ‘i’ is an index that has a range of values equal to the number of pixels along the width direction of a macro-block, and ‘j’ is an index that has a range of values equal to the number of pixels along the height direction of a macro-block, wherein, Dsse is also equal to Qp 2 /K, wherein Qp represents the first quantization step size, and K is a constant, wherein the second quantization step size is computed according to the equation: Si= sqrt ( K*Dsse ), wherein Si is the second quantization step size, and sqrt represents a ‘square root of’ operation.