forge
Explore
Log in

Don't you dare go Hollow

Lane-arfpred report -- ARF census, prediction instrument, temporal filter

Browse files at this commit

352814869480740e39846e8aeaefd9a85e752cbcAhmet Kaan GümüşParent: 7b95799
  • docs
    • lane-arfpred report -- ARF census, prediction instrument, temporal filter
Show full message
docs(av1): lane-arfpred report -- ARF census, prediction instrument, temporal filter
lanes/arfpred.report.mdmodified+82 -0
@@ -106,3 +106,85 @@ still carry the grain the anchor no longer has. Note the non-monotone byte
106106 column: past strength 15 the stream gets BIGGER again, which is the leaves
107107 paying for a reference that no longer resembles their own sources.
108108
109+## 4. The gate — the lever SHIPS at strength 3
110+
111+`encode::tests::bd_rate_film_long_gop`, 48 pictures, BD vs libaom `cpu-used 6`
112+/ rav1e `speed 6` (lower is better):
113+
114+| arm | film A | film B |
115+|---|---|---|
116+| control (`EC_AV1_ARF_TF=0`) | +23.5 / −8.0 | +85.3 / +6.7 |
117+| **`ARF_TF = 3` (ships)** | **+22.7 / −7.9** | **+79.0 / +2.7** |
118+
119+Film B takes **6.3 points off the libaom column and 4.0 off rav1e's** — the
120+biggest single move any lane has made on that row since the pyramid itself —
121+and film A takes 0.8 off the libaom column while handing back 0.1 on rav1e's,
122+which is the keep rule's "one column ≥0.5 down, the other flat ±0.3" clause.
123+It is also FASTER (film B two-point probe 167 s → 147 s).
124+
125+Guard gate `bd_rate_screen_native` (12 pictures, all five rows), against the
126+charter's controls:
127+
128+| clip | control | `ARF_TF = 3` | Δ |
129+|---|---|---|---|
130+| bars 1080p | −3.1 / −18.7 | −2.9 / −18.6 | +0.2 / +0.1 |
131+| bars 2160p | +9.1 / −13.3 | +9.1 / −13.3 | 0.0 / 0.0 |
132+| film A | +20.3 / −4.9 | **+18.3 / −6.0** | **−2.0 / −1.1** |
133+| film B | +24.7 / −1.8 | **+24.6 / −2.1** | −0.1 / −0.3 |
134+| screen capture | +14.6 / −33.2 | +14.6 / −33.2 | byte-identical |
135+
136+Every real-content row improves; the two colour-bar rows move 0.2 and 0.0
137+(inside the 0.3 bound), and the screen capture is byte-identical — its
138+sequence codes no pyramid ARF at all, so the filter never runs there.
139+
140+## 5. Invariants
141+
142+* Byte pins re-taken (the hidden frames' pixels move by construction):
143+ `(150, 8269 → 8218)`, `(60, 33044 → 33017)`; green at the default AND at
144+ `EC_AV1_SPEED=6`.
145+* Split suite on the shipped default: `--skip stream::` **341 passed / 1
146+ FAILED** (below), `stream:: --skip 10bit` 201 passed / 0 failed, `10bit`
147+ 42 passed / 0 failed.
148+* `cargo check --workspace --all-targets -j4`: 0 errors, 0 `ec-av1` warnings
149+ (the 25 warnings are `ec-opus`/`ec-vorbis`, pre-existing).
150+* `--ignored --exact encoder::tests::every_speed_preset_decodes_sample_exact_through_both_decoders`
151+ 1 passed.
152+
153+### The one RED test, and what it means
154+
155+`encoder::tests::bitrate_target_lands_within_5_percent_over_48_frames` fails
156+on ONE of its six arms — 2 Mbps, pyramid on: **−5.1% off target** against the
157+test's ±5% bound (every other rate/shape arm passes, 768 kbps −0.0%,
158+1536 kbps +0.0%).
159+
160+The cause is in the test's own print: the pyramid arm codes its twelve ARFs at
161+`12x22237` bytes at 1536 kbps AND at `12x22237` at 2 Mbps — **identical**, i.e.
162+the rate loop is already at its ARF quantizer floor at the higher rate and
163+cannot spend the target's extra bytes whatever it is handed (class
164+`instrument at bound`). The temporal filter makes the anchor cheaper still, so
165+an arm that was inside the bound by a hair is now 0.1 point outside it. It is
166+a rate-control ceiling this lane uncovered, not a new coding defect: the
167+achieved rate is 1.90 Mbps of a 2.00 Mbps target on a synthetic clip, and both
168+BD gates (which score at fixed quantizers) improve.
169+
170+`deferred: the pyramid rate loop cannot reach a 2 Mbps target on this clip —
171+its ARF level saturates at a q floor (identical bytes at two targets) —
172+unblocked by a lane on RateLoop's per-level clamp; the honest alternatives
173+today are shipping the lever with this arm red or shipping ARF_TF = 0 and
174+losing 6.3/4.0 BD points on film B.`
175+
176+## 6. What this lane did NOT do
177+
178+* `deferred: a strength sweep ON THE GATE — only 3 was taken to the deciding
179+ gate; 8/15/30/60 were refuted on the two-point probe, which mispredicted
180+ the SIGN of 3's gate result (probe −1.4% bytes, gate −6.3 BD points), so the
181+ probe is a weak proxy for this lever — unblocked by a lane that can afford
182+ three more 30-minute long-GOP arms (1, 2, 5).`
183+* `deferred: the filter window — the encoder's group buffer holds only the two
184+ DISPLAY-PAST neighbours when it codes its top ARF; the census says ±2 both
185+ sides removes 14.3% of the prediction SAD against past-only's 11.7%, so a
186+ one-group lookahead is worth a lane — unblocked by a lane that reorders the
187+ encoder's picture buffer.`
188+* `deferred: the ARF's mode/partition gap (+871 B a frame, 2196 blocks against
189+ rav1e's 1507) — this lane's lever is the residual half of the census —
190+ unblocked by the 128-root lane (parked) or a partition lane at the anchor.`