Okay, did not know you measure distortion that way.
If you wonder, that definition is pretty much universal in the lossy compression (e.g. rate-distortion optimization or RDO).
If you wonder, that definition is pretty much universal in the lossy compression (e.g. rate-distortion optimization or RDO).