Rate-distortion optimization
Rate-distortion optimization (RDO) is the method a video encoder uses to choose, for each block of a frame, the option that gives the best quality for the number of bits spent. Rate means the bits used, and distortion means the visible quality loss. RDO weighs both and picks the best balance. Stronger RDO improves compression but slows encoding.
Why it matters
Rate-distortion optimization is a large part of why modern encoders get good quality from limited bitrates. Stronger RDO lowers delivery and storage costs for the same picture, but it uses more computing time. Choosing preset speed is really choosing how much RDO to buy.
How it works
- For each block, the encoder lists the coding options, such as block sizes, modes and motion vectors.
- It estimates how many bits each option costs (rate) and how much quality it loses (distortion).
- It combines both into one score using a weighting factor tied to the target quality.
- It picks the option with the lowest score, then moves on to the next block.
What does the encoder preset have to do with RDO?
Slower presets turn on more thorough rate-distortion optimization. They test more coding options for each block, so they find choices that save bits at the same quality. Faster presets skip many of those tests. That is why slower presets produce smaller files but take longer to encode.
Does rate-distortion optimization slow down encoding?
Yes, full rate-distortion optimization slows encoding because it tests many options per block. Encoders offer levels, from quick estimates to full trials, so teams can choose. On-demand libraries usually afford higher levels, while live streams use lighter settings to keep up in real time.
Where it's used
Encoding teams at video platforms and OTT services tune rate-distortion optimization through presets, choosing slower settings for valuable on-demand titles and faster ones for live streams and short video uploads.
By the numbers
- Encoders listed as using rate-distortion optimization include x264, x265, libavcodec, Xvid and the HEVC reference software HM. (Wikipedia: Rate-distortion optimization)


