R5 report -- saved motion field kept only the last tile's columns
Browse files at this commitd72296dad0944004e39d1263bdaf9a631e6b803fParent: ba5351f- docs
- r5 report -- saved motion field kept only the last tile's columns
- straddling gate green
1 changed file +59 -0
- lanes/mergefix-r5.report.md +59 -0
lanes/mergefix-r5.report.mdadded+59 -0
| @@ -0,0 +1,59 @@ | |||
| 1 | +# lane-mergefix r5 report | ||
| 2 | + | ||
| 3 | +## Verdict | ||
| 4 | +`a_frame_edge_straddling_band_decodes_pixel_exact` is GREEN. Root cause: the frame's | ||
| 5 | +SAVED motion field (`build_motion_field`, this crate's `av1_copy_frame_mvs`) read the mi | ||
| 6 | +grid through `MiGrid::get`, which is clamped to the CURRENT tile window -- and it runs | ||
| 7 | +after the tile loop, so only the LAST tile's columns were ever stored. Every earlier | ||
| 8 | +tile's temporal (MFMV) candidates were then absent from the next frame's MV stack. | ||
| 9 | + | ||
| 10 | +## Fix (2 files) | ||
| 11 | +- `crates/ec-av1/src/mvstack.rs` (`MiGrid::get_frame`, new, after `get`): unclamped | ||
| 12 | + frame-level read. | ||
| 13 | +- `crates/ec-av1/src/decode.rs` (`build_motion_field`): reads `get_frame` instead of `get`. | ||
| 14 | +- Rungs kept (they are what found it): `EC_TPL` (stream.rs, per inter frame: | ||
| 15 | + `order_hint`, `use_ref_frame_mvs`, filled projected cells) and `EC_TPL_SAVED` | ||
| 16 | + (decode.rs under `EC_TRACE_TPL`, occupancy map of the saved field, via | ||
| 17 | + `MotionField::occupancy` / `TplField::filled_cells`). | ||
| 18 | + | ||
| 19 | +## Why the entropy stream never showed it | ||
| 20 | +The mode/mv ladder of decode frame 2 is element-identical to the oracle (30 blocks, same | ||
| 21 | +`rng` at every `EC_MODE`). A missing weight-2 temporal vote only REORDERS the stack: at | ||
| 22 | +mi(0,24) (NEW_NEWMV, ref 1+7) aomdec's stack[1] is `this=(0,0) comp=(0,0) w=34` (17 | ||
| 23 | +temporal probes x 2), ours was `this=(36,0) w=2` -- the compound-extension zero-fill -- | ||
| 24 | +so the NEWMV predictor was 36 off and the decoded mv came out (32,0) vs (-4,0). | ||
| 25 | + | ||
| 26 | +EVIDENCE: ~/.cache/mergefix-tmp/r5/{o16,n16,aom}.f0-5 | ours `EC_AV1_PREFILT_DUMP16` | ||
| 27 | +(cropped 192x68 u16 LE) vs aomdec `EC_AV1_PREFILT_DUMP` (192x68 u8) on str61.obu (md5 | ||
| 28 | +a14892ed0ba88b6ad2b566e251ea2d33) | pre-filter wrong luma px per decode-order frame | ||
| 29 | +0..5: 0/0/1306/3358/5027/6622 BEFORE -> 0/0/0/0/0/0 AFTER. | ||
| 30 | + | ||
| 31 | +EVIDENCE: ~/.cache/mergefix-tmp/r5/{o,a}.tpl | `EC_TRACE_TPL=1` on both decoders | | ||
| 32 | +aomdec has `EC_TPL mi_row=0 mi_col=24 blk=(0,0) mfmv0=(0,0) rfo=4`, ours INVALID; our | ||
| 33 | +`EC_TPL_SAVED` occupancy map showed every frame's saved field filled only in x8 columns | ||
| 34 | +16..23 (mi_col 32..47 = the last of the 2 tile columns) out of 24. | ||
| 35 | + | ||
| 36 | +## Gates (one invocation, log $HOME/.cache/cargo-target-mergefix-r5-gates.log) | ||
| 37 | +`cargo test -p ec-av1 --lib -j3 -- a_frame_edge_straddling_band_decodes_pixel_exact <9 r2 | ||
| 38 | +siblings> real_aomenc_1to4_streams_decode_pixel_exact_and_rect_vartx` | ||
| 39 | +-> `10 passed; 1 failed`. The lane gate and all 9 siblings PASS (incl. both 10-bit arms, | ||
| 40 | +sub8x8 inter split, 16x16 AB, split-transform SB/HORZ-VERT strips, 4:1/sub8 chroma strip). | ||
| 41 | + | ||
| 42 | +The one failure, `real_aomenc_1to4_streams_..._rect_vartx_leaves_fire_before_a_named_refusal`, | ||
| 43 | +is PRE-EXISTING on the merged main state, not a trade: with the one-line fix reverted the | ||
| 44 | +gate fails identically ("never fired (32x16=0, 16x32=0, 0 refusals, 0 compared)", 18 | ||
| 45 | +attempts, 0 mismatches) -- log `$HOME/.cache/cargo-target-mergefix-r5-prefix.log`. It is | ||
| 46 | +the gate-recipe defect the ledger records after lane-rectres lifted its documented blocker. | ||
| 47 | + | ||
| 48 | +## Class sweep | ||
| 49 | +Class: a frame-level consumer reading a per-tile-clamped map. Swept every `grid.get(` | ||
| 50 | +in the crate: the other 20 sites are per-block neighbour scans inside the tile walk | ||
| 51 | +(correctly clamped); `build_motion_field` is the only frame-level reader after the tile | ||
| 52 | +loop (decode.rs:27980 is the only `grid` use past it). | ||
| 53 | + | ||
| 54 | +## Disposition | ||
| 55 | +- accepted: `real_aomenc_1to4_streams_..._rect_vartx_leaves_fire` stays red (pre-existing | ||
| 56 | + recipe defect, needs an aomenc recipe that emits a 64x16/16x64 var-tx leaf). | ||
| 57 | +- accepted: r3's partition-context finding stays unshipped (sibling-gate trade, r4). | ||
| 58 | +- closed: r4's 177-px post-deblock residue in decode frame 1's bottom band -- gone with | ||
| 59 | + this fix (all frames 0 px pre-filter; the gate compares post-filter and is green). | ||