Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Rate-distortion
optimization (also RDO or RD) is a method of improving video quality in
video compression. The name refers to the optimization of the amount of
distortion (loss of video quality) against the amount of data required
to encode the video, the rate. While it is primarily used by video
encoders, rate-distortion optimization can be used to improve quality in
any encoding situation (image, video, audio, or otherwise) where
decisions have to be made that affect both file size and quality
simultaneously. The classical method of making encoding decisions is for
the video encoder to choose the result which yields the highest quality
output image. However, this has the disadvantage that the choice it
makes might require more bits while giving comparatively little quality
benefit. One common example of this problem is in motion estimation, and
in particular regarding the use of quarter pixel-precision motion
estimation.