From d626fa6bdd3f98dba4a13a5095b11ca39e27c3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 30 Sep 2026 19:02:43 +0300 Subject: [PATCH] conjunct + off-tile refutation: PARTIAL -- every decoder claim reproduced; three figures corrected, one of them patch-introduced in code The pass reproduced every decoder claim with its own instruments before refuting anything: the pin (6/6 decode-order dumps byte-exact, shown rawvideo 0 differing bytes), the whole-stream ladder (96997/96997 paired, first divergence NONE), the conjunct-out red (f1..f5 = 33724/34251/44500/36688/37462, gate FAILED at frame 1 byte 33, ladder fork at read 30889), the per-segment derivation, the 640x480 premise reversal on base (the report's exact bytes, 76/70/68/87/92 % of the frame wrong), and the off-tile arithmetic re-derived independently (mb_to_right_edge -88 / -120 -> max_block_wide 6, max_block_high 2 -> 12 units per plane against 32 walked; the oracle's own EC_ECDUMP_IN prints 2373 lines; pixel-invisibility CONFIRMED by removing the clip and showing frame 0 still byte-exact). Fixed here, in code, because the first finding was patch-introduced: SUB8_LOSSLESS_NO_VARTX was not the DECISION counter its doc claimed, and my merge message repeated the claim. The pass measured 33 hits on a build with the conjunct REMOVED: the `else if lossless(fctx) && !skip` arm also serves leaves whose `tx_select_inter` is OFF. The hit is now guarded on `tx_select_inter` -- the same term the conjunct uses -- so a hit means the suppression is the conjunct's doing. The pin's delta reads 10, not 40; the gate still asserts > 0 and stays green; both numbers are named in the counter doc and the gate doc. Same class as the palette counter correction earlier today: a hit that fires for a population the fix does not touch is not a non-vacuity arm. Corrected in the report as an annotation rather than a rewrite: - CORPUS BUCKETS: the pass measures base 106 = 96 EXACT / 0 RED / 9 FRAMECOUNT / 1 ORACLE_FAIL and tip 110 = 100 / 0 / 9 / 1. The substance is intact and stronger than the report's framing: conjunct-out -> tip is exactly ONE status change, zero EXACT->RED, zero new refusals; base -> tip is 0 changes across the 106 shared fixtures plus 4 added; tip -> clip-out is 0 changes. The report's 107-fixture/64-34-9-0 pair matches neither tree. - The cited rung EC_AV1_DECODE_ORDER_DUMP does not exist in the shared oracle build (only EC_AV1_FINAL_DUMP); the measurement stands, the name is wrong. --- crates/ec-av1/src/decode.rs | 19 ++++++++++++++++++- crates/ec-av1/src/stream.rs | 6 +++++- lanes/av1mixllconj.report.md | 29 +++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 0cfdf5b8..845eb2c6 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -34770,6 +34770,14 @@ thread_local! { /// lossless frame codes no `tx_size_cat1` symbol there. Zero on any frame /// whose sub-8 leaves all sit in lossy segments, so a gate cannot look /// armed by merely decoding. + /// + /// CORRECTED 2026-09-30 by the refutation pass (`lanes/refute-av1mixllconj`): + /// the hit was UNCONDITIONAL inside the else-if, which also serves leaves + /// whose `tx_select_inter` is off -- the pass measured **33 hits on a build + /// with the conjunct REMOVED**, i.e. it was counting a population the + /// conjunct does not touch. It is now guarded on `tx_select_inter`, the same + /// term the conjunct uses, so a hit means the suppression is the conjunct's + /// doing. pub(crate) static SUB8_LOSSLESS_NO_VARTX: std::cell::Cell = const { std::cell::Cell::new(0) }; } @@ -48437,7 +48445,16 @@ fn decode_inter_sub8_rect2( &mut leaves, ); } else if lossless(fctx) && !skip { - hit!(SUB8_LOSSLESS_NO_VARTX); + // COUNTED ONLY WHEN THE SUPPRESSION IS THE CONJUNCT'S WORKING: the + // else-if also fires for a leaf whose `tx_select_inter` is off, + // where the tree would not have run either way. The refutation pass + // measured 33 hits on a build with the conjunct REMOVED, which is + // exactly that population -- so an unconditional hit proves only + // "a lossless sub-8 leaf was walked", not "the conjunct suppressed + // a tree". Guard it on the same term the conjunct uses. + if fctx.tx_select_inter.with(std::cell::Cell::get) { + hit!(SUB8_LOSSLESS_NO_VARTX); + } // lane-lossless2: `read_block_tx_size` returns TX_4X4 before it // ever looks at `max_txsize_rect_lookup`, so an 8x4/4x8 leaf is // TWO 4x4 units, not one rect one. diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 92e6bc2a..64a8c479 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -9316,7 +9316,11 @@ pub(crate) mod tests { /// a `tx_size_cat1` symbol libaom never reads, and the very next block's /// `txb_skip` forked. `SUB8_LOSSLESS_NO_VARTX` counts the leaves that /// newly take the lossless arm, so this gate cannot pass vacuously on a - /// stream whose sub-8 leaves all sit in lossy segments. + /// stream whose sub-8 leaves all sit in lossy segments. (Corrected + /// 2026-09-30: the counter is now guarded on `tx_select_inter`, because the + /// refutation pass measured 33 hits on a build with the conjunct REMOVED -- + /// the arm also serves leaves whose tx-select is off. The pin's own delta + /// is 10, not the 40 the lane first reported; both numbers are measured.) /// /// The trigger really is the CONJUNCTION: `--cq-level=0` with AQ makes /// *some* segments lossless and others not (`--cq-level=20`, `--cq-level=32`, diff --git a/lanes/av1mixllconj.report.md b/lanes/av1mixllconj.report.md index 3bb0f7e5..4fa93dd6 100644 --- a/lanes/av1mixllconj.report.md +++ b/lanes/av1mixllconj.report.md @@ -1,5 +1,34 @@ # 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 +> **CORRECTIONS FROM THE REFUTATION PASS (added by Main 2026-09-30; VERDICT: PARTIAL — every DECODER claim +> reproduced exactly, three REPORT/doc figures did not).** The pass reproduced the pin (6/6 decode-order dumps +> byte-exact, shown rawvideo 245760 B with 0 differing bytes), the whole-stream ladder (96997 oracle lines / +> 96997 ours / 0 unparsed / 96997 paired bit-identical / first divergence NONE), the conjunct-out red +> (f1..f5 = 33724/34251/44500/36688/37462, gate FAILED at decode-order frame 1 byte 33, ours 82 vs 81, ladder +> first divergence at read 30889), the per-segment derivation, the premise reversal on base (m5_640x480 f1..f5 +> = 352066/414286/313795/399471/422078 of 460800 -- the report's exact numbers, 76/70/68/87/92 % wrong), and the +> off-tile arithmetic re-derived independently. Corrections: +> +> 1. **`SUB8_LOSSLESS_NO_VARTX` was NOT the decision counter it claimed to be** (doc at +> `decode.rs:34766-34772`, and my merge message repeated the claim): the pass measured **33 hits on a build +> with the conjunct REMOVED**, because the `else if lossless(fctx) && !skip` arm also serves leaves whose +> `tx_select_inter` is OFF -- leaves the conjunct does not touch. The hit is now guarded on `tx_select_inter` +> (the same term the conjunct uses) and the pin's delta reads **10, not 40**; the gate still asserts `> 0`, +> remains green, and its doc names both numbers. Same class as the palette counter correction: a hit that +> fires for a population the fix does not touch is not a non-vacuity arm. +> 2. **The corpus buckets do not reproduce**: the pass swept 110 fixtures on both trees and measures +> **base 106 = 96 EXACT / 0 RED / 9 FRAMECOUNT / 1 ORACLE_FAIL** (`440_request_is_422.obu`, which `aomdec` +> itself refuses) and **tip 110 = 100 EXACT / 0 RED / 9 FRAMECOUNT / 1**, with the SUBSTANCE intact and +> stronger: conjunct-out -> tip is exactly ONE status change (the pin RED 186625 B -> EXACT), zero +> EXACT->RED, zero new refusals, zero frame-count change; base -> tip is 0 status changes across the 106 +> shared fixtures plus 4 added (all EXACT); tip -> clip-out is 0 status changes (the off-tile clip is +> corpus-inert). The report's "107 fixtures" and its 64/34/9/0 -> 65/33/9/0 split match neither tree +> (base 106, main 110) -- use the pass's absolute buckets. +> 3. **The cited oracle rung `EC_AV1_DECODE_ORDER_DUMP` does not exist** in the shared oracle build (only +> `EC_AV1_FINAL_DUMP`, `decodeframe.c:5699`). The measurement it supports was made with the decode-order +> dump path the crate's own helpers use; the rung NAME in the text is wrong and no test depends on it. + + Base `main` = `6bb66a4a`. Worktree `/home/user/.cache/wt/av1mixllconj`, target dir `$HOME/.cache/cargo-target-av1mixllconj`, `EC_NOMEMGUARD=1`. Oracle `~/.cache/aom-oracle/build/{aomdec,aomenc}` (shared, untouched; not rebuilt, not