Patent ID: 7876819

Claim:
A video coding device comprising: means for coding frames of a video sequence using a set of first quantization parameters (QPs) in a first coding pass; means for obtaining rate-distortion statistics for the coded video sequence of the first coding pass; means for estimating rate-distortion characteristics of the video sequence based on the rate-distortion statistics; means for selecting a second set of QPs for a second coding pass of the frames in the video sequence based on the estimated rate-distortion characteristics; wherein the means for estimating applies a rate model and a distortion model to the rate-distortion statistics to estimate the rate-distortion characteristics; wherein the rate model substantially corresponds to a model given by: R i =( A i )( p i )+( B i ) wherein the distortion model corresponds to a model given by: D i ⁡ ( Q i - 1 , Q i ) ≈ D i ⁡ ( Q ^ i - 1 , Q i ) ⁢ σ ^ i 2 ⁡ ( Q ^ i - 1 ) + D i - 1 ( Q i - 2 , Q i - 1 ) - D ^ i - 1 ⁡ ( Q ^ i - 2 , Q ^ i - 1 ) σ ^ i 2 ⁡ ( Q ^ i - 1 ) ⁢ ⁢ wherein ⁢ : ρ i ≈ ρ ^ i ⁢ σ ^ i 2 ⁡ ( Q ^ i - 1 ) + D i - 1 ⁡ ( Q i - 2 , Q i - 1 ) - D ^ i - 1 ⁡ ( Q ^ i - 2 , Q ^ i - 1 ) σ ^ i 2 ⁡ ( Q ^ i - 1 ) B i ≈ B ^ i ⁢ σ ^ i 2 ⁡ ( Q ^ i - 1 ) + D i - 1 ⁡ ( Q i - 2 , Q i - 1 ) - D ^ i - 1 ⁡ ( Q ^ i - 2 , Q ^ i - 1 ) σ ^ i 2 ⁡ ( Q ^ i - 1 ) ⁡ [ ρ ^ i ⁡ ( Q i ) ρ ^ i ⁡ ( Q ^ i , ) ] 1 8 , ⁢ and A i ≈ { A ^ i if ⁢ ⁢ ρ ^ i > M 256 256 * A ^ i ⁢ ρ ^ i M if ⁢ ⁢ M 512 < ρ ^ i < M 256 128 * A ^ i ⁢ ρ ^ i M otherwise and wherein subscript “I” is an integer that identifies parameters with respect to an i th frame of the video sequence, subscript “i−I” identifies parameters with respect to an i th −1 frame of the video sequence, and subscript “i−2” identifies parameters with respect to an i th -2 frame of the video sequence, wherein “^” notation defines respective variables as being first pass variables, and notation without “^” defines respective variables as being second pass variables, wherein “Q” variables are QPs, “D” variables are measures of distortion, “R” variables are measures of rate, “σ 2 i ” represents energy of motion-compensated residue, “ρ” variables define a number of non-zero quantized DCT coefficients, “A” variables refer to an average number of bits per non-zero quantized discrete cosine transformed (DCT) coefficients, “B” variables refer to a number of bits used for coding texture information, and “M” is the number of pixels in the frames of the video sequence.