conjunct + off-tile refutation: PARTIAL -- every decoder claim reproduced; three figures corrected, one of them patch-introduced in code
Browse files at this commitd626fa6bdd3f98dba4a13a5095b11ca39e27c3edParent: 44a4ba03 changed files +52 -2
- crates/ec-av1/src/decode.rs +18 -1
- crates/ec-av1/src/stream.rs +5 -1
- lanes/av1mixllconj.report.md +29 -0
crates/ec-av1/src/decode.rsmodified+18 -1
| @@ -34770,6 +34770,14 @@ thread_local! { | |||
| 34770 | /// lossless frame codes no `tx_size_cat1` symbol there. Zero on any frame | 34770 | /// lossless frame codes no `tx_size_cat1` symbol there. Zero on any frame |
| 34771 | /// whose sub-8 leaves all sit in lossy segments, so a gate cannot look | 34771 | /// whose sub-8 leaves all sit in lossy segments, so a gate cannot look |
| 34772 | /// armed by merely decoding. | 34772 | /// armed by merely decoding. |
| 34773 | + /// | ||
| 34774 | + /// CORRECTED 2026-09-30 by the refutation pass (`lanes/refute-av1mixllconj`): | ||
| 34775 | + /// the hit was UNCONDITIONAL inside the else-if, which also serves leaves | ||
| 34776 | + /// whose `tx_select_inter` is off -- the pass measured **33 hits on a build | ||
| 34777 | + /// with the conjunct REMOVED**, i.e. it was counting a population the | ||
| 34778 | + /// conjunct does not touch. It is now guarded on `tx_select_inter`, the same | ||
| 34779 | + /// term the conjunct uses, so a hit means the suppression is the conjunct's | ||
| 34780 | + /// doing. | ||
| 34773 | pub(crate) static SUB8_LOSSLESS_NO_VARTX: std::cell::Cell<usize> = const { std::cell::Cell::new(0) }; | 34781 | pub(crate) static SUB8_LOSSLESS_NO_VARTX: std::cell::Cell<usize> = const { std::cell::Cell::new(0) }; |
| 34774 | } | 34782 | } |
| 34775 | 34783 | ||
| @@ -48437,7 +48445,16 @@ fn decode_inter_sub8_rect2( | |||
| 48437 | &mut leaves, | 48445 | &mut leaves, |
| 48438 | ); | 48446 | ); |
| 48439 | } else if lossless(fctx) && !skip { | 48447 | } else if lossless(fctx) && !skip { |
| 48440 | - hit!(SUB8_LOSSLESS_NO_VARTX); | 48448 | + // COUNTED ONLY WHEN THE SUPPRESSION IS THE CONJUNCT'S WORKING: the |
| 48449 | + // else-if also fires for a leaf whose `tx_select_inter` is off, | ||
| 48450 | + // where the tree would not have run either way. The refutation pass | ||
| 48451 | + // measured 33 hits on a build with the conjunct REMOVED, which is | ||
| 48452 | + // exactly that population -- so an unconditional hit proves only | ||
| 48453 | + // "a lossless sub-8 leaf was walked", not "the conjunct suppressed | ||
| 48454 | + // a tree". Guard it on the same term the conjunct uses. | ||
| 48455 | + if fctx.tx_select_inter.with(std::cell::Cell::get) { | ||
| 48456 | + hit!(SUB8_LOSSLESS_NO_VARTX); | ||
| 48457 | + } | ||
| 48441 | // lane-lossless2: `read_block_tx_size` returns TX_4X4 before it | 48458 | // lane-lossless2: `read_block_tx_size` returns TX_4X4 before it |
| 48442 | // ever looks at `max_txsize_rect_lookup`, so an 8x4/4x8 leaf is | 48459 | // ever looks at `max_txsize_rect_lookup`, so an 8x4/4x8 leaf is |
| 48443 | // TWO 4x4 units, not one rect one. | 48460 | // TWO 4x4 units, not one rect one. |
crates/ec-av1/src/stream.rsmodified+5 -1
| @@ -9316,7 +9316,11 @@ pub(crate) mod tests { | |||
| 9316 | /// a `tx_size_cat1` symbol libaom never reads, and the very next block's | 9316 | /// a `tx_size_cat1` symbol libaom never reads, and the very next block's |
| 9317 | /// `txb_skip` forked. `SUB8_LOSSLESS_NO_VARTX` counts the leaves that | 9317 | /// `txb_skip` forked. `SUB8_LOSSLESS_NO_VARTX` counts the leaves that |
| 9318 | /// newly take the lossless arm, so this gate cannot pass vacuously on a | 9318 | /// newly take the lossless arm, so this gate cannot pass vacuously on a |
| 9319 | - /// stream whose sub-8 leaves all sit in lossy segments. | 9319 | + /// stream whose sub-8 leaves all sit in lossy segments. (Corrected |
| 9320 | + /// 2026-09-30: the counter is now guarded on `tx_select_inter`, because the | ||
| 9321 | + /// refutation pass measured 33 hits on a build with the conjunct REMOVED -- | ||
| 9322 | + /// the arm also serves leaves whose tx-select is off. The pin's own delta | ||
| 9323 | + /// is 10, not the 40 the lane first reported; both numbers are measured.) | ||
| 9320 | /// | 9324 | /// |
| 9321 | /// The trigger really is the CONJUNCTION: `--cq-level=0` with AQ makes | 9325 | /// The trigger really is the CONJUNCTION: `--cq-level=0` with AQ makes |
| 9322 | /// *some* segments lossless and others not (`--cq-level=20`, `--cq-level=32`, | 9326 | /// *some* segments lossless and others not (`--cq-level=20`, `--cq-level=32`, |
lanes/av1mixllconj.report.mdmodified+29 -0
| @@ -1,5 +1,34 @@ | |||
| 1 | # lane-av1mixllconj — the per-segment `lossless` answer ALREADY agrees with libaom; the var-tx **conjunct** lands, and the 640x480 "regression" is a SECOND, independent defect on a cell that was never correct | 1 | # lane-av1mixllconj — the per-segment `lossless` answer ALREADY agrees with libaom; the var-tx **conjunct** lands, and the 640x480 "regression" is a SECOND, independent defect on a cell that was never correct |
| 2 | 2 | ||
| 3 | +> **CORRECTIONS FROM THE REFUTATION PASS (added by Main 2026-09-30; VERDICT: PARTIAL — every DECODER claim | ||
| 4 | +> reproduced exactly, three REPORT/doc figures did not).** The pass reproduced the pin (6/6 decode-order dumps | ||
| 5 | +> byte-exact, shown rawvideo 245760 B with 0 differing bytes), the whole-stream ladder (96997 oracle lines / | ||
| 6 | +> 96997 ours / 0 unparsed / 96997 paired bit-identical / first divergence NONE), the conjunct-out red | ||
| 7 | +> (f1..f5 = 33724/34251/44500/36688/37462, gate FAILED at decode-order frame 1 byte 33, ours 82 vs 81, ladder | ||
| 8 | +> first divergence at read 30889), the per-segment derivation, the premise reversal on base (m5_640x480 f1..f5 | ||
| 9 | +> = 352066/414286/313795/399471/422078 of 460800 -- the report's exact numbers, 76/70/68/87/92 % wrong), and the | ||
| 10 | +> off-tile arithmetic re-derived independently. Corrections: | ||
| 11 | +> | ||
| 12 | +> 1. **`SUB8_LOSSLESS_NO_VARTX` was NOT the decision counter it claimed to be** (doc at | ||
| 13 | +> `decode.rs:34766-34772`, and my merge message repeated the claim): the pass measured **33 hits on a build | ||
| 14 | +> with the conjunct REMOVED**, because the `else if lossless(fctx) && !skip` arm also serves leaves whose | ||
| 15 | +> `tx_select_inter` is OFF -- leaves the conjunct does not touch. The hit is now guarded on `tx_select_inter` | ||
| 16 | +> (the same term the conjunct uses) and the pin's delta reads **10, not 40**; the gate still asserts `> 0`, | ||
| 17 | +> remains green, and its doc names both numbers. Same class as the palette counter correction: a hit that | ||
| 18 | +> fires for a population the fix does not touch is not a non-vacuity arm. | ||
| 19 | +> 2. **The corpus buckets do not reproduce**: the pass swept 110 fixtures on both trees and measures | ||
| 20 | +> **base 106 = 96 EXACT / 0 RED / 9 FRAMECOUNT / 1 ORACLE_FAIL** (`440_request_is_422.obu`, which `aomdec` | ||
| 21 | +> itself refuses) and **tip 110 = 100 EXACT / 0 RED / 9 FRAMECOUNT / 1**, with the SUBSTANCE intact and | ||
| 22 | +> stronger: conjunct-out -> tip is exactly ONE status change (the pin RED 186625 B -> EXACT), zero | ||
| 23 | +> EXACT->RED, zero new refusals, zero frame-count change; base -> tip is 0 status changes across the 106 | ||
| 24 | +> shared fixtures plus 4 added (all EXACT); tip -> clip-out is 0 status changes (the off-tile clip is | ||
| 25 | +> corpus-inert). The report's "107 fixtures" and its 64/34/9/0 -> 65/33/9/0 split match neither tree | ||
| 26 | +> (base 106, main 110) -- use the pass's absolute buckets. | ||
| 27 | +> 3. **The cited oracle rung `EC_AV1_DECODE_ORDER_DUMP` does not exist** in the shared oracle build (only | ||
| 28 | +> `EC_AV1_FINAL_DUMP`, `decodeframe.c:5699`). The measurement it supports was made with the decode-order | ||
| 29 | +> dump path the crate's own helpers use; the rung NAME in the text is wrong and no test depends on it. | ||
| 30 | + | ||
| 31 | + | ||
| 3 | Base `main` = `6bb66a4a`. Worktree `/home/user/.cache/wt/av1mixllconj`, target dir | 32 | Base `main` = `6bb66a4a`. Worktree `/home/user/.cache/wt/av1mixllconj`, target dir |
| 4 | `$HOME/.cache/cargo-target-av1mixllconj`, `EC_NOMEMGUARD=1`. Oracle | 33 | `$HOME/.cache/cargo-target-av1mixllconj`, `EC_NOMEMGUARD=1`. Oracle |
| 5 | `~/.cache/aom-oracle/build/{aomdec,aomenc}` (shared, untouched; not rebuilt, not | 34 | `~/.cache/aom-oracle/build/{aomdec,aomenc}` (shared, untouched; not rebuilt, not |