Lane-t900 r8 handoff -- inter blocks never stamped the mode maps, plus the open one-sample and frame-49 items
Browse files at this commit7fe18316f7927efcb1e358ef4f77bf00c9f31eddParent: cb1dc1f- docs
- lane-t900 r8 handoff -- inter blocks never stamped the mode maps, plus the open one-sample and frame-49 items
1 changed file +88 -0
- lanes/t900-r8.handoff.md +88 -0
lanes/t900-r8.handoff.mdadded+88 -0
| @@ -0,0 +1,88 @@ | ||
| 1 | +# lane-t900 r8 handoff -- inter blocks never stamped the mode maps (edge-filter type); one U sample and a frame-49 cliff still open | |
| 2 | + | |
| 3 | +Branch `lane-t900`, fix commit `1d928d6e` (merged main `76b33796` first, | |
| 4 | +fast-forward). No suite this round (turn cap); `cargo check -p ec-av1` clean and | |
| 5 | +the 128-SB witness gate passes with the new counter. | |
| 6 | + | |
| 7 | +## Root cause CLOSED this round | |
| 8 | + | |
| 9 | +**An INTER block wrote neither luma nor chroma mi mode map**, so a later intra | |
| 10 | +block's `get_intra_edge_filter_type` (spec 7.11.2, libaom `reconintra.h` | |
| 11 | +`is_smooth`) found no mi-exact entry for an inter neighbour and fell back to the | |
| 12 | +coarse SUB band, which still held a SMOOTH mode from an earlier block in that | |
| 13 | +pixel row/column. libaom answers "not smooth" for an inter neighbour by | |
| 14 | +construction (`mbmi->mode` is an inter mode; `is_smooth(.., plane>0)` returns 0 | |
| 15 | +outright -- "uv_mode is not set for inter blocks"). Wrong filter type => | |
| 16 | +`intra_edge_filter_strength` 3 instead of 2 (and `use_intra_edge_upsample` can | |
| 17 | +flip with it). | |
| 18 | + | |
| 19 | +* Fix: `decode.rs` `record_inter_rect_mi` -- `if is_inter { record_mode_mi(.., | |
| 20 | + DC_PRED); record_uv_mode_mi(.., DC_PRED); }`. The main inter path already went | |
| 21 | + through `record_rect_mi`; the gap was every path that only called | |
| 22 | + `record_inter_rect_mi` (notably the 8x8 leaf at decode.rs:27273). | |
| 23 | +* Counter: `inter_neighbour_not_smooth_hits()` (decode.rs, next to | |
| 24 | + `uv_mode_mi_override_hits`), incremented in `modes_above_left` (luma) and | |
| 25 | + `smooth_uv_neighbour_unsnapped` (chroma) when the coarse band would have said | |
| 26 | + SMOOTH and the mi-exact map does not. Asserted `> 0` in the witness gate | |
| 27 | + `a_10bit_128sb_film_frames_with_warp_cdef_and_interintra_decode_pixel_exact` | |
| 28 | + (stream.rs): **375 hits, 15 shown frames still pixel-exact**. | |
| 29 | +* Instrument added: the SQUARE-block `OUR_PRED` print now carries `ft=` like the | |
| 30 | + rect one (decode.rs:11055) -- that single field is what localised this | |
| 31 | + (aomdec `EC_PRED ... ft=0` vs ours `ft=1`). | |
| 32 | +* Evidence, `~/.cache/rectres-tmp/t6300.obu` (10-bit 1920x792, 125 decode | |
| 33 | + frames), `cmp.sh`: frame 11 was 28 Y + 3 U + 4 V samples off; now Y and U are | |
| 34 | + EXACT, V has 2 samples left. Whole-cut differing bytes **18108 -> 12780**, | |
| 35 | + differing frames 87 -> 86. | |
| 36 | + Localisation: prefilter dump identical to the final dump => reconstruction, | |
| 37 | + not loop filter; block mi(24,348) is a 16x16 D67 intra-in-inter block, | |
| 38 | + p_angle 61, aomdec ft=0 / ours ft=1. | |
| 39 | + | |
| 40 | +## Open, with what is known | |
| 41 | + | |
| 42 | +1. **t6300 frame 11 residue**: V only, chroma (673,394) and (674,392), both -1. | |
| 43 | + Bottom chroma area (chroma height 396). Same shape as (2) -- treat as one | |
| 44 | + defect. | |
| 45 | +2. **t900 frame 41** (`~/.cache/t900-tmp/cut_900.obu`): ONE U sample. NOTE the | |
| 46 | + coordinate moved with the loop filter: **prefilter it is chroma (353,395)**, | |
| 47 | + post-filter (354,395), delta -1. So it is RECONSTRUCTION, not | |
| 48 | + deblock/CDEF/LR (pf.sh proved this: `pf_r8_900` frame 41 differs the same | |
| 49 | + way). The block is mi(192,176), 32x32, `skip=1`, INTER, ref0=5, mv0=(-4,14), | |
| 50 | + interp SMOOTH/SMOOTH -- so a pure chroma MC value on the LAST chroma row | |
| 51 | + (395 = 792/2 - 1). Its chroma MC call is | |
| 52 | + `EC_MC_CALL x_q4=5646 y_q4=6140 w=16 h=16 xfrac=14 yfrac=12 hk=Smooth | |
| 53 | + vk=Smooth tw=960 th=396 stride=960`; the vertical 8-tap reads rows 391..398 | |
| 54 | + and rows >395 are clamped by `mc.rs::sample`. Next step: dump the 8 tap rows | |
| 55 | + and the intermediate for column 353 from both decoders (aomdec has no MC | |
| 56 | + rung -- either add one to `dec_build_inter_predictors` or recompute by hand | |
| 57 | + from the aomdec dump of the reference frame) and check the clamp/rounding on | |
| 58 | + the clamped taps. Only one column differs because the error is a rounding | |
| 59 | + tip, not a whole-row offset -- do not conclude from "one sample" that the | |
| 60 | + row is otherwise right. | |
| 61 | +3. **NEW, not in the r7 handoff -- t900 cut frame 49 cliff**: `cut_900.obu` has | |
| 62 | + 264 decode frames (not ~50). Frames 42..48 are exact, then frame 49 differs | |
| 63 | + in 1.78 M bytes and it never recovers (every later frame 2-4 M bytes off). | |
| 64 | + Checked: it is NOT a frame-order offset (our f49 vs aomdec f48..f52 all | |
| 65 | + differ by >1.7 M). This is a full desync/gross mis-decode and is now the | |
| 66 | + biggest single item on this stream -- localise it BEFORE spending more | |
| 67 | + rounds on the single-sample residues. | |
| 68 | + | |
| 69 | +## Film table (decode-order first differing frame vs aomdec, this tip) | |
| 70 | + | |
| 71 | +| cut | first bad | size of the defect | | |
| 72 | +|---|---|---| | |
| 73 | +| t6300 (`~/.cache/rectres-tmp/t6300.obu`, 125 fr) | 11 | 2 V samples (was 35 bytes); whole cut 12780 bytes / 86 frames | | |
| 74 | +| t900 (`~/.cache/t900-tmp/cut_900.obu`, 264 fr) | 41 | 1 U sample; then the frame-49 cliff above | | |
| 75 | +| t5400 (`~/.cache/t900-tmp/cut_5400.obu`) | 33 (r7 value, NOT re-measured this round) | 1642397 bytes | | |
| 76 | +| t8100 (`~/.cache/t900-tmp/cut_8100.obu`) | 1 (r7 value, NOT re-measured this round) | 1313 bytes | | |
| 77 | + | |
| 78 | +Re-run `cmp.sh <name> <cut>` for t5400/t8100 first: the r8 edge-filter fix may | |
| 79 | +have moved both. | |
| 80 | + | |
| 81 | +## Instruments (unchanged from r7 unless noted) | |
| 82 | + | |
| 83 | +`~/.cache/t900-tmp/`: `cmp.sh`, `pf.sh`, `px.py`, `sb.py`, `lad.py`, `reg.py`; | |
| 84 | +private aomdec `~/.cache/t900-tmp/aom-build/aomdec` (EC_TRACE_TXTYPE); oracle | |
| 85 | +`~/.cache/aom-oracle/build/aomdec` (EC_PRED/EC_PREDND/EC_PREDOUT with | |
| 86 | +`ft=`/`n_tr=`/`p_angle=`). Ours: `EC_PRED=1` prints OUR_PRED with `ft=` for BOTH | |
| 87 | +rect and square now. Frame window trick used all round: | |
| 88 | +`... 2>&1 | awk '/EC_PICT idx=<N-1>$/{f=1} /EC_PICT idx=<N>$/{exit} f'`. |