encoding.info
You are hereSourcePredictionTransformEntropy codingFiltersFramesDecisionsRate controlPerceptionQualityBitstreamSettingsEncoder map
Page 2 of 4 in Measuring quality

Rate-distortion curves and Bjøntegaard delta rate

Measuring quality · concept · added 2026-11-15

In Brief:
A rate-distortion curve shows how measured quality changes with bitrate for one source and one encoder setup. The Bjøntegaard delta rate summarizes the relative difference in bitrate between two curves over the quality range they share. The result depends on the metric, the points sampled and the interpolation.

One encode is one point: so many bits, so much quality. Change a setting and both numbers move, usually in the same direction, so two encodes rarely settle which encoder is better. A rate-distortion curve joins several encodes of the same source, and the Bjøntegaard delta rate (BD-rate) reduces the gap between two such curves to one percentage.

Why one point is not enough

BA bitsquality
Teal dashes: B's curve if B is the better encoderCoral dashes: B's curve if it is the worse one
Conceptual illustration. B used fewer bits than A and scored lower. Both dashed curves pass through B; which one is real cannot be read from two points.

The fix is to encode each side several times, at different quantizers or bitrates, and compare the curves at equal quality: how many more or fewer bits does B need to reach the quality A reached?

Compare two encoders over a range

Encoder A codes the cat with intra prediction and rounds each coefficient to the nearest level. Encoder B differs in one thing, which you choose. Each is run at four values of the quantization parameter (QP). Quality is peak signal-to-noise ratio (PSNR), and bits are modeled, not written. The shaded band is the range of quality both curves cover; only that range counts. The two curves lie close together, so a second plot shows the gap between them at each quality of the band. BD-rate is stated for B relative to A: −5% means B needs 5% fewer bits than A, averaged in log rate over the band, and a positive number means more. The two gap readouts are the same comparison at the band's lower and upper edge.

22, 27, 32, 37
← finer quantizerscoarser quantizers →
Quality (PSNR, dB) against modeled bits, logarithmic scale
Gray: encoder ATeal: encoder B
B's bits relative to A's, against quality (PSNR, dB)
Teal: the gap at each qualityDashes: BD-rate

The dashed line averages differences in log rate, so it is not the ordinary average height of the teal curve.

BD-rate
Shared range, dB
Gap, lower edge
Gap, upper edge
QPA bitsA dBB bitsB dB
Simplified demo: one 32×32 picture, coded in 4×4 blocks at the nominal H.264 step for each QP. Modeled bits charge each nonzero level the length of a signed Exp-Golomb code and each zero half a bit; that price list is invented, and a different one would move every point and could change the sign of a result. "No prediction" predicts every block as flat mid-gray. The BD-rate arithmetic follows Netflix's calculator. Both encoders code the same single picture, so bits stand in for rate; real comparisons use whole test sequences and the measured rate of the video stream, since a file's size also counts its container and any audio.

With a dead zone of offset 1/3 at QPs 22 to 37:

How the number is computed

BD-rate, percent = 100 × (10^D − 1)

D = average, over the shared range
    of quality, of
    log10(rate of B) − log10(rate of A)

The average is taken in log rate, so the result is the geometric mean of the rate ratio, less one. A ratio of 0.8 over half the band and 1.25 over the other half gives 0%, though the two gaps, −20% and +25%, average to +2.5%. Direction matters too: if B against A is −10%, A against B over the same band is +11.1%.

The page's script follows the calculator in Netflix's repository: at least four points a curve, quality that rises with rate, and only the range of quality the two curves share.

The calculator's four steps

The steps below are those of the calculator in the repository of Netflix's Video Multi-Method Assessment Fusion metric. Its comments say it was validated against a document named JCTVC-E137, which was not read for this page.

  • At least four points per curve, sorted by rate, duplicates removed.
  • Quality must rise with rate. A curve where a higher rate scored the same or lower is rejected, not repaired. Look for a saturated metric or an anomalous encode; do not drop a point only to get a number.
  • Each curve becomes log10 of rate as a function of quality, joined between the points by shape-preserving piecewise cubic Hermite interpolation, so the curve does not overshoot; pchipend in the source sets the end slopes.
  • Only the shared range is integrated. If the two curves share no quality, there is no result.

Trade-offs

Sources

Read 2026-11-15 and 2026-11-16, at the commits linked.