Patent ID: 8005139

Claim:
A method of encoding video, the method comprising: calculating a motion compensated error signal of pixel regions defined within a first portion of a first image in a video sequence; generating an amalgamated motion compensated error signal of pixel regions defined within a plurality of second portions of a plurality of other images in the video sequence using a motion compensated error signal for each second portion and a weighting factor for each image in the plurality of other images, wherein the weighting factor of an image in the plurality of other images is larger when the image is closer to the first image in the video sequence; identifying a first visual masking strength for the first portion of the first image in the video sequence, wherein the first portion is less than an entire of the first image, wherein the first visual masking strength quantifies a degree to which coding artifacts are not perceptible to a viewer due to complexity of the first portion, wherein the first visual masking strength is a function of the motion compensated error signal for the first image and the amalgamated motion compensated error signal; identifying a second visual masking strength for the entire first image in the video sequence, wherein the second visual masking strength quantifies a degree to which coding artifacts are not perceptible to a viewer due to complexity of the entire first image; computing a quantization parameter as a function of the identified first and second visual masking strengths; and by an encoder, encoding at least a part of the first image based on the computed quantization parameter.