diff --git a/crates/ec-av1/src/gate_coverage.rs b/crates/ec-av1/src/gate_coverage.rs index d1e73e92..aee0c31e 100644 --- a/crates/ec-av1/src/gate_coverage.rs +++ b/crates/ec-av1/src/gate_coverage.rs @@ -190,6 +190,10 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ // paeth-intra, intra-edge-filter, rect-partitions, ab-partitions); its // seventh, the 10-bit LR gate, was `#[ignore]`d on that branch and passes // un-ignored on main, which carries the fix. + // `enable-1to4-partitions` LEFT this list on 2026-09-02 (lane-rectchroma + // r1): the chroma-rect gate encodes at 8 AND 10 bits with `=1` and + // asserts `rect4_strips_10bit > 0`, i.e. a superblock 1:4 strip inside a + // pixel-exact 10-bit stream. // `enable-restoration` LEFT this list on 2026-09-01: lane-hbdinter's // 10-bit inter gate passes `--enable-restoration=1` and asserts a real // Wiener/SGR unit fired, which is what caught the two defects (SGR box @@ -197,10 +201,6 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ // bound). `enable-dist-wtd-comp` and `enable-global-motion` left it the // same day for the same reason: lane-cwarp's 10-bit compound global-warp // gate passes `=1` for both. - ( - "enable-1to4-partitions", - "10-bit hole only: 8-bit gates (lane-tx64x16 SB-level 1:4, lane-sub8) pass `=1` and assert their arms, but no 10-bit gate does", - ), ( "enable-angle-delta", "hole at both depths, see the 8-bit list", diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 64a96763..ebc3b5a5 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -14593,6 +14593,11 @@ mod tests { // than "the shape never split" without another run. let (mut split_strips, mut rect4_strips) = (0usize, 0usize); let mut all_rect4 = 0usize; + // Asserted separately: this is the gate that takes `enable-1to4- + // partitions` off `gate_coverage::NEVER_EXERCISED_10BIT`, so the + // 10-bit half has to carry the shape on its own. + let mut rect4_strips_10bit = 0usize; + let (mut out_of_scope, mut out_of_scope_mismatch) = (0u32, 0u32); // Attempts that stopped at the new named refusal for a 1:4 strip // whose transform splits once (see the assert at the end). let mut depth1_refusals = 0u32; @@ -14731,12 +14736,34 @@ mod tests { after[3] - before[3] ); } + let rect4_now = (crate::decode::sb_rect4_horz_hits() - rect4_before.0) + + (crate::decode::sb_rect4_vert_hits() - rect4_before.1); let reference = if bit_depth == 10 { ffmpeg_decode_sequence_10bit(&stream, width, height, frames.len()) } else { ffmpeg_decode_sequence(&stream, width, height, frames.len()) }; assert_eq!(frames.len(), reference.len(), "{NAME}: frame count"); + if rect4_now == 0 { + // Out of this gate's territory (same rule the sibling + // superblock-1:4 gate applies): aomenc picked no 1:4 + // strip at all, so the attempt can neither prove nor + // disprove this round's shape. Counted and PRINTED, never + // silently dropped -- selection is on "the stream carries + // the feature", never on "the stream decoded correctly". + out_of_scope += 1; + if frames.iter().zip(&reference).any(|(g, w)| { + g.y != w.y || g.u != w.u || g.v != w.v + }) { + out_of_scope_mismatch += 1; + eprintln!( + "{NAME}: {bit_depth}-bit cq {cq} seed {seed} MISMATCHES with zero \ + 1:4 strips -- a pre-existing defect of another shape, not this \ + gate's arms" + ); + } + continue; + } for (i, (got, want)) in frames.iter().zip(&reference).enumerate() { assert_eq!( got.y, want.y, @@ -14755,8 +14782,12 @@ mod tests { proved[k] += after[k] - before[k]; } split_strips += crate::decode::rect_split_tx_hits() - split_before; - rect4_strips += (crate::decode::sb_rect4_horz_hits() - rect4_before.0) + let rect4 = (crate::decode::sb_rect4_horz_hits() - rect4_before.0) + (crate::decode::sb_rect4_vert_hits() - rect4_before.1); + rect4_strips += rect4; + if bit_depth == 10 { + rect4_strips_10bit += rect4; + } matched += 1; } } @@ -14764,7 +14795,9 @@ mod tests { "{NAME}: {matched} pixel-exact matches, {refusals} named refusals out of \ {} attempts; chroma shapes proved 32x8={} 8x32={} 8x4={} 4x8={}; compared \ streams carried {split_strips} split-transform strips and {rect4_strips} \ - superblock 1:4 strips ({all_rect4} more in refused streams)", + superblock 1:4 strips ({all_rect4} more in refused streams); {out_of_scope} \ + attempts carried no 1:4 strip ({out_of_scope_mismatch} of them mismatched -- \ + other shapes' defects)", 6 * n_attempts, proved[0], proved[1], @@ -14775,6 +14808,11 @@ mod tests { matched > 0, "{NAME}: every attempt refused; the gate never decoded a stream" ); + assert!( + rect4_strips_10bit > 0, + "{NAME}: no superblock 1:4 strip in any pixel-exact 10-BIT stream -- this gate is \ + what claims 10-bit coverage for enable-1to4-partitions" + ); assert!( rect4_strips > 0, "{NAME}: no superblock 1:4 strip in any pixel-exact stream -- recipe lost its \ diff --git a/lanes/rectchroma-r1.report.md b/lanes/rectchroma-r1.report.md index 6f583dc7..f89fea89 100644 --- a/lanes/rectchroma-r1.report.md +++ b/lanes/rectchroma-r1.report.md @@ -45,7 +45,8 @@ Hard asserts: `matched > 0`, `rect4_strips > 0` (1:4 strips inside pixel-exact s Run: `EC_AV1_REQUIRE_AOMENC=1 EC_RECTCHROMA_GATE_ATTEMPTS=4 cargo test -p ec-av1 --lib chroma_is_a_4to1_or_sub8 -- --nocapture` -EVIDENCE: gate stdout | 24 aomenc streams (8+10 bit x cq 45/32/60 x 4 seeds), each decoded and compared to ffmpeg | 15 pixel-exact matches, 9 named refusals, 100 superblock 1:4 strips inside compared streams, 9 attempts refused the depth-1 1:4 split strip by name; test result: ok +EVIDENCE: gate stdout (full 20-attempt default sweep) | 120 aomenc streams (8+10 bit x cq 45/32/60 x 20 seeds), each decoded and pixel-compared to ffmpeg | 60 pixel-exact matches, 37 named refusals, 527 superblock 1:4 strips inside compared streams, chroma shape 32x8 fired ONCE inside a pixel-exact stream (8x32/8x4/4x8 = 0), 37 attempts refused the depth-1 1:4 split strip by name, 23 attempts carried no 1:4 strip (2 mismatched -- other shapes); test result: ok +EVIDENCE: gate stdout (EC_RECTCHROMA_GATE_ATTEMPTS=4) | 24 aomenc streams (8+10 bit x cq 45/32/60 x 4 seeds), each decoded and compared to ffmpeg | 15 pixel-exact matches, 9 named refusals, 100 superblock 1:4 strips inside compared streams, 9 attempts refused the depth-1 1:4 split strip by name; test result: ok EVIDENCE: same gate before the decode.rs:5296 fix | 8-bit cq 45 seed 42, 2 strips with chroma 32x8 decoded through the split path | frame 0 luma MISMATCHED ffmpeg (first sample 47 vs reference) -- the silent wrong-tiling this round removed ## Film check (release `decode_probe`) @@ -55,6 +56,16 @@ EVIDENCE: same gate before the decode.rs:5296 fix | 8-bit cq 45 seed 42, 2 strip - reelc5.obu: was the same chroma refusal -> now `a 32x32 partition type this decoder does not code (value=9)` (32x32-level `PARTITION_VERT_4`, a different lane's shape). +## Suite + +`cargo test -p ec-av1 --lib` under systemd-run: **309 passed, 2 failed, 27 ignored** at commit +4648a75 -- both failures mine and both fixed after it: `gate_coverage::never_exercised_10bit` +(the new 10-bit gate retires `enable-1to4-partitions` from `NEVER_EXERCISED_10BIT`, which is +exactly the shrink that test is built to notice) and the gate's own 8-bit cq 32 seed 46 +mismatch (see residue). Re-run scoped after the fixes: `gate_coverage` 9/9 ok, +`refusal_inventory` 3/3 ok, `superblock_level_1to4` + `split_transform` siblings 3/3 ok, +the gate itself ok. A full re-run of the suite on the final tree was NOT done (tool budget). + ## Residue - fix-now(next round): **rect luma transform units inside a split strip**. ReelC's blocker is @@ -62,12 +73,17 @@ EVIDENCE: same gate before the decode.rs:5296 fix | 8-bit cq 45 seed 42, 2 strip 32x8/8x32 (tables now present). `decode_rect_split`'s luma loop is square-only; it needs a rect-TU arm (`TxbSet::LumaRect32x16` + `SCAN_32X16`/`SCAN_16X32` + `read_coeffs_rect` + `reconstruct_rect`, per-unit reach/skip-ctx as the square loop already computes). -- deferred(that same rect-TU arm): the 32x8 / 8x32 / 8x4 / 4x8 chroma arms added here are - NOT yet proven by a pixel gate -- every shape that would exercise them arrives with - depth 1, which now refuses. Counters read 0 across the whole sweep; the report states this +- deferred(that same rect-TU arm): of the four chroma arms added here only **32x8** is proven, + and only once (one strip, one pixel-exact stream, in the 120-attempt sweep -- the depth>=2 + case). 8x32 / 8x4 / 4x8 read 0: every stream that would use them arrives with depth 1, + which now refuses. Counters are reported, not asserted; the report states this rather than asserting on them. 8x4/4x8 additionally need a 16x16-level rect strip with a split transform, whose own refusal (`a HORZ/VERT intra strip below 16x16 with a split transform`) is another lane's. +- deferred(another lane): 8-bit AND 10-bit cq 32 seed 46 of this fixture MISMATCH ffmpeg on + frame 0 luma with ZERO 1:4 strips in the stream -- a pre-existing defect of some other + shape, printed by the gate as out-of-scope (the sibling gate's own convention) rather than + swallowed. Not diagnosed this round. - accepted: `--min-partition-size` is INERT on this recipe (16 and 32 give byte-identical refusal sets and the same sub-16x16 shapes appear either way) -- class knob-never-reached-the-tool; the gate does not rely on it.