1. A method of measuring a visual quality of a processed image, comprising: receiving a first image and a second image, wherein the second image is a processed version of the first image; for each block in the first image, estimating a mean square error between the block in the first image and a block in the second image corresponding to the block in the first image based on quantization thresholds and quantization invariants used by an encoder; determining a first set of variances of pixel values in a pixel domain or transform coefficients in a transform domain for each block in the first image; estimating a second set of variances of pixel values or transform coefficients for each block in the second image based on the quantization thresholds and quantization invariants used by the encoder; and computing a measure of the visual quality of the second image based at least in part on the estimated mean square errors, the first set of variances and the second set of variances.