Gate B split-tx-8x4 arm keeps its unproven note, with a re-measured reason
Browse files at this commit950504ee0f65f2243f4848b58da6084366bf4f66Parent: 3032341- test
- gate B split-tx-8x4 arm keeps its unproven note, with a re-measured reason
2 changed files +108 -7
- crates/ec-av1/src/stream.rs +16 -7
- lanes/vartxsplit-r2.report.md +92 -0
crates/ec-av1/src/stream.rsmodified+16 -7
| @@ -11067,13 +11067,22 @@ mod tests { | ||
| 11067 | 11067 | // this shape ever makes aomenc split a 16x4/4x16 strip's transform -- |
| 11068 | 11068 | // an aomdec EC_TRACE_COEFF histogram of those streams carries whole |
| 11069 | 11069 | // TX_16X4/TX_4X16 units and no sub-transform. The one recipe that DOES |
| 11070 | - // split it (384x256, `128+90*sin((X+N*3)/6)*sin(Y/2)+50*sin((X*Y)/37)`, | |
| 11071 | - // cq 10, --min-partition-size=8 --max-partition-size=64 | |
| 11072 | - // --enable-tx-size-search=1) fires 6 of these leaves and then | |
| 11073 | - // MISMATCHES ffmpeg at decode-order frame 2 -- an open DECODE defect | |
| 11074 | - // handed off, not something to hide inside a passing gate. So the arm | |
| 11075 | - // is reported as unproven here instead of asserted on a stream nobody | |
| 11076 | - // has decoded exactly. | |
| 11070 | + // split it (384x256 product texture, cq 10, --min-partition-size=8) | |
| 11071 | + // was RE-MEASURED by lane-vartxsplit r2 on the merged tree: that | |
| 11072 | + // stream now decodes PIXEL-EXACT on all six frames and fires ZERO | |
| 11073 | + // rectangular var-tx leaves of any size -- the "6 split-tx 8x4 leaves" | |
| 11074 | + // were counted out of an already-desynced decode (the desync is what | |
| 11075 | + // lane-sub8x4 fixed). r2 also swept THIS gate's own source family at | |
| 11076 | + // cq 46/56/63 (12 streams, both orientations, both motion steps, | |
| 11077 | + // --min-partition-size=4 --enable-tx-size-search=1): zero | |
| 11078 | + // TX_16X4/TX_4X16 split symbols in aomdec's EC_VARTX histogram, all 12 | |
| 11079 | + // pixel-exact. What does split a 16x4/4x16 transform is the product | |
| 11080 | + // texture at --min-partition-size=4 (140 + 238 splits at cq 44), and | |
| 11081 | + // every such stream either stops at a refusal our own desync raises or | |
| 11082 | + // mismatches ffmpeg from decode-order frame 1 -- an open defect handed | |
| 11083 | + // off in lanes/vartxsplit-r2.report.md. So the arm stays | |
| 11084 | + // reported-unproven instead of asserted on a stream nobody has decoded | |
| 11085 | + // exactly. | |
| 11077 | 11086 | eprintln!( |
| 11078 | 11087 | "{NAME}: split-tx-8x4 arm unproven (arms {arms_total:?}) -- no recipe of this \ |
| 11079 | 11088 | sweep produces a split 16x4/4x16 transform; see lanes/gaterecipe-r1.report.md" |
lanes/vartxsplit-r2.report.mdadded+92 -0
| @@ -0,0 +1,92 @@ | ||
| 1 | +# lane-vartxsplit r2 — the 10-bit case was stale; the gate's firing recipe was vacuous | |
| 2 | + | |
| 3 | +Branch `lane-vartxsplit`, merged with main (beecb64) at `335ccdc` (the r1 compound-8x8 | |
| 4 | +`saved_luma_ctx` fix landed independently on main via lane-sub8x4; the merge kept main's | |
| 5 | +copy — same semantics, same call site). | |
| 6 | + | |
| 7 | +## (1) The 10-bit 16x32 case (gaterecipe recipe 2) — VERDICT: already fixed by the merge | |
| 8 | + | |
| 9 | +Streams (each hashed twice, identical): `~/.cache/vartxsplit-tmp/s10.obu` | |
| 10 | +md5 `99980afd5945c61621d38c4e5c104db9`, transposed twin `s10v.obu` | |
| 11 | +md5 `93890af7b420886beb5394bf30f6f805` (384x256, 6 frames @25, yuv420p10le, cq 10, | |
| 12 | +gate A's flag set, `--min-partition-size=8 --max-partition-size=64`, generator | |
| 13 | +`~/.cache/vartxsplit-tmp/gen10.sh` / `gen10v.sh`). | |
| 14 | + | |
| 15 | +- At `cba81e6` (pre-merge): `s10` differed from ffmpeg at decode-order frames 4-5, | |
| 16 | + `s10v` at frames 2-5. | |
| 17 | +- At `335ccdc` (post-merge): **all six frames of both streams are byte-identical to | |
| 18 | + `ffmpeg -pix_fmt yuv420p10le`, Y/U/V** — no new fix was needed. The premise expired | |
| 19 | + with lane-sub8x4 (class stale-premise-lanes). | |
| 20 | +- The recipe also carries **no 16x32 var-tx leaf at all**: aomdec's `EC_VARTX` histogram | |
| 21 | + of both streams reads only tx_size 1/2/7/8 split symbols — zero `TX_16X64`/`TX_64X16` | |
| 22 | + (and zero `TX_8X32`/`TX_32X8`). The "46 16x32 leaves" gaterecipe r1 recorded were | |
| 23 | + counted inside an already-desynced decode. | |
| 24 | + | |
| 25 | +EVIDENCE: ~/.cache/vartxsplit-tmp/s10.obu + s10v.obu | aomenc (twice, equal md5) -> dump_yuv -> ffmpeg yuv420p10le rawvideo compare, 6 frames x 3 planes | 12/12 frames byte-identical, oracle EC_VARTX 16x32/32x16 split symbols = 0 | |
| 26 | + | |
| 27 | +Same-shape sweep asked for in the charter (`record_mi` with a placeholder grid after a | |
| 28 | +split): `grep -n "saved_luma_ctx"` in decode.rs shows both 8x8 leaf arms (single-ref | |
| 29 | +`decode_leaf8` and the compound arm) now save/restore, and they are the only | |
| 30 | +`record_mi(..., 8, ...)` call sites that follow a `split8` transform; the rect strip and | |
| 31 | +sub8 rect2/split4 arms publish their own per-TU state and never rewrite a placeholder | |
| 32 | +grid over it. | |
| 33 | + | |
| 34 | +## (2) Gate A — `real_aomenc_1to4_streams_..._rect_vartx_leaves_fire_before_a_named_refusal` | |
| 35 | + | |
| 36 | +RED on the merged tree with "leaves decoded anywhere 32x16=0 16x32=0". Root cause is the | |
| 37 | +RECIPE, not a counter placement: the firing attempts' cq-10 stream contains **no | |
| 38 | +rectangular sub-transform** (oracle `EC_VARTX`, above), so the counter is right and the | |
| 39 | +old 21/15 reading came from a desynced decode (class counter-from-refused-stream, second | |
| 40 | +instance in this gate). | |
| 41 | + | |
| 42 | +Re-measured (`~/.cache/vartxsplit-tmp/sweep2.sh`, `sweep3.sh`, ~40 aomenc runs; oracle | |
| 43 | +histogram of tx_size 15/16/17/18 with val=1): the same product texture at **cq 44 and 46** | |
| 44 | +is what splits a rectangular transform — `TX_32X8`/`TX_8X32` splits giving **16x8 and 8x16 | |
| 45 | +rect var-tx leaves**, both orientations out of one stream — and both streams decode | |
| 46 | +pixel-exact. So attempts 16/17 now run cq 44 / cq 46 on the horizontal source, and the | |
| 47 | +firing assert was **strengthened**: it asserts the PIXEL-COMPARED tally | |
| 48 | +(`leaf_32x16 > 0 && leaf_16x32 > 0`), not "decoded anywhere". | |
| 49 | + | |
| 50 | +EVIDENCE: ~/.cache/vartxsplit-tmp/p_44.obu, p_46.obu | aomenc -> EC_VARTXLEAF decode -> ffmpeg yuv420p compare | ours 3x 16x8 + 1x 8x16 leaves each, 6/6 frames exact (oracle: tx15/1=1 tx16/1=3 at cq 44) | |
| 51 | + | |
| 52 | +## (3) Gate B — the split-tx-8x4 arm stays reported-unproven (DEVIATION from the charter) | |
| 53 | + | |
| 54 | +The charter asked for a hard assert. It cannot be honest today, and this is measured, not | |
| 55 | +assumed: | |
| 56 | +- gate B's own source family never splits a 16x4/4x16 transform at ANY quantiser: 12 fresh | |
| 57 | + streams (both orientations, both motion steps, cq 46/56/63, `--min-partition-size=4 | |
| 58 | + --max-partition-size=16 --enable-tx-size-search=1`) carry **zero** TX_16X4/TX_4X16 split | |
| 59 | + symbols in aomdec's `EC_VARTX` histogram, and all 12 decode pixel-exact; | |
| 60 | +- the recipe gaterecipe r1 credited with 6 split-tx 8x4 leaves (`s8.obu`, md5 | |
| 61 | + `842355ef494455ead0352f62f84f2c56`) now decodes **pixel-exact on all six frames with | |
| 62 | + ZERO rect var-tx leaves** — those 6 were read out of the desync lane-sub8x4 fixed; | |
| 63 | +- the product texture at `--min-partition-size=4` DOES split it heavily (140 TX_16X4 + | |
| 64 | + 238 TX_4X16 at cq 44), but every one of those streams either raises a refusal our own | |
| 65 | + desync produces ("an OBMC neighbour whose switchable interp filter…", "a Golomb tail | |
| 66 | + longer than this decoder reads" — both with `--enable-obmc=0 --enable-dual-filter=0` on | |
| 67 | + the command line, i.e. class refusal-from-own-desync) or mismatches ffmpeg from | |
| 68 | + decode-order frame 1. | |
| 69 | + | |
| 70 | +EVIDENCE: ~/.cache/vartxsplit-tmp/sweep5.sh + sweep6.sh logs | 24 aomenc streams -> aomdec EC_VARTX histogram + our decode + ffmpeg compare | gate-B family 12/12 exact with 0 TX_16X4 splits; product-texture min-part-4 family 0/12 exact | |
| 71 | + | |
| 72 | +The gate's comment now carries this measurement instead of gaterecipe's stale one. | |
| 73 | + | |
| 74 | +## (4) Open defect handed off (not mine to close this round) | |
| 75 | + | |
| 76 | +384x256 product texture, `--min-partition-size=8 --max-partition-size=64`, transposed | |
| 77 | +source at cq 56 (`pv_56.obu`) — 8-bit, mismatches ffmpeg from decode-order frame 2 with | |
| 78 | +ZERO rect var-tx leaves. Triaged: | |
| 79 | +- **entropy is EXACT**: the deduped msac range sequence of frames 0-2 vs instrumented | |
| 80 | + aomdec has 243696 insertions (our extra `br` prints after `base_eob`) and **0 deletions** | |
| 81 | + — we read exactly the symbols the reference wrote. It is a RECONSTRUCTION defect. | |
| 82 | +- shape: luma columns **8..15** (one 8-pixel-wide strip), rows 124..224, 241 samples, | |
| 83 | + delta -17..+2, plus one 8x4 chroma unit at (108,88) in both U and V, delta -16. | |
| 84 | +The 10-bit twins behave the same way (`t10_46`, `t10v_48`, `t10v_52`: mismatch with zero | |
| 85 | +rect leaves; `t10v_40` fires 2+2 leaves and mismatches only on frame 5). This is why no | |
| 86 | +10-bit firing arm was added to gate A — deferred(the 8-wide-strip reconstruction defect | |
| 87 | +above), it would make the gate's own `oos_mismatch` assert red. | |
| 88 | + | |
| 89 | +## Instrumentation added | |
| 90 | +`EC_VARTXLEAF=1` (decode.rs `vartx_rect_leaf_hit`): prints `tw=`/`th=` per rectangular | |
| 91 | +var-tx leaf — this is what separated "our counter moved" from "the recipe never coded the | |
| 92 | +shape" in one run. |