Merge lane-av1sb128fork: the sb128 inter fork is a CDF-ROW error, not var-tx enumeration (report only)
Browse files at this commit1 changed file +370 -0
- lanes/av1sb128fork.report.md +370 -0
lanes/av1sb128fork.report.mdadded+370 -0
| @@ -0,0 +1,370 @@ | ||
| 1 | +# lane-av1sb128fork — the 4:4:4 lossy `--sb-size=128` entropy fork is a `get_tx_size_context` leak, not a var-tx leaf-list difference | |
| 2 | + | |
| 3 | +Base / branch: `8680e31d` (main) → `lane-av1sb128fork`, worktree | |
| 4 | +`~/.cache/wt/av1sb128fork`. **No decode-path change is left on this branch** — | |
| 5 | +`git status --porcelain` in the worktree is empty and the main checkout is | |
| 6 | +empty. The report is the deliverable. Every number below was measured in this | |
| 7 | +worktree on the reverted (clean) tree unless a line says it is quoted. | |
| 8 | + | |
| 9 | +Build: `CARGO_TARGET_DIR=/home/user/.cache/tgt-av1sb128fork` (private). | |
| 10 | +`cargo check -p ec-av1 --all-targets`: clean, 0 warnings. | |
| 11 | +Oracle: `~/.cache/aom-oracle/build/{aomenc,aomdec}` (instrumented), read-only, | |
| 12 | +run with `--threads=1` (the rung order is identical with and without it). | |
| 13 | + | |
| 14 | +--- | |
| 15 | + | |
| 16 | +## 0. Verdict first | |
| 17 | + | |
| 18 | +The fork **reproduces** and is a **CDF-row (context) error on a 2-symbol | |
| 19 | +`tx_size_cdf` read**, not the transform-unit-enumeration difference the ticket | |
| 20 | +hypothesised. Measured, in this order: | |
| 21 | + | |
| 22 | +1. The var-tx trees **agree exactly** in the frame that forks (§3). | |
| 23 | +2. The partition tree **agrees exactly** in the SB that forks (§4). | |
| 24 | +3. The single differing entry is the **tx-size context of the 8x4 intra leaf at | |
| 25 | + mi(57,52)**: `get_tx_size_context` returns **2** in libaom and **1** here, | |
| 26 | + because our `above_inter` mi-band is `true` at that cell with | |
| 27 | + `above_side_mi = 4` while libaom's `is_inter_block(above_mbmi)` is `false` | |
| 28 | + there (§5). | |
| 29 | + | |
| 30 | +So `tx_size_cat0[1]` is read where libaom reads `tx_size_cat0[2]`, and the coder | |
| 31 | +forks on the very next symbol. | |
| 32 | + | |
| 33 | +--- | |
| 34 | + | |
| 35 | +## 1. The witness | |
| 36 | + | |
| 37 | +```text | |
| 38 | +ffmpeg -f lavfi -i "testsrc2=size=256x256:rate=25" -frames:v 2 \ | |
| 39 | + -pix_fmt yuv444p -strict -1 -f yuv4mpegpipe -y src.y4m | |
| 40 | +aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=62 --cpu-used=2 \ | |
| 41 | + --threads=1 --row-mt=0 --lag-in-frames=0 --kf-max-dist=100 \ | |
| 42 | + --sb-size=128 --profile=1 --obu -o t256.obu src.y4m | |
| 43 | +``` | |
| 44 | + | |
| 45 | +| artifact | value | | |
| 46 | +|---|---| | |
| 47 | +| OBU | `t256_n2_cq62.obu`, 6186 B, sha256 `14acb74e825a2bb3ef195a52cc2abc67794d9c4d92080b66c739d318177fc7c6` | | |
| 48 | +| geometry | 256x256, 4:4:4 (`--profile=1`, `subsampling 0/0`), 8-bit, 2 frames, `--sb-size=128` (2x2 superblocks) | | |
| 49 | +| encode | 1.3 s on this box; the idle server was not needed | | |
| 50 | + | |
| 51 | +Pixel impact vs `aomdec` (`EC_AV1_FINAL_DUMP` vs `dump_yuv`, per plane): | |
| 52 | + | |
| 53 | +| frame | Y | U | V | of | | |
| 54 | +|---|---|---|---|---| | |
| 55 | +| 0 (key) | 841 | 1295 | 1372 | 65536 | | |
| 56 | +| 1 (inter) | 56986 | 55974 | 56442 | 65536 | | |
| 57 | + | |
| 58 | +## 2. The lockstep divergence, quoted | |
| 59 | + | |
| 60 | +`EC_SYMR=1` on both sides, aligned on `(value, range, n, s, post_rng)` with the | |
| 61 | +CDF-row convention reconciled (`a == b or 32768 - a == b`; that predicate holds | |
| 62 | +on **every** paired read before the fork, and after it except where the ranges | |
| 63 | +have already separated). Aligner: `~/.cache/sb128fork/align.py`. | |
| 64 | + | |
| 65 | +``` | |
| 66 | +ours 41245 reads | oracle 37229 reads | |
| 67 | +*** FORK at read index 32813 *** | |
| 68 | +[32812] ours pre=(4601,35120,45417) cdf0=2586 n=14 s=12 post_rng=45492 (cdf=uv_mode) | |
| 69 | + aom pre=(4601,35120,45402) cdf0=30182 n=14 s=12 post_rng=45492 (decodemv.c:146, read_intra_mode_uv) | |
| 70 | +<<32813>> ours pre=(7550,45492,45418) cdf0=6424 n=2 s=1 post_rng=36377 | |
| 71 | + aom pre=(7550,45492,45403) cdf0=19938 n=2 s=1 post_rng=55054 (decodeframe.c:1106, read_selected_tx_size) | |
| 72 | +<<32814>> ours pre=(7550,36377,45418) cdf0=6506 n=2 s=1 post_rng=58228 | |
| 73 | + aom pre=(15100,55054,45404) cdf0=26262 n=2 s=1 post_rng=44079 (decodetxb.c:158) | |
| 74 | +``` | |
| 75 | + | |
| 76 | +- Read index **32813** (0-based; file line 32814). **32812** reads agree on | |
| 77 | + `(value, range, n, s, post_rng)` and on the reconciled CDF row. | |
| 78 | +- The two sides hold the **identical pre-state** `pre=(7550, 45492)` and the | |
| 79 | + **identical symbol width** `n=2` and the **identical symbol value** `s=1`. | |
| 80 | + Only the CDF row differs: ours `cdf0=6424` (`32768-6424 = 26384`) vs the | |
| 81 | + oracle's `19938`. `26384 != 19938`, so this is **not** the mirror convention — | |
| 82 | + it is a genuinely different row of the same table. | |
| 83 | +- The bit-position third field differs by the documented constant `+15` | |
| 84 | + (45418 vs 45403), i.e. the coder state is in sync. **This is a context error, | |
| 85 | + not a bit-position error.** | |
| 86 | +- The mi label `(57,52)` is the SYMR block label on both sides. The real block | |
| 87 | + identity is in §5. | |
| 88 | +- `decodeframe.c:1106` is `read_selected_tx_size`: | |
| 89 | + `aom_read_symbol(r, ec_ctx->tx_size_cdf[bsize_to_tx_size_cat(bsize)][get_tx_size_context(xd)], bsize_to_max_depth(bsize)+1)`. | |
| 90 | + `n = max_depths+1 = 2`. | |
| 91 | + | |
| 92 | +**The same signature reproduces on 12 further cells**, all with the *same* oracle | |
| 93 | +site `decodeframe.c:1106` and all `n=2` on both sides (a `WIDTH-MISMATCH`-free | |
| 94 | +table; `hunt4.py`, every row is `same-width`): | |
| 95 | + | |
| 96 | +| cell | reads ours/oracle | fork index | ours `(n,s,cdf0)` | oracle `(n,s,cdf0)` | | |
| 97 | +|---|---|---|---|---| | |
| 98 | +| 256x256 cq54 | 59780 / 53575 | 34496 | (2,1,5938) | (2,1,18898) | | |
| 99 | +| 256x256 cq56 | 49707 / 40068 | 34153 | (2,1,5100) | (2,1,24247) | | |
| 100 | +| 256x256 cq60 | 48400 / 38531 | 33639 | (2,1,5817) | (2,1,24434) | | |
| 101 | +| 256x256 cq62 (2f) | 41245 / 37229 | 32813 | (2,1,6424) | (2,1,19938) | | |
| 102 | +| 256x256 cq62 (4f) | 53195 / 61630 | 32813 | (2,1,6424) | (2,1,19938) | | |
| 103 | +| 320x240 cq36 | 100146 / 56168 | 39272 | (2,1,6025) | (2,1,22369) | | |
| 104 | +| 320x240 cq40 | 60107 / 51406 | 36092 | (2,1,4212) | (2,1,18729) | | |
| 105 | +| 320x240 cq48 | 67609 / 45480 | 33001 | (2,1,7518) | (2,1,23633) | | |
| 106 | +| 320x240 cq52 | 47529 / 43753 | 31700 | (2,1,5996) | (2,1,21916) | | |
| 107 | +| 320x240 cq62 | 54627 / 38560 | 31107 | (2,1,6120) | (2,1,21114) | | |
| 108 | +| 256x384 cq30 | 119234 / 81998 | 51581 | (2,1,2485) | (2,1,21113) | | |
| 109 | +| 256x384 cq36 | 93732 / 71009 | 48493 | (2,1,3446) | (2,1,20649) | | |
| 110 | + | |
| 111 | +Every fork in the class is the **same 2-symbol intra `tx_size_cdf` read with the | |
| 112 | +wrong row**. I did not find a cell in this family where the two sides read | |
| 113 | +*different widths* at the fork, so I could not reproduce the ticket's | |
| 114 | +`oracle n=7 / ours n=6` observation; see §7. | |
| 115 | + | |
| 116 | +**The fork is in frame 0, the KEY frame** (frame 0 spans SYMR reads 0..33894; | |
| 117 | +the boundary is the `bitpos` reset 45488 -> 15 at line 33896). The ticket calls | |
| 118 | +the recorded cell an INTER-frame fork; on every cell I measured the fork is in | |
| 119 | +the key frame of a 2+ frame stream. §7 says what that does and does not decide. | |
| 120 | + | |
| 121 | +--- | |
| 122 | + | |
| 123 | +## 3. Measurement (1) — the var-tx leaf-list diff, and why the hypothesis dies | |
| 124 | + | |
| 125 | +The ticket ranked "diff both sides' var-tx leaf lists for the SB containing | |
| 126 | +mi(56,48)" first. I mirrored the oracle's `EC_VARTX` rung | |
| 127 | +(`read_tx_size_vartx`, `decodeframe.c:1060`) inside our `read_var_tx_size` and | |
| 128 | +added a per-block leaf-list dump at the tail of `read_block_tx_size`'s inter | |
| 129 | +branch (both temporary, both reverted). Then: | |
| 130 | + | |
| 131 | +**Whole-stream split-read counts: ours 89, oracle 12.** That looks like the | |
| 132 | +ticket's "548 vs 1314" shape — and it is entirely an artefact. | |
| 133 | + | |
| 134 | +**In frame 0, the frame that forks, there is exactly ONE `txfm_partition` split | |
| 135 | +symbol on each side, and the two are the same read:** | |
| 136 | + | |
| 137 | +| side | line | | |
| 138 | +|---|---| | |
| 139 | +| oracle | `EC_VARTX mi=(56,52) row=0 col=0 ctx=19 n=2 s=0 bitpos=45312` | | |
| 140 | +| ours | `EC_VARTX mi=(56,52) row=0 col=0 ctx=19 n=2 s=0 bitpos=45326 rng=48008` | | |
| 141 | + | |
| 142 | +Same mi, same `ctx=19`, same value `s=0`, `bitpos` differing by the same +14 as | |
| 143 | +every other paired read. **The var-tx trees in the forking frame are identical, | |
| 144 | +so there is no missing/extra var-tx leaf and no leaf whose size differs.** The | |
| 145 | +89-vs-12 gap is 88 reads in frame 1, which is *downstream* of the fork: once the | |
| 146 | +coder desyncs, every later partition/split read is garbage. The ticket's | |
| 147 | +"structural difference in transform-unit enumeration" is a **consequence** of | |
| 148 | +the fork, measured on the wrong side of it. | |
| 149 | + | |
| 150 | +For completeness, the one block on that side whose leaf list is a list of more | |
| 151 | +than one leaf (our per-block dump, frame 0 has no multi-leaf var-tx block; this | |
| 152 | +is frame 1's 128 root, quoted only to show the dump works and is post-fork): | |
| 153 | + | |
| 154 | +``` | |
| 155 | +EC_VLEAFLIST mi=(0,32) side=128 max_tx=64 | |
| 156 | + leaves=[(0,0,64,64), (0,16,64,64), (16,0,16,16), (16,4,16,16), (20,0,16,16), | |
| 157 | + (20,4,16,16), (16,8,32,32), (24,0,32,32), (24,8,32,32), (16,16,64,64)] | |
| 158 | +``` | |
| 159 | + | |
| 160 | +with the matching split reads | |
| 161 | + | |
| 162 | +``` | |
| 163 | +EC_VARTX mi=(0,32) row=0 col=0 ctx=1 s=0 | |
| 164 | +EC_VARTX mi=(0,48) row=0 col=16 ctx=0 s=0 | |
| 165 | +EC_VARTX mi=(16,32) row=16 col=0 ctx=1 s=1 | |
| 166 | +EC_VARTX mi=(16,32) row=16 col=0 ctx=4 s=1 | |
| 167 | +EC_VARTX mi=(16,40) row=16 col=8 ctx=4 s=0 | |
| 168 | +EC_VARTX mi=(24,32) row=24 col=0 ctx=5 s=0 | |
| 169 | +EC_VARTX mi=(24,40) row=24 col=8 ctx=3 s=0 | |
| 170 | +EC_VARTX mi=(16,48) row=16 col=16 ctx=1 s=0 | |
| 171 | +``` | |
| 172 | + | |
| 173 | +Post-fork, so **not** evidence for anything; recorded only so the next reader | |
| 174 | +does not re-derive it. | |
| 175 | + | |
| 176 | +--- | |
| 177 | + | |
| 178 | +## 4. Measurement (2) — the `EC_PART` trees for SB(1,1), frame 0 | |
| 179 | + | |
| 180 | +The oracle's `EC_PART`/`EC_PART_VAL` and our twin, filtered to mi rows/cols | |
| 181 | +`32..63` (SB row 1, col 1) and frame 0. **Every paired read agrees on | |
| 182 | +`(mi, bsize, value)`; the only mismatch is the first read after the fork.** | |
| 183 | + | |
| 184 | +| # | oracle | ours | | |
| 185 | +|---|---|---| | |
| 186 | +| 1 | `mi=48,48 bsize=12 ctx=15 value=3` | `mi=48,48 bsize=12 ctx=3 value=3` ✓ | | |
| 187 | +| 2 | `mi=48,48 bsize=9 ctx=11 value=3` | `mi=48,48 bsize=9 ctx=3 value=3` ✓ | | |
| 188 | +| 3 | `mi=48,48 bsize=6 ctx=4 value=0` | `value=0` ✓ | | |
| 189 | +| 4 | `mi=48,52 bsize=6 ctx=5 value=9` | `value=9` ✓ | | |
| 190 | +| 5 | `mi=52,48 bsize=6 ctx=4 value=0` | `value=0` ✓ | | |
| 191 | +| 6 | `mi=52,52 bsize=6 ctx=5 value=9` | `value=9` ✓ | | |
| 192 | +| 7 | `mi=48,56 bsize=9 ctx=11 value=6` | `mi=48,56 bsize=9 ctx=3 value=6` ✓ | | |
| 193 | +| 8 | `mi=56,48 bsize=9 ctx=11 value=3` | `mi=56,48 bsize=9 ctx=3 value=3` ✓ | | |
| 194 | +| 9 | `mi=56,48 bsize=6 ctx=4 value=0` | `value=0` ✓ | | |
| 195 | +| 10 | `mi=56,52 bsize=6 ctx=5 value=3` | `value=3` ✓ | | |
| 196 | +| 11 | `mi=56,52 bsize=3 ctx=1 value=1` | `mi=56,52 bsize=3 ctx=1 value=1` ✓ | | |
| 197 | +| **12** | `mi=56,54 bsize=3 ctx=3 value=2` | `mi=56,54 bsize=3 ctx=3 value=0` ✗ | | |
| 198 | + | |
| 199 | +Row 12 is the first value divergence and it sits **after** the fork read | |
| 200 | +(oracle `tell=45410`, ours `tell=45442`; the fork is at 45403/45418) — i.e. it is | |
| 201 | +damage, not cause. The `ctx` numbers are not comparable across sides because our | |
| 202 | +`Cdfs` keeps one `partition_cdf` array per size group (`partition_w64/w32/w16/w8`) | |
| 203 | +while libaom keeps one flat `partition_cdf[20]`; adding `4*bsl` | |
| 204 | +(`PARTITION_PLOFFSET`) to ours reproduces the oracle's ctx on **all 11** agreed | |
| 205 | +rows, so the partition context is right too. | |
| 206 | + | |
| 207 | +**One caveat I am recording rather than fixing:** our `EC_PART` rung misprints | |
| 208 | +`mi` on one of its four arms. Rows 3-6 and 9-10 print `mi_row=12/13/14, | |
| 209 | +mi_col=12/13` where the block is at `mi=48/52/56, mi_col=48/52` — the printed | |
| 210 | +value is the 16-px-unit index (`mi/4`) on that arm only. The `value=`, `rng=` | |
| 211 | +and read ORDER are correct, which is why the pairing above still holds. That is a | |
| 212 | +diagnostic-rung defect in `decode.rs`'s `EC_PART` arms, not a decode defect, and | |
| 213 | +it is **not** this lane's fix. | |
| 214 | + | |
| 215 | +--- | |
| 216 | + | |
| 217 | +## 5. The actual differing entry: the tx-size context of the 8x4 leaf at mi(57,52) | |
| 218 | + | |
| 219 | +The oracle's `EC_TXCTXB` rung (`get_tx_size_context`, `pred_common.h:348`) and | |
| 220 | +our `EC_TXCTX` (`tx_size_context_txfm_rect`, `decode.rs:28114`) line up | |
| 221 | +**row for row** from index 0 to the fork — 300+ rows, `own`/`maxw`, `abv`/ | |
| 222 | +`above_txfm`, `lft`/`left_txfm`, `above`, `left` and `ctx` all equal. The first | |
| 223 | +divergence is the fork: | |
| 224 | + | |
| 225 | +``` | |
| 226 | +oracle EC_TXCTXB mi=57,52 bsize=2 maxw=8 maxh=4 hasup=1 hasleft=1 \ | |
| 227 | + abv=8 lft=8 above=1 left=1 ctx=2 | |
| 228 | +ours EC_TXCTX mi=57,52 own=8x4 ha=true hl=true intra_only=true \ | |
| 229 | + above_txfm=8 left_txfm=8 above_inter=true left_inter=false \ | |
| 230 | + above_side=4 left_side=16 above=false left=true | |
| 231 | +``` | |
| 232 | + | |
| 233 | +- Same block: `bsize=2` is libaom's `BLOCK_8X4`; our own block is `8x4`. | |
| 234 | +- Same bands: `abv=8` == `above_txfm=8`, `lft=8` == `left_txfm=8`. | |
| 235 | +- The only difference is `above_inter`: **we have `true`, and `above_side=4`.** | |
| 236 | + Our override fires and gives `above = (4 >= 8) = 0`; libaom's | |
| 237 | + `is_inter_block(above_mbmi)` is **false** at that cell, so it keeps | |
| 238 | + `above = (above_txfm_context[0] >= 8) = 1`. | |
| 239 | +- Hence `ctx = 0+1 = 1` (ours) vs `1+1 = 2` (libaom), and the read is | |
| 240 | + `cdfs.tx_size_cat0[1]` where libaom reads `tx_size_cdf[...][2]`. | |
| 241 | + | |
| 242 | +I confirmed the table identity on our side rather than inferring it: a temporary | |
| 243 | +`ptr={:p}` on the `EC_SYMR` line plus a one-shot dump of the four | |
| 244 | +`tx_size_cat*` base addresses gives, at the fork read, | |
| 245 | +`ptr=0x…41be` against `tx_size_cat0[0]=0x…41b8` — **row 1 of `tx_size_cat0`**, | |
| 246 | +a 3-entry (2-symbol) row, exactly the `n=2` the oracle shows. The | |
| 247 | +instrumentation is reverted. | |
| 248 | + | |
| 249 | +The next row also differs, and it is the block-shape half of the same story: | |
| 250 | + | |
| 251 | +``` | |
| 252 | +oracle EC_TXCTXB mi=56,54 bsize=1 maxw=4 maxh=8 abv=4 lft=4 above=1 left=0 ctx=1 | |
| 253 | +ours EC_TXCTX mi=56,54 own=8 above_txfm=4 left_txfm=4 above_inter=false \ | |
| 254 | + left_inter=true above_side=4 left_side=4 above=false left=false | |
| 255 | +``` | |
| 256 | + | |
| 257 | +We resolve an 8x8 block there where libaom has `BLOCK_4X8`; that row is | |
| 258 | +post-fork (`left=0` still agrees, so it is not the cause). | |
| 259 | + | |
| 260 | +## 6. The rule, with the libaom cite | |
| 261 | + | |
| 262 | +`get_tx_size_context` — `av1/common/pred_common.h:348-380`: | |
| 263 | + | |
| 264 | +```c | |
| 265 | +const TX_SIZE max_tx_size = max_txsize_rect_lookup[mbmi->bsize]; | |
| 266 | +const int max_tx_wide = tx_size_wide[max_tx_size]; | |
| 267 | +const int max_tx_high = tx_size_high[max_tx_size]; | |
| 268 | +int above = xd->above_txfm_context[0] >= max_tx_wide; | |
| 269 | +int left = xd->left_txfm_context[0] >= max_tx_high; | |
| 270 | +if (has_above) if (is_inter_block(above_mbmi)) above = block_size_wide[above_mbmi->bsize] >= max_tx_wide; | |
| 271 | +if (has_left) if (is_inter_block(left_mbmi)) left = block_size_high[left_mbmi->bsize] >= max_tx_high; | |
| 272 | +return (has_above && has_left) ? (above + left) : (has_above ? above : (has_left ? left : 0)); | |
| 273 | +``` | |
| 274 | + | |
| 275 | +The override is gated on `is_inter_block(xd->above_mbmi)` — a property of **the | |
| 276 | +one `MB_MODE_INFO` at `xd->mi[-mi_stride]`**, i.e. of the block whose bottom | |
| 277 | +edge abuts this block's top edge at this column. `is_inter_block` | |
| 278 | +(`blockd.h:373`) is `is_intrabc_block(mbmi) || ref_frame[0] > INTRA_FRAME`. | |
| 279 | + | |
| 280 | +Our `tx_size_context_txfm_rect` (`decode.rs:28114-28164`) reads the same four | |
| 281 | +bands, but `above_inter` / `left_inter` are **mi-granular bands that any intrabc | |
| 282 | +block stamps `true` for its own column span** (`record_intrabc_mi_rect`, | |
| 283 | +`decode.rs:4905-4925`: `for i in 0..n4_w { above_inter[mi_c + i] = true }`), | |
| 284 | +and cleared to `false` only by `Neighbours::fill_lf_grid_rect`'s intra-only | |
| 285 | +stamp (`decode.rs:9384-9418`). So the value at a cell is whatever the **last | |
| 286 | +block touching that column** left, not "is the block immediately above inter". | |
| 287 | +At mi row 56, col 52 that value is `true` with `above_side_mi = 4`; libaom's | |
| 288 | +`above_mbmi` there is intra. | |
| 289 | + | |
| 290 | +This is the class the crate's own doc comments already name twice, on | |
| 291 | +neighbouring code: `tx_size_context_txfm_rect`'s header ("an *inter* neighbour | |
| 292 | +contributes its own BLOCK size rather than its transform size … which is what the | |
| 293 | +`above_inter`/`left_inter` bands carry") and `lane-intrasplit r3` at | |
| 294 | +`decode.rs:28166-28171` ("`above_inter`/`left_inter` are mi-granular bands … | |
| 295 | +the inter-neighbour override fired on the wrong neighbour"). The current instance | |
| 296 | +is the **stale-band** half of that, not the granularity half. | |
| 297 | + | |
| 298 | +## 7. What I could NOT decide, and the one measurement that would | |
| 299 | + | |
| 300 | +- **I did not reproduce the ticket's exact cell.** I never found a cell whose | |
| 301 | + fork is `oracle n=7 / ours n=6` (the ticket's `n=7` is an `eob_flag_cdf64` | |
| 302 | + width and `n=6` an `eob_flag_cdf32` width, which *would* be a 64-wide vs | |
| 303 | + 32-wide transform-unit difference). Twelve cells in the same family all fork | |
| 304 | + `same-width` on the intra `tx_size_cdf` read instead. So the ticket's claim | |
| 305 | + "our width-7 read is not a tx_type read, the walk is at a DIFFERENT UNIT" is | |
| 306 | + **not** what I measured: on every cell I measured the two sides are at the | |
| 307 | + **same** block reading the **same** 2-symbol table, and the only difference is | |
| 308 | + the row. If the ticket's cell is a different defect, this report does not | |
| 309 | + cover it; if it is the same class on a different geometry, the fix below | |
| 310 | + covers it. | |
| 311 | +- **The ticket says INTER frame; every fork I measured is in the KEY frame.** | |
| 312 | + Frame 1's partition/var-tx divergence on this cell is entirely post-fork | |
| 313 | + damage. I could not separate "the recorded cell's stream had a different frame | |
| 314 | + layout so the fork landed in an inter frame" from "the recorded cell is a | |
| 315 | + different defect". | |
| 316 | +- **Not decided: which write leaves `above_inter[52] = true` at mi row 56.** The | |
| 317 | + two candidates are (a) an intrabc block earlier in column 52 stamped `true` | |
| 318 | + and the block that owns mi(56,52) did not clear it, and (b) the block owning | |
| 319 | + mi(56,52) is a sub-8 leaf whose `fill_lf_grid_rect` span does not cover | |
| 320 | + col 52. I did not add that instrumentation. | |
| 321 | +- **No fix is shipped.** A fix here is a change to when the mi-granular | |
| 322 | + `above_inter`/`left_inter` bands are cleared/stamped, which is the | |
| 323 | + `lane-intrasplit r3` / `lane-t900 r1` territory, and I could not measure a | |
| 324 | + red-before for it or re-quote the neighbour gates inside this lane. The | |
| 325 | + narrowing above is what I stand behind. | |
| 326 | + | |
| 327 | +**The deciding measurement** (one flag, one cell): print, at the fork read only, | |
| 328 | +(a) our `above_inter[mi_c]`, `above_side_mi[mi_c]` and the `(mi_r, mi_c, bw, bh, | |
| 329 | +is_intrabc, ref_frame[0])` of every block that stamps column 52 between the last | |
| 330 | +`above_inter[52] = false` and this read, and (b) from the oracle the | |
| 331 | +`above_mbmi->bsize`, `use_intrabc` and `ref_frame[0]` of the block at | |
| 332 | +`xd->mi[-mi_stride]` for mi(57,52). If (b) says intra and (a) names a stale | |
| 333 | +intrabc stamp, the fix is "clear `above_inter`/`left_inter` over the block's own | |
| 334 | +column/row span at every block, not only in the intra-only path, and stamp | |
| 335 | +`above_side_mi` with the abutting block's own `block_size_wide/high`"; if (b) | |
| 336 | +says intrabc, the fix is the `above_side_mi` value (4 is not a legal | |
| 337 | +`block_size_wide` for an intrabc block, whose minimum is `BLOCK_8X8`). | |
| 338 | + | |
| 339 | +--- | |
| 340 | + | |
| 341 | +## 8. Files and hygiene | |
| 342 | + | |
| 343 | +- Branch diff vs `8680e31d`: **this report only**. | |
| 344 | +- Temporary instrumentation added and then fully reverted (`git checkout -- | |
| 345 | + crates/ec-av1/src/decode.rs crates/ec-av1/src/msac.rs`): the `EC_VARTX` | |
| 346 | + mirror + `EC_VLEAF`/`EC_VLEAFLIST` dumps in `read_var_tx_size` / | |
| 347 | + `read_block_tx_size`, the `EC_TXSITE`/`EC_TXSITE_RECT`/`EC_TXCATPTRS` dumps at | |
| 348 | + four `tx_size_cat*` read sites, and the `ptr={:p}` field on the `EC_SYMR` | |
| 349 | + line. `git status --porcelain` is empty in the worktree **and** in the main | |
| 350 | + checkout; `cargo check -p ec-av1 --all-targets` is clean afterwards. | |
| 351 | +- Throwaway scripts and dumps, outside the repo: `~/.cache/sb128fork/` | |
| 352 | + (`align.py`, `hunt.sh`, `hunt2.py`, `hunt3.py`, `hunt4.py`, `txctx_align.py`, | |
| 353 | + `part_align.py`, the `*.aom.txt` / `*.our.txt` / `*_vartx*.txt` / | |
| 354 | + `*_txctx.txt` / `*_part.txt` traces, and the encodes). | |
| 355 | +- No committed fixture, no committed gate: the class is diagnosed, not fixed, and | |
| 356 | + §7 is explicit about what is still undecided. | |
| 357 | + | |
| 358 | +## 9. Coordination | |
| 359 | + | |
| 360 | +Declared to `Agent15-4` (lane-av1sb128chroma) before any edit: I touch only the | |
| 361 | +luma/var-tx/tx-size-context path; the chroma unit loops, `av1_get_max_uv_txsize` | |
| 362 | +and the 4:4:4 chroma shape code are theirs. Agent15-4 confirmed no collision | |
| 363 | +(its decode.rs diff is empty, its whole diff is one test + two fixtures + a | |
| 364 | +report). Its `444_sb128cq20_tsrc2_control.obu` is 128x96 — one superblock row, | |
| 365 | +so it cannot reach an SB at mi row 32+; that is why I re-encoded at 256x256 | |
| 366 | +here. It also flagged `lanes/av1txsizeaudit.report.md` and | |
| 367 | +`lanes/av1f9singleland.report.md`; I read the latter (§0 of this report is | |
| 368 | +consistent with its verdict that the recorded 4:4:4 divergences were already | |
| 369 | +closed by H1) and grepped the former for this class — its per-line verdicts do | |
| 370 | +not cover the 4x8/8x4 intra leaf's `above_inter` band. |