Patent ID: 8249145

Claim:
An encoder comprising: a frequency transformer for applying a frequency transform to convert samples in a sample domain into transform coefficients in a transform domain; a quantizer for quantizing the transform coefficients; an entropy encoder for entropy encoding the quantized transform coefficients; an inverse quantizer for de-quantizing the quantized transform coefficients; a rounding compensation module for adding a rounding offset to the de-quantized transform coefficients; and a controller for making encoding decisions after considering post-inverse frequency transform rounding effects on de-quantized transform coefficient values, wherein the controller includes a module for estimating pixel-domain distortion between original transform coefficients of a block and corresponding de-quantized transform coefficients of the block in the transform domain after the rounding compensation module adds the rounding offset by compensating for rounding in at least one of the corresponding de-quantized transform coefficients of the block and computing the estimated pixel-domain distortion using the original transform coefficients of the block, the at least one rounding-compensated coefficient and other coefficients of the de-quantized transform coefficients of the block.