forge
Explore
Log in

Don't you dare go Hollow

R10 report -- two root causes behind the 128-rect divergence, suite 388/0/35

Browse files at this commit

8a9dc08a33264533b918ddc39bd1c8231be1c597Ahmet Kaan GümüşParent: d1400b2
  • docs
    • r10 report -- two root causes behind the 128-rect divergence, suite 388/0/35
Show full message
docs(sb128c): r10 report -- two root causes behind the 128-rect divergence, suite 388/0/35
lanes/sb128c-r10.report.mdadded+66 -0
@@ -0,0 +1,66 @@
1+# lane-sb128c r10 report
2+
3+Tip `1f6d885` on `lane-sb128c` (from `c24a2ac`). The r9 blocker is closed: two
4+root causes, both in code shared by every block wider or taller than 64.
5+
6+## Root cause 1 -- `tx_size_context_rect` compared against the block side
7+
8+`crates/ec-av1/src/decode.rs:5845` `tx_size_context_rect` tested the above/left
9+neighbour transform sizes against the block's own `bw`/`bh`. libaom's
10+`get_tx_size_context` tests against `max_txsize_rect_lookup[bsize]`, which tops
11+out at TX_64X64: a 64x128 block must compare against 64, not 128. The square
12+path (`read_tx_depth`, decode.rs:11838) already capped with `side.min(64)`
13+(lane-sb128b r1); the rect path never did. Consequence: the right 64x128 half
14+of a 128-root PARTITION_VERT at mi_col 80 read its tx-depth symbol off CDF row
15+0 where libaom uses row 1, decoded depth 0 (TX_64X64) instead of depth 2
16+(TX_16X16), and the tile desynced from that block on.
17+
18+Fix: cap both dimensions at 64 inside the helper (one `min`), so all eight call
19+sites are covered at once.
20+
21+## Root cause 2 -- `Reach::of_tu` ignored the 64x64 "mu" chunk order
22+
23+`crates/ec-av1/src/encode.rs:1252` `Reach::of_tu` used the plain
24+`col_off + tx_w < bw` rule. A block wider than 64 is coded in 64x64 chunks in
25+raster order, so `has_top_right` (reconintra.c) takes `col_off` MODULO the
26+64-wide chunk in its `row_off > 0` branch (with one exception: the unit whose
27+top-right corner is the centre of a 128x128), and `has_bottom_left` grants the
28+left edge of a right-hand chunk what the already-coded left chunk holds.
29+Without it the last unit column of every chunk of a 128x64 intra block
30+predicted from a chunk libaom has not decoded yet -- 375 wrong luma samples in
31+the first such block of a 512x512 key frame, entropy exact.
32+
33+## Evidence
34+
35+EVIDENCE: `$HOME/.cache/sb128c-r10/{aom.trace,our.trace}` | `EC_TRACE_MODE EC_TRACE_COEFF` aomdec vs `EC_TRACE_MODE EC_TRACE_MODE_STEP EC_TRACE_COEFF` decode_probe on `$HOME/.cache/sb128c-r9/noab.obu`, both under `systemd-run --scope -p MemoryMax=6G`, all_zero rng ladder | first divergence at element 151 = the block at mi_row 0 mi_col 80 (bsize 13, 64x128): oracle reads a tx-depth symbol (rng 32968 -> 42504) and codes TX_16X16 units, ours read none and coded TX_64X64. After fix 1 the whole 5370-element ladder is IDENTICAL.
36+
37+EVIDENCE: `$HOME/.cache/sb128c-r10/pred.trace` | `EC_PRED=1 aomdec` on the same stream | the 128x64 block at mi_col 32 has `n_tr=16` for col_off 0/4/8 and `n_tr=0` for col_off 12 at every `row_off > 0` -- exactly the unit column where our recon differed (diff map: 375 samples, all in x 176..191 and 192..255's last column).
38+
39+EVIDENCE: `$HOME/.cache/sb128c-r10/{o.f*,m.f*}` | `EC_AV1_PREFILT_DUMP` both decoders over all five r9 streams (noab, ab45, ab18, abi45, ab55; recipe `$HOME/.cache/sb128c-r9/mk.sh`) | every frame of every stream byte-identical after both fixes (before: 5/5 streams DIFF on every frame, 326839/393216 bytes on noab f0).
40+
41+EVIDENCE: gate `a_real_aomenc_sb128_intra_rect_block_decodes_pixel_exact` arm 47 | `cargo test -p ec-av1 --lib a_real_aomenc_sb128_intra_rect_block_decodes_pixel_exact -- --nocapture` | `arm 47 cq --cq-level=45 512x512 8bit txsearch=1: 5 frames pixel-exact (0 hidden), intra_128x64 +164 intra_64x128 +156 depth[64/32/16] [26, 0, 294]`.
42+
43+EVIDENCE: `$HOME/.cache/reelc-head.obu` | `decode_probe` under `systemd-run --scope -p MemoryMax=6G` after both fixes | `OK: 48 frames decoded, 1920x792`, `sb128_rect: edge_horz=720 inter_128x64=720` -- no refusal, no regression.
44+
45+## Gate arm added
46+
47+`crates/ec-av1/src/stream.rs:19176` -- a 512x512 arm (tag 47) on the sb128
48+intra_rect_block gate: a SECOND 128 superblock column, which no earlier arm had
49+(192x256 / 384x320 / 256x192 all stop at one 128 column), plus the r9 witness's
50+own higher-frequency luma source, because the gate's smooth two-term source
51+gives every 128-rect block a whole-block TX_64X64 and no VERT root -- the exact
52+combination that hid the defect. Counters prove the shape: 156 64x128 blocks,
53+294 units at TX_16X16.
54+
55+## Suite
56+
57+`cargo test -p ec-av1 --lib` (unit `sb128c-suite-r10-1788351731`, after fix 1
58+only): 387 passed, 1 failed, 35 ignored -- the one failure was
59+`a_real_aomenc_sb128_ab_partition_at_the_128_root_decodes_pixel_exact`, which
60+fix 2 closes. Final run: unit `sb128c-suite-r10b-*`, log
61+`$HOME/.cache/sb128c-suite-r10b.log` -- **388 passed, 0 failed, 35 ignored** (475 s), including `a_real_aomenc_sb128_ab_partition_at_the_128_root_decodes_pixel_exact`, `..._intra_rect_block_...` (with the new 512x512 arm), `..._gathered_edge_horz_...` and the r7 inter gate.
62+
63+## Residue
64+
65+- No refusal string was lifted this round; the r9 gate that the AB refusal
66+ lift needs is now green. accepted.