Lane-frame36 r2 report + handoff -- the split superblock strip's missing TXFM_CONTEXT publication, the 2 s head cut now byte-exact
Browse files at this commitd43ed2059da1d3a0c03e84f1345fe5246cb113e6Parent: 620173e- docs
- lane-frame36 r2 report + handoff -- the split superblock strip's missing TXFM_CONTEXT publication, the 2 s head cut now byte-exact
2 changed files +125 -0
- lanes/frame36-r2.handoff.md +51 -0
- lanes/frame36-r2.report.md +74 -0
lanes/frame36-r2.handoff.mdadded+51 -0
| @@ -0,0 +1,51 @@ | ||
| 1 | +# lane-frame36 r2 HANDOFF (branch `lane-frame36`, tip c9e15d7) | |
| 2 | + | |
| 3 | +## Root causes this round | |
| 4 | +1. FIXED (decode.rs:9594) -- `decode_block_rect64`'s `depth != 0` (split) arm returns | |
| 5 | + early past the tail `txfm_partition_update_rect` r1 added, so a SPLIT superblock-level | |
| 6 | + strip published NO `TXFM_CONTEXT` band. libaom's `set_txfm_ctxs` runs for every block | |
| 7 | + with the SPLIT unit's size. Frame 33: the 16x64 strip at mi(192,140) reads `tx_depth=1` | |
| 8 | + (TX_16X32), so libaom has `left_txfm=32`; ours kept 64 and the 32x64 intra block at | |
| 9 | + mi(192,144) read `tx_size_cat3` row 2 where aomdec reads row 1 (same value, different | |
| 10 | + range). | |
| 11 | +2. FIXED by class sweep, latent (decode.rs:8625/8776/8839) -- `decode_block_rect4` (32-level | |
| 12 | + 1:4 strips, also the inter frame's 32x8/8x32 intra reader) published the bands on none of | |
| 13 | + its three exits. This stream carries no such block once frame 33 is correct (the 48/40 | |
| 14 | + counters before the fix were phantoms of the desync). | |
| 15 | + | |
| 16 | +## Current divergence in decode frame 33 | |
| 17 | +NONE. Ladder identical: every superblock ENTRY range of every traced frame equals aomdec's | |
| 18 | +(ours[i] = aomdec[i+1]; our SB-root print skips the last partial SB row, and our group 0 | |
| 19 | +holds frames 0+1). Pixel state: all 37 shown frames of the 58-OBU prefix are byte-exact vs | |
| 20 | +ffmpeg, and all 48 frames of the whole 2 s head cut are byte-exact. | |
| 21 | +Frame 36 differing bytes: 0 (1992768 before r1, 765464 at r1's tip fa20907). | |
| 22 | + | |
| 23 | +## Instrumentation added | |
| 24 | +`EC_TRACE_MODE_STEP` now prints the oracle-format | |
| 25 | +`EC_ISTEP mi_row=.. mi_col=.. name=tx_depth val=.. ctx=.. cat=.. rng=..` in | |
| 26 | +`decode_intra_rect_in_inter` (decode.rs:7541) -- that line named root cause 1 in one run. | |
| 27 | +Counter `decode::rect64_split_txfm_publish_hits()`. | |
| 28 | + | |
| 29 | +## Gate + fixture | |
| 30 | +`crates/ec-av1/fixtures/reelb_arf_witness.obu` (32126 B, sha256 | |
| 31 | +7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37, `git add -f`), | |
| 32 | +gated by `a_10bit_film_hidden_arf_with_split_superblock_strips_decodes_pixel_exact` | |
| 33 | +(stream.rs): every plane of all 37 shown frames vs ffmpeg + hard assert on the counter | |
| 34 | +(4 on this stream). Ran alone: `ok. 1 passed`, 94.77 s. | |
| 35 | +No refusal lifted, so refusal_inventory/gate_coverage are unchanged. | |
| 36 | + | |
| 37 | +## EXACT NEXT STEP | |
| 38 | +1. Full suite (never run this round -- the r2 unit was cancelled at the turn cap): | |
| 39 | + `systemd-run --user --unit=frame36-suite-$(date +%s) -p MemoryMax=10G --same-dir bash -lc | |
| 40 | + 'EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 CARGO_TARGET_DIR=$HOME/.cache/cargo-target-frame36 | |
| 41 | + nice -n 10 cargo test -p ec-av1 --lib -j3 > $HOME/.cache/frame36-suite.log 2>&1'`. | |
| 42 | + Known RED on main beecb64 (not this lane): | |
| 43 | + `real_aomenc_1to4_streams_decode_pixel_exact_and_rect_vartx_leaves_fire_before_a_named_refusal`. | |
| 44 | + 169 tests had passed, 0 failed, when the unit was cancelled. | |
| 45 | +2. Then the next wall: cut a LONGER segment of the same stream (`ffmpeg -ss <t> -t 2 ... -f obu`) | |
| 46 | + and re-run `decode_probe` + `diff16.py`; the 2 s head is now fully exact. | |
| 47 | + | |
| 48 | +## Artifacts (~/.cache/frame36-tmp) | |
| 49 | +`n58.obu`, `r.raw`/`o2.raw` (prefix), `full_r.raw`/`full_o2.raw` (48-frame cut), | |
| 50 | +`r2/omode5.txt` (ours ladder, post-fix), `r2/amode.txt` (aomdec ladder), | |
| 51 | +`r2/split.py` + `r2/sb.py` (frame split / per-SB dump), `probe_r2.log` (post-fix counters). |
lanes/frame36-r2.report.mdadded+74 -0
| @@ -0,0 +1,74 @@ | ||
| 1 | +# lane-frame36 r2 report (branch `lane-frame36`) | |
| 2 | + | |
| 3 | +Tip: `c9e15d7` (r1 tip was `fa20907`). | |
| 4 | + | |
| 5 | +## Root cause found this round (one, entropy-level) | |
| 6 | + | |
| 7 | +`decode_block_rect64`'s `depth != 0` arm returns early, past the tail | |
| 8 | +`txfm_partition_update_rect` that r1 added -- so a SPLIT superblock-level strip | |
| 9 | +(64x16 / 16x64 / 64x32 / 32x64) published NO `TXFM_CONTEXT` band, and the next | |
| 10 | +block read the row's init value 64 as its left transform height. libaom runs | |
| 11 | +`set_txfm_ctxs(mbmi->tx_size, ...)` for every block, with the SPLIT unit's size. | |
| 12 | + | |
| 13 | +Measured (decode-order frame 33, the hidden ARF, of the 58-OBU prefix): the | |
| 14 | +16x64 strip at mi(192,140) reads `tx_depth=1` -> TX_16X32, so libaom's | |
| 15 | +`left_txfm_context[192]` is 32; ours stayed 64, and the 32x64 intra block at | |
| 16 | +mi(192,144) read `tx_size_cat3` row 2 where aomdec reads row 1 -- same value, | |
| 17 | +different range (class `wrong-alphabet-same-value`), desync to the end of the | |
| 18 | +frame. Fix: `crates/ec-av1/src/decode.rs:9594` (one call), plus the counter | |
| 19 | +`rect64_split_txfm_publish_hits` and the oracle-format | |
| 20 | +`EC_ISTEP ... name=tx_depth ... cat=` print in `decode_intra_rect_in_inter` | |
| 21 | +(decode.rs:7541) that named it. | |
| 22 | + | |
| 23 | +## Class sweep (same shape) | |
| 24 | + | |
| 25 | +`decode_block_rect4` (32-level 1:4 strips; also the inter frame's reader for an | |
| 26 | +intra 32x8/8x32) published the bands on NONE of its three exits -- fixed the | |
| 27 | +same way (decode.rs:8625/8776/8839). Latent here: once frame 33 decodes | |
| 28 | +correctly this stream carries no intra 32x8/8x32 at all (the 48/40 counted | |
| 29 | +before the fix were phantoms of the desync, class `counter-from-refused-stream`). | |
| 30 | +The 48-frame decode was re-measured byte-exact WITH the sweep in. | |
| 31 | + | |
| 32 | +## Frame 33 state | |
| 33 | + | |
| 34 | +EXACT. Every superblock ENTRY range of every traced frame of the prefix equals | |
| 35 | +aomdec's (39 groups ours vs 40 aomdec: our SB-root print skips the last partial | |
| 36 | +SB row, and our group 0 holds frames 0+1; the mapping is ours[i] = aomdec[i+1]). | |
| 37 | +No PREFILT16 stage compare was needed -- the pixels are equal. | |
| 38 | + | |
| 39 | +## Film (the 2 s head cut of the 10-bit 3840x1608 stream) | |
| 40 | + | |
| 41 | +`~/.cache/hg-0.obu`, 48 decode-order frames: differing bytes per frame | |
| 42 | +`0,0,0,...,0` (all 48 zero) vs `ffmpeg -pix_fmt yuv420p10le`. The r1 wall | |
| 43 | +(output frame 36, 765464 differing bytes; 1992768 before r1) is CLOSED. | |
| 44 | + | |
| 45 | +## Gate | |
| 46 | + | |
| 47 | +`a_10bit_film_hidden_arf_with_split_superblock_strips_decodes_pixel_exact` | |
| 48 | +(`crates/ec-av1/src/stream.rs`), fixture `crates/ec-av1/fixtures/reelb_arf_witness.obu` | |
| 49 | +(32126 B, sha256 7f3b060da5aa9c537633e760c4af71316237db7692f6ae0d459bd2c2dd867d37, | |
| 50 | +`git add -f`): every plane of all 37 shown frames vs ffmpeg, hard assert | |
| 51 | +`rect64_split_txfm_publish_hits > 0` (4 on this stream). | |
| 52 | +Command: | |
| 53 | +`EC_NOMEMGUARD=1 EC_AV1_REQUIRE_AOMENC=1 CARGO_TARGET_DIR=$HOME/.cache/cargo-target-frame36 cargo test -p ec-av1 --lib a_10bit_film_hidden_arf_with_split_superblock_strips -- --nocapture` | |
| 54 | +Result: `ok. 1 passed`, 94.77 s. | |
| 55 | + | |
| 56 | +## Refusals | |
| 57 | + | |
| 58 | +None lifted this round (the defect was a wrong decode, not a refusal), so | |
| 59 | +`refusal_inventory.rs` is unchanged; `gate_coverage.rs` needs no entry either -- | |
| 60 | +this gate runs a pinned film stream, not an `aomenc` recipe. | |
| 61 | + | |
| 62 | +## EVIDENCE | |
| 63 | + | |
| 64 | +EVIDENCE: ~/.cache/frame36-tmp/r2/{omode5,amode}.txt | ours EC_TRACE_PART+EC_TRACE_MODE+EC_TRACE_MODE_STEP vs aomdec EC_TRACE+EC_TRACE_MODE+EC_TRACE_MODE_STEP+EC_VARTX on the 58-OBU prefix, SB-root range compare per frame | 0 differing superblock entry ranges in every frame (was: first diff at SB(192,160) of frame 33, 38758 vs 39618) | |
| 65 | +EVIDENCE: ~/.cache/frame36-tmp/{o2.raw,r.raw} | decode_probe EC_PROBE_OUT16 vs ffmpeg -pix_fmt yuv420p10le on the 58-OBU prefix, diff16.py 3840x1608 | all 37 output frames 0 differing bytes (frame 36 was 765464) | |
| 66 | +EVIDENCE: ~/.cache/frame36-tmp/{full_o2.raw,full_r.raw} | same, on the whole 48-frame 2 s head cut | all 48 frames 0 differing bytes | |
| 67 | +EVIDENCE: ~/.cache/frame36-tmp/r2/omode4.txt | ours EC_TXCTX at mi(192,144) | above_txfm=64 left_txfm=64 -> ctx 2, aomdec ctx 1: the stale left band | |
| 68 | + | |
| 69 | +## Residue | |
| 70 | + | |
| 71 | +- accepted: our `EC_TRACE_PART` SB-root print skips the last partial SB row | |
| 72 | + (tracing only; pixels of those rows are compared and exact). | |
| 73 | +- deferred(a longer film cut): only the 2 s head is proven; the next wall in the | |
| 74 | + full film is unmeasured -- the census under `lanes/` is the unblocker. |