forge
Explore
Log in

Don't you dare go Hollow

Lane-t900 r9 handoff -- sub-8x8 GLOBALMV interp guard, warp top-right reach, 4K head element-exact, frame 49 still open

Browse files at this commit

91fac5af9eb9663c41d1973d5606fed749c1f2b4Ahmet Kaan GümüşParent: 864b5c6
  • docs
    • lane-t900 r9 handoff -- sub-8x8 GLOBALMV interp guard, warp top-right reach, 4K head element-exact, frame 49 still open
Show full message
docs(av1): lane-t900 r9 handoff -- sub-8x8 GLOBALMV interp guard, warp top-right reach, 4K head element-exact, frame 49 still open
lanes/t900-r9.handoff.mdadded+109 -0
@@ -0,0 +1,109 @@
1+# lane-t900 r9 handoff -- two root causes landed (sub-8x8 GLOBALMV interp, warp TR reach); the 4K head is element-exact, frame 49 of the 1080p cut still desyncs
2+
3+Tip `5c8ab7f2` on `lane-t900`. `cargo check -p ec-av1 --tests --examples` clean.
4+No suite this round (coordinator: no suite).
5+
6+## STEP 0 -- consolidation (DONE, commits `cdf54852`, `a0b69fe6`)
7+
8+* `git merge main` = no-op (branch already carried main `76b33796`).
9+* `git merge 434ac12c` (lane-midcut r3 tip): ONE conflict block in decode.rs (8 hunks),
10+ resolved to **our** `warp_plane_allowed(w, h)` call sites; midcut's equivalent
11+ `warp_luma_ok`/`warp_chroma_ok` bindings deleted (same rule, same libaom source
12+ `av1_init_warp_params`). Kept midcut's `intra_rect_in_inter_txctx_override_hits`
13+ counter, its interintra **RECT ARM** gate and its `rect_before` scaffold --
14+ `interintra_rect_hits()` already exists in this tree (decode.rs:2141), so the arm
15+ compiled unchanged.
16+* Cherry-picked lane-frame80 `c5b1020e` MINUS its two `tx_size_context*` delegations
17+ (frame80 r2 measured them redundant, dropped in `d79559ab`): kept the
18+ `EC_TRACE_COEFF_FRAME` rung + `decode_key_frame_tile_with_cdfs` clearing
19+ `TX_SELECT_INTER`. NOT `7ab8915b`, NOT the delegations.
20+* Named tests at `a0b69fe6`: `128sb_film interintra hidden_arf rect64_corner_tus sub8
21+ refusal_inventory gate_coverage` -> **26 passed, 0 failed** (96.8 s,
22+ `$HOME/.cache/t900-named-r9.log`).
23+
24+## STEP 1 -- ROOT CAUSE CLOSED (`c13d51df`): 4-px-sided GLOBALMV blocks must read interp
25+
26+libaom `is_nontrans_global_motion` returns 0 at
27+`AOMMIN(mi_size_wide, mi_size_high) < 2` BEFORE testing any model. Our two sub-8x8
28+readers (`decode_inter_sub8_split4` ~23649, `decode_inter_sub8_rect2` ~24575) and the
29+COMPOUND arm of `decode_inter_block` (~20280) lacked that guard and suppressed the
30+interp-filter symbol. Sub-8x8 sites are now `gm_nontrans = false` outright (their side
31+is always 4 px); the compound arm gained `bw4.min(bh4) >= 2`. The single-ref arm
32+(~21508) already had it; `decode_inter_block8` cannot hit it.
33+Counter `gm_nontrans_small_side_hits()` (printed by decode_probe) counts only flips.
34+
35+**Verified on the 4K head** (`~/.cache/frame80-tmp/t265.obu`, 170 decode frames,
36+`EC_INTRA16X4_DECODE=1 EC_INTRA128_IN_INTER=1`): coefficient ladder vs `a265.f`
37+(`lad5.py`, tags all_zero/eob/after_bases + rng) -- frame 99 was `DIFF at 11933`,
38+now `OK` (69065 elements), and frames **100..169 are all OK, zero DIFF** (70/70).
39+Counter fires 109 times on that cut. Our decode reports `OK: 176 frames decoded`.
40+So the frame80 stream has NO known entropy divergence left in its 170 frames; the
41+remaining work there is the pixel compare of shown frames + a witness fixture.
42+
43+## STEP 2 -- frame 49 of `~/.cache/t900-tmp/cut_900.obu` (PARTIAL)
44+
45+Header facts (`EC_PROBE_HDR=1`, new rung): decode frame 49 is a **hidden ALTREF** --
46+`type=Inter show=false refresh=0x01 base_q=38 primary_ref=0 order_hint=51
47+ref_idx=[2,0,3,2,2,1,4] allow_warp=TRUE cdef=3 lr=[Wiener,Wiener,Wiener] tiles=1x1`.
48+It is the 4th `allow_warp=true` ARF (they run at decode 1,17,33,49,65,...; 1/17/33
49+decode exactly), so "ARF + warp" alone is not the trigger.
50+
51+First diverging element (EC_MODE ladder `lad.py a900.mode o900.mode`, mode traces of
52+both decoders): decode frame 49, block **mi(64,144), 64x128, NEWMV ref0=1**.
53+Both decoders reach rng 47868 after the mv. aomdec then reads `motion_mode` to
54+**45539** and `interp` to 42041; we read motion_mode to **41629** and interp to 38479.
55+47868*31014/32768 = 45303 (the BLOCK_64X128 **obmc** row) vs 47868*28898/32768 = 42217
56+(the **motion_mode** row) -- aomdec read the 2-symbol alphabet, we read the 3-symbol
57+one. `EC_MM` showed `elig=1 ab=1 lf=1`, `EC_MM2` showed `row=14 warp_elig=1`, and
58+`EC_PROJ_MI=64,144` showed the deciding sample was the **top-right** cell (a 64x16
59+neighbour, ref=1 single).
60+
61+Fix shipped (`5c8ab7f2`): `av1_findSamples` probes with
62+`AOMMAX(xd->width, xd->height)` (mvref_common.c:1235), we passed `bw4`; now
63+`bw4.max(bh4)`. Counter `tr_reach_longer_side_hits()` = **1942** on that cut.
64+
65+**STATE AFTER THE FIX -- READ THIS BEFORE BUILDING ON IT**
66+* The fix is SOURCE-PROVEN but NOT gate-verified: the named gates were run BEFORE it
67+ (at `a0b69fe6`) and NOT re-run after. **Re-run them first thing.** If they red,
68+ `git revert 5c8ab7f2` is a clean single-hunk revert (plus its counter).
69+* Pixel compare `cmp.sh r9_900 cut_900.obu` at the tip: first differing frame still
70+ **41** (the known 1 U sample), frame 49 now **2264240** bytes (was 1.78 M) and the
71+ cliff still never recovers; 218 of 267 dumped frames differ.
72+* The EC_MODE ladder at the tip moves the first divergence to
73+ **mi(0,384) (aomdec rng 63728, ours 56480, `side=64`), last match mi(24,376)
74+ rng 33292** -- i.e. EARLIER inside frame 49 than mi(64,144) (mi(0,384) is in the
75+ same frame; the alphabet fix changed earlier rect blocks' reads). So frame 49 has
76+ at least one more defect ahead of the one that was fixed, and mi(64,144) is no
77+ longer reachable in the trace (its rng-35860 line is gone).
78+* NEXT STEP, exactly: rebuild the mode traces at the tip
79+ (`o900d.step` already exists at the tip: `EC_MODE|EC_ISTEP|EC_IF|EC_MM` filtered),
80+ find `EC_MODE mi_row=0 mi_col=384` in frame 49 of `a900.step` vs `o900d.step`, and
81+ read the `EC_MM`/`EC_MM2` pair for the LAST MATCHING block mi(24,376) -- the
82+ divergence is again in the symbols between the mv and the interp filter.
83+
84+## Instruments added this round (all env-gated, additive)
85+
86+* `EC_PROBE_HDR=1` -> one `EC_HDR` line per decode-order frame (stream.rs, next to
87+ `set_coeff_trace_frame`).
88+* `EC_TRACE_MODE_STEP` now also prints `EC_MM` (motion_mode eligibility terms:
89+ `elig/ab/lf/sw/skipmode/ii/gmb` + rng) and `EC_MM2` (`row=` cdf row,
90+ `warp_elig/scaled/fimv/obmc/warped` + rng after the read) -- a SUPPRESSED symbol
91+ prints nothing, which is why this defect was invisible for a round.
92+* `EC_PROJ_MI=<mi_row>,<mi_col>` -> `EC_PROJ cand ...` per warp-sample candidate in
93+ libaom's order (above, left, top-left, top-right).
94+* decode_probe prints `gm_nontrans_small_side` and `tr_reach_longer_side`.
95+
96+## Artifacts
97+
98+`~/.cache/t900-tmp/`: `a900.mode` `o900.mode` (pre-TR-fix) `o900d.mode`/`o900d.step`
99+(tip), `a900.step` (aomdec EC_MODE+EC_ISTEP), `hdr900.txt` (EC_HDR per frame),
100+`proj2.txt` (candidates at mi(64,144)), `d_r9_900/` (pixel dumps at the tip),
101+`oall265.f` (our 4K coefficient trace, all frames), `lad265.out` (frames 100..169 OK).
102+`cmp.sh` now points at `$HOME/.cache/cargo-target-t900` (was `-t900-b`).
103+
104+## NOT done this round (turn cap)
105+
106+STEP 3 (midcut 126-sample rect-intra edge residue), STEP 4 (f41 chroma MC bottom-row
107+clamp, t6300 f11 2 V samples), STEP 5 (witness gate asserts for the two new counters,
108+4K prefix fixture, suite, reelc/hg re-probe), and the film table refresh for
109+t5400/t8100. Nothing about them was measured this round.