diff --git a/lanes/h264x264-r2.report.md b/lanes/h264x264-r2.report.md index 3372510c..1b6f22b3 100644 --- a/lanes/h264x264-r2.report.md +++ b/lanes/h264x264-r2.report.md @@ -211,3 +211,50 @@ nothing reads them any more: the twelve-bit intra signalling estimate and the Rate-distortion quantisation (x264's trellis) is worth 0.20 dB on film and 0.10 on the screen capture by the ablation in this report, and we still have none. That is the next slice. + +## Addendum: rate-distortion quantisation, attempted and not landed + +x264's trellis is still worth what the ablation said after the mode decision +changed -- re-measured, because a stale premise is the failure mode this lane +has already hit twice. Ours against x264 with `trellis=0` reads -0.535 dB on +the film clip and -0.270 on the screen capture, against -0.728 and -0.478 with +x264 at its default: 0.193 and 0.208 dB of real headroom. + +A coefficient-level walk-back was built and measured against it. For each inter +luma 4x4 block, levels are stepped toward zero from the end of the scan while +squared error plus lambda times bits falls; the bit estimate was made +scan-position aware, since a significance flag is only sent up to the last +non-zero level and that saving is the whole reason the technique pays. Then the +whole macroblock was coded once per candidate strength and the winner picked on +*exact* coded bits, using the trial machinery the mode decision already has. + +It buys about 0.02 dB, an order of magnitude short: + +| candidates (multiples of the zero-block lambda) | synthetic | film | screen | +|-------------------------------------------------|-----------|--------|--------| +| none (landed) | -4.523 | -0.728 | -0.478 | +| 0, 0.5 | -4.523 | -- | -- | +| 0, 1 | -4.512 | -0.728 | -0.480 | +| 0, 2 | -4.520 | -- | -- | +| 0, 1, 2, 4 | -4.563 | -- | -- | +| 0, 4 | -4.538 | -- | -- | +| 0, 8 | -4.564 | -- | -- | + +Two findings, both of which the next attempt has to answer: + + * **A superset of candidates chosen on exact cost measured worse.** Adding 2 + and 4 to the candidate set can only lower the local cost of every + macroblock, and it lost 0.05 dB against the pair. Local rate-distortion on + a reference picture is myopic: what a blurrier block saves now, the nine + pictures predicting from it pay for. Nothing in the metric sees that. + * **The candidate generator is rate-blind where it matters.** The levels are + walked using an estimate; exact bits only pick between finished + macroblocks. x264 decides each coefficient against its actual CABAC + context cost, which is why its version is worth ten times ours. + +So the machinery is not landed -- it doubles the inter coding work for 0.02 dB. +The next attempt should decide levels where the contexts exist, at write time, +which inter luma allows because its reconstruction does not feed the next +block's prediction the way intra's does; and it needs a term for what a +reference picture's quality is worth to the pictures that predict from it, +without which more search measures worse.