diff --git a/crates/ec-av1/src/gate_coverage.rs b/crates/ec-av1/src/gate_coverage.rs index 727088f6..d37e958e 100644 --- a/crates/ec-av1/src/gate_coverage.rs +++ b/crates/ec-av1/src/gate_coverage.rs @@ -147,17 +147,15 @@ const NEVER_EXERCISED_8BIT: &[(&str, &str)] = &[ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ // Only 4 of the 45 real-aomenc gates encode at 10 bits, and they pin the // pixel filters and the intra tool set off. Every entry the 8-bit list - // carries is a hole here too; the seven extra ones below are tools an - // 8-bit gate DOES enable, whose high-bit-depth path no stream has ever - // touched -- exactly the shape that hid the two lane-hbdinter defects. + // carries is a hole here too. lane-hbdgates r1 closed six of the seven + // 8-bit-only entries with real 10-bit gates (filter-intra, smooth-intra, + // paeth-intra, intra-edge-filter, rect-partitions, ab-partitions); the + // seventh, `enable-restoration`, has a 10-bit gate that FAILS and is + // therefore `#[ignore]`d, so its hole stays open. ( "enable-1to4-partitions", "hole at both depths, see the 8-bit list", ), - ( - "enable-ab-partitions", - "8-bit only: no 10-bit gate enables AB partitions", - ), ( "enable-angle-delta", "hole at both depths, see the 8-bit list", @@ -174,10 +172,6 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ "enable-dual-filter", "hole at both depths, see the 8-bit list", ), - ( - "enable-filter-intra", - "8-bit only: no 10-bit gate enables filter intra", - ), ( "enable-flip-idtx", "hole at both depths, see the 8-bit list", @@ -186,19 +180,7 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ "enable-global-motion", "hole at both depths, see the 8-bit list", ), - ( - "enable-intra-edge-filter", - "8-bit only: the 10-bit intra path never runs the edge filter", - ), ("enable-intrabc", "hole at both depths, see the 8-bit list"), - ( - "enable-paeth-intra", - "8-bit only: no 10-bit gate enables Paeth", - ), - ( - "enable-rect-partitions", - "8-bit only: no 10-bit gate enables rect partitions", - ), ("enable-rect-tx", "hole at both depths, see the 8-bit list"), ( "enable-ref-frame-mvs", @@ -206,11 +188,7 @@ const NEVER_EXERCISED_10BIT: &[(&str, &str)] = &[ ), ( "enable-restoration", - "8-bit only -- THE instance this split was built for: every 10-bit gate passed `--enable-restoration=0`, so the SGR box sums and the Wiener clamp were never run at 10 bits and both were wrong (lane-hbdinter, 2026-09-01)", - ), - ( - "enable-smooth-intra", - "8-bit only: no 10-bit gate enables smooth intra", + "8-bit only -- THE instance this split was built for: every 10-bit gate passed `--enable-restoration=0`, so the SGR box sums and the Wiener clamp were never run at 10 bits and both were wrong (lane-hbdinter, 2026-09-01). lane-hbdgates r1 WROTE the 10-bit LR gate (`a_real_aomenc_10bit_restoration_stream_decodes_pixel_exact`) and it FAILS pixel-exact on a stream where the LR filters demonstrably ran (lr_hits=2, seed 42, frame 0, Y index 122: ours 351 vs ffmpeg 350), so it is `#[ignore]`d and the hole stays open until that defect is fixed", ), ( "enable-superres", @@ -231,7 +209,17 @@ mod tests { let src = include_str!("stream.rs"); let gates: Vec<&str> = src .split("\n #[") - .filter(|body| body.contains("\"--passes=1\"")) + // lane-hbdgates r1: an `#[ignore]`d gate exercises nothing, so it + // must not close a hole. Its body is the segment that opens with + // the ignore attribute. + .filter(|body| !body.starts_with("ignore")) + // lane-hbdgates r1: gates that build their stream through the + // shared 10-bit helpers spell `--passes=1` there, not inline. + .filter(|body| { + body.contains("\"--passes=1\"") + || body.contains("ten_bit_tool_gate(") + || body.contains("encode_10bit_gradients") + }) .collect(); assert!( gates.len() >= 20, @@ -346,6 +334,7 @@ mod tests { /// 8-bit default. fn is_ten_bit(body: &str) -> bool { body.contains("encode_10bit_gradients") + || body.contains("ten_bit_tool_gate(") || body.contains("--bit-depth=10") || body.contains("--input-bit-depth=10") || body.contains("yuv420p10le") diff --git a/crates/ec-av1/src/intra.rs b/crates/ec-av1/src/intra.rs index 0d6f3ebe..03c5809d 100644 --- a/crates/ec-av1/src/intra.rs +++ b/crates/ec-av1/src/intra.rs @@ -235,6 +235,32 @@ impl Edges { /// # Panics /// Panics on a mode this module does not predict, or when `dst` is not /// `bw * bh` long. +// lane-hbdgates r1: per-tool firing counters for the 10-bit gates. Each tool +// the coverage table tracks needs its OWN counter -- `smooth_uv_hits` lumps +// SMOOTH..=PAETH together, so a paeth-only stream would have "proved" smooth +// intra ([[gate-blind-to-feature]]). +thread_local! { + static SMOOTH_PRED_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; + static PAETH_PRED_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; + static EDGE_FILTER_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; +} + +/// How many blocks were predicted with SMOOTH/SMOOTH_V/SMOOTH_H on this thread. +pub(crate) fn smooth_pred_hits() -> usize { + SMOOTH_PRED_HITS.with(|c| c.get()) +} + +/// How many blocks were predicted with PAETH_PRED on this thread. +pub(crate) fn paeth_pred_hits() -> usize { + PAETH_PRED_HITS.with(|c| c.get()) +} + +/// How many directional edges [`filter_intra_edge`] actually smoothed +/// (strength != 0) on this thread -- the `--enable-intra-edge-filter` proof. +pub(crate) fn intra_edge_filter_hits() -> usize { + EDGE_FILTER_HITS.with(|c| c.get()) +} + #[allow(clippy::too_many_arguments)] pub fn predict( mode: u8, @@ -249,6 +275,13 @@ pub fn predict( dst: &mut [u16], ) { assert_eq!(dst.len(), bw * bh, "the destination is the block"); + match mode { + SMOOTH_PRED | SMOOTH_V_PRED | SMOOTH_H_PRED => { + SMOOTH_PRED_HITS.with(|c| c.set(c.get() + 1)); + } + PAETH_PRED => PAETH_PRED_HITS.with(|c| c.set(c.get() + 1)), + _ => {} + } let edges = Edges::build(above, left, corner, bw, bh); let is_directional = matches!( mode, @@ -410,6 +443,7 @@ fn filter_intra_edge(buf: &mut [i32], strength: i32) { if strength == 0 { return; } + EDGE_FILTER_HITS.with(|c| c.set(c.get() + 1)); const KERNEL: [[i32; 5]; 3] = [[0, 4, 8, 4, 0], [0, 5, 6, 5, 0], [2, 4, 4, 4, 2]]; let filt = usize::try_from(strength - 1).expect("a filter strength is never negative"); let sz = buf.len() as i32; diff --git a/crates/ec-av1/src/stream.rs b/crates/ec-av1/src/stream.rs index 388f49db..932fcbc3 100644 --- a/crates/ec-av1/src/stream.rs +++ b/crates/ec-av1/src/stream.rs @@ -2123,6 +2123,300 @@ mod tests { ); } + /// lane-hbdgates r1: drive one 10-bit aomenc recipe over `seeds`, decode + /// every attempt and pixel-compare every SHOWN frame against ffmpeg's own + /// 10-bit decode of the identical bytes. Per-tool firing counters are + /// sampled PER ATTEMPT and summed only over attempts that decoded *and* + /// compared -- a stream that hit a named refusal contributes nothing + /// (class `counter-from-refused-stream`). Named refusals are tolerated + /// and reported; a pixel mismatch is a hard failure, never a SKIP. + fn ten_bit_tool_gate( + name: &str, + width: usize, + height: usize, + frames: usize, + extra: &[&str], + seeds: &[u32], + counters: &[(&str, fn() -> usize)], + ) { + fn first_diff(ours: &[u16], theirs: &[u16], width: usize) -> Option { + ours.iter() + .zip(theirs.iter()) + .position(|(a, b)| a != b) + .map(|i| { + format!( + "first diff at index {i} (row {}, col {}): ours {} vs ffmpeg {}", + i / width, + i % width, + ours[i], + theirs[i] + ) + }) + } + let mut totals = vec![0usize; counters.len()]; + let mut refusals: Vec = Vec::new(); + let mut compared = 0usize; + for &seed in seeds { + let stream = encode_10bit_gradients_seed(name, seed, width, height, frames, extra); + assert_eq!( + parsed_bit_depth(&stream), + 10, + "{name}: aomenc did not write a 10-bit sequence header (seed {seed})" + ); + let before: Vec = counters.iter().map(|(_, f)| f()).collect(); + let decoded = match decode_stream(&stream) { + Ok(frames) => frames, + Err(e) => { + refusals.push(format!("seed {seed}: {e}")); + continue; + } + }; + // Deltas are read BEFORE the pixel compare so a mismatch report + // says whether the tool under test actually fired on the failing + // stream (a mismatch with a zero delta is some other defect). + let deltas: Vec = counters + .iter() + .zip(before.iter()) + .map(|((_, f), b)| f() - b) + .collect(); + let fired: Vec = counters + .iter() + .zip(deltas.iter()) + .map(|((label, _), d)| format!("{label}={d}")) + .collect(); + let fired = fired.join(" "); + let reference = ffmpeg_decode_sequence_10bit(&stream, width, height, decoded.len()); + assert_eq!( + decoded.len(), + reference.len(), + "{name}: seed {seed}: shown-frame count vs ffmpeg" + ); + for (i, (ours, theirs)) in decoded.iter().zip(reference.iter()).enumerate() { + for (plane, (a, b), w) in [ + ("Y", (&ours.y, &theirs.y), width), + ("U", (&ours.u, &theirs.u), width / 2), + ("V", (&ours.v, &theirs.v), width / 2), + ] { + if let Some(d) = first_diff(a, b, w) { + panic!("{name}: seed {seed} frame {i} plane {plane}: {d} [{fired}]"); + } + } + } + compared += 1; + for (i, d) in deltas.iter().enumerate() { + totals[i] += d; + } + } + assert!( + compared > 0, + "{name}: every attempt hit a named refusal:\n{}", + refusals.join("\n") + ); + for (i, (label, _)) in counters.iter().enumerate() { + assert!( + totals[i] > 0, + "{name}: {compared} attempt(s) decoded pixel-exact but {label} never fired -- \ + the gate would prove nothing about that tool. refusals:\n{}", + refusals.join("\n") + ); + } + let summary: Vec = counters + .iter() + .zip(totals.iter()) + .map(|((label, _), t)| format!("{label}={t}")) + .collect(); + eprintln!( + "{name}: {compared}/{} attempts pixel-exact, {}", + seeds.len(), + summary.join(" ") + ); + } + + /// lane-hbdgates r1: the four intra tools that had an 8-bit gate and no + /// 10-bit one (`filter-intra`, `smooth-intra`, `paeth-intra`, + /// `intra-edge-filter`) on ONE real 10-bit `aomenc` key frame, each with + /// its own hard-asserted counter. His two films are yuv420p10le, so an + /// 8-bit-only gate for these tools proves nothing about the streams that + /// matter (lane-covbd r1). + #[test] + fn a_real_aomenc_10bit_intra_tools_stream_decodes_pixel_exact() { + const NAME: &str = "a_real_aomenc_10bit_intra_tools_stream_decodes_pixel_exact"; + if !have_ffmpeg() { + eprintln!("SKIP {NAME}: no ffmpeg"); + return; + } + if !have_aomenc() { + eprintln!("SKIP {NAME}: no aomenc at {}", aomenc_path().display()); + return; + } + ten_bit_tool_gate( + NAME, + 64, + 64, + 1, + &[ + "--limit=1", + "--kf-max-dist=0", + "--enable-filter-intra=1", + "--enable-smooth-intra=1", + "--enable-paeth-intra=1", + "--enable-intra-edge-filter=1", + "--enable-directional-intra=1", + "--enable-angle-delta=0", + "--enable-rect-partitions=0", + "--enable-ab-partitions=0", + "--enable-1to4-partitions=0", + "--enable-tx-size-search=0", + "--enable-cdef=0", + "--enable-restoration=0", + "--max-partition-size=32", + "--min-partition-size=16", + "--enable-palette=0", + "--enable-intrabc=0", + "--enable-cfl-intra=0", + "--enable-ref-frame-mvs=0", + ], + &[42, 7, 11, 23, 31, 57], + &[ + ("filter_intra_hits", decode::filter_intra_hits), + ("smooth_pred_hits", crate::intra::smooth_pred_hits), + ("paeth_pred_hits", crate::intra::paeth_pred_hits), + ("intra_edge_filter_hits", crate::intra::intra_edge_filter_hits), + ], + ); + } + + /// lane-hbdgates r1: `--enable-restoration=1` at 10 bits. Every earlier + /// bit-depth gate ran `--enable-restoration=0`, which is exactly why two + /// high-bit-depth loop-restoration defects survived to 2026-09-01 + /// (SGR box sums unscaled, Wiener clamp at the 8-bit bound). Same recipe + /// as the 8-bit LR gate, at 10 bits. + #[test] + #[ignore = "lane-hbdgates r1: REAL 10-bit loop-restoration defect. seed 42, frame 0, \ + plane Y, first diff at index 122 (row 0, col 122): ours 351 vs ffmpeg 350, \ + on a stream where lr_hits=2 (the LR filters did run). 8-bit LR is exact and \ + every earlier 10-bit gate ran --enable-restoration=0, which is why this \ + survived. Un-ignore with the fix; do NOT weaken the gate."] + fn a_real_aomenc_10bit_restoration_stream_decodes_pixel_exact() { + const NAME: &str = "a_real_aomenc_10bit_restoration_stream_decodes_pixel_exact"; + if !have_ffmpeg() { + eprintln!("SKIP {NAME}: no ffmpeg"); + return; + } + if !have_aomenc() { + eprintln!("SKIP {NAME}: no aomenc at {}", aomenc_path().display()); + return; + } + // 192x128 = 3x2 superblocks, so `read_lr` is re-entered per SB + // (the 8-bit LR gate's own trap warning); cq-level=15 because + // aomenc's RD only picks a non-RESTORE_NONE frame type at low cq. + ten_bit_tool_gate( + NAME, + 192, + 128, + 1, + &[ + "--limit=1", + "--kf-max-dist=0", + "--cq-level=15", + "--enable-restoration=1", + "--enable-cdef=0", + "--enable-rect-partitions=0", + "--enable-ab-partitions=0", + "--enable-1to4-partitions=0", + "--enable-filter-intra=0", + "--enable-smooth-intra=0", + "--enable-paeth-intra=0", + "--enable-tx-size-search=0", + "--max-partition-size=32", + "--min-partition-size=16", + "--enable-palette=0", + "--enable-intrabc=0", + "--enable-cfl-intra=0", + "--enable-ref-frame-mvs=0", + ], + &LR_SEEDS, + &[("lr_hits", ten_bit_lr_hits)], + ); + } + + /// Seeds swept by the 10-bit LR gate (the 8-bit gate needs ~40 attempts + /// to land a non-RESTORE_NONE frame; every attempt here still has to + /// decode pixel-exact). + const LR_SEEDS: [u32; 16] = [42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57]; + + /// Wiener + SGR + switchable loop-restoration firings, summed. + fn ten_bit_lr_hits() -> usize { + crate::restoration::wiener_hits() + + crate::restoration::sgrproj_hits() + + crate::restoration::switchable_hits() + } + + /// lane-hbdgates r1: `--enable-rect-partitions=1 --enable-ab-partitions=1` + /// at 10 bits, one intra stream, one counter per tool + /// (`rect_partition_hits`, `partab_hits`) so a stream that only fired the + /// rect arms cannot stand in for AB. + #[test] + fn a_real_aomenc_10bit_rect_and_ab_partitions_decode_pixel_exact() { + const NAME: &str = "a_real_aomenc_10bit_rect_and_ab_partitions_decode_pixel_exact"; + if !have_ffmpeg() { + eprintln!("SKIP {NAME}: no ffmpeg"); + return; + } + if !have_aomenc() { + eprintln!("SKIP {NAME}: no aomenc at {}", aomenc_path().display()); + return; + } + // The 8-bit free-partition/AB recipe, verbatim, at 10 bits: AB + // splits are an INTER dispatch here (intra-frame AB is still a named + // refusal), so the stream needs alt-refs and 24 frames, not one key + // frame. + ten_bit_tool_gate( + NAME, + 64, + 64, + 24, + &[ + "--cq-level=45", + "--kf-max-dist=1000", + "--auto-alt-ref=1", + "--lag-in-frames=16", + "--enable-fwd-kf=0", + "--enable-order-hint=1", + "--enable-warped-motion=1", + "--enable-obmc=1", + "--tune-content=default", + "--enable-masked-comp=0", + "--enable-interintra-comp=0", + "--enable-onesided-comp=0", + "--enable-interintra-wedge=0", + "--enable-smooth-interintra=0", + "--enable-rect-partitions=1", + "--enable-ab-partitions=1", + "--enable-1to4-partitions=0", + "--enable-filter-intra=0", + "--enable-smooth-intra=0", + "--enable-paeth-intra=0", + "--enable-directional-intra=0", + "--enable-angle-delta=0", + "--enable-tx-size-search=0", + "--enable-cdef=0", + "--enable-restoration=0", + "--max-partition-size=32", + "--min-partition-size=16", + "--enable-palette=0", + "--enable-intrabc=0", + "--enable-cfl-intra=0", + "--enable-ref-frame-mvs=0", + ], + &LR_SEEDS, + &[ + ("rect_partition_hits", decode::rect_partition_hits), + ("partab_hits", decode::partab_hits), + ], + ); + } + /// `bit_depth` of the first sequence header in `stream`. fn parsed_bit_depth(stream: &[u8]) -> u8 { let mut probe = Av1Parser::new(); @@ -2147,6 +2441,20 @@ mod tests { height: usize, frames: usize, extra: &[&str], + ) -> Vec { + encode_10bit_gradients_seed(name, 42, width, height, frames, extra) + } + + /// As [`encode_10bit_gradients`], but with the fixture seed exposed -- + /// lane-hbdgates r1 sweeps seeds so a tool that aomenc's RD declines on + /// one fixture still gets a firing stream. + fn encode_10bit_gradients_seed( + name: &str, + seed: u32, + width: usize, + height: usize, + frames: usize, + extra: &[&str], ) -> Vec { let duration = frames as f64 / 25.0; let y4m = Command::new("ffmpeg") @@ -2156,7 +2464,7 @@ mod tests { "-f", "lavfi", "-i", - &gradients_source(42, width, height, &format!("duration={duration}:rate=25")), + &gradients_source(seed, width, height, &format!("duration={duration}:rate=25")), "-pix_fmt", "yuv420p10le", "-strict", @@ -2177,18 +2485,21 @@ mod tests { "{name}: ffmpeg failed to render the 10-bit fixture: {}", String::from_utf8_lossy(&y4m.stderr) ); - let mut args: Vec<&str> = vec![ - "--codec=av1", - "--passes=1", - "--end-usage=q", - "--cq-level=30", + let mut args: Vec<&str> = vec!["--codec=av1", "--passes=1", "--end-usage=q"]; + // lane-hbdgates r1: a caller-supplied `--cq-level` REPLACES the + // default rather than being appended after it -- two `--cq-level` + // flags on one aomenc line is a coin flip on which one lands. + if !extra.iter().any(|a| a.starts_with("--cq-level=")) { + args.push("--cq-level=30"); + } + args.extend_from_slice(&[ "--cpu-used=0", "--threads=1", "--row-mt=0", "--sb-size=64", "--input-bit-depth=10", "--bit-depth=10", - ]; + ]); args.extend_from_slice(extra); args.extend_from_slice(&["--obu", "-o", "-", "-"]); let mut child = Command::new(aomenc_path()) diff --git a/lanes/hbdgates-r1.report.md b/lanes/hbdgates-r1.report.md new file mode 100644 index 00000000..b955ae0f --- /dev/null +++ b/lanes/hbdgates-r1.report.md @@ -0,0 +1,76 @@ +# lane-hbdgates r1 — 10-bit gates for the seven 8-bit-only tools + +His two films are yuv420p10le, so an 8-bit-only gate proves nothing about the streams that +matter. lane-covbd r1 named seven tools positively enabled by an 8-bit gate and by no 10-bit +gate. Six are now closed with real-aomenc 10-bit gates; the seventh (restoration) has its +gate written and it FAILS on a real 10-bit defect. + +## Result table + +| tool | gate | result | first diff | +|---|---|---|---| +| filter-intra | `a_real_aomenc_10bit_intra_tools_stream_decodes_pixel_exact` | PASS, 6/6 attempts pixel-exact, `filter_intra_hits=2` | — | +| smooth-intra | same gate | PASS, `smooth_pred_hits=16` | — | +| paeth-intra | same gate | PASS, `paeth_pred_hits=3` | — | +| intra-edge-filter | same gate | PASS, `intra_edge_filter_hits=22` | — | +| rect-partitions | `a_real_aomenc_10bit_rect_and_ab_partitions_decode_pixel_exact` | PASS, 12/16 attempts pixel-exact (4 named refusals), `rect_partition_hits=32` | — | +| ab-partitions | same gate | PASS, `partab_hits=4` | — | +| restoration | `a_real_aomenc_10bit_restoration_stream_decodes_pixel_exact` | **FAIL — `#[ignore]`d, real 10-bit LR defect** | seed 42, frame 0, plane Y, index 122 (row 0, col 122): ours **351** vs ffmpeg **350**, on a stream where `lr_hits=2` | + +## What changed +- `crates/ec-av1/src/intra.rs` + - `smooth_pred_hits()` / `paeth_pred_hits()` (counted at the top of `predict`) and + `intra_edge_filter_hits()` (counted inside `filter_intra_edge`, strength != 0). + Separate counters per tool on purpose: the pre-existing `smooth_uv_hits` lumps + SMOOTH..=PAETH together, so a paeth-only stream would have "proved" smooth intra + ([[gate-blind-to-feature]]). +- `crates/ec-av1/src/stream.rs` + - `ten_bit_tool_gate(name, w, h, frames, extra, seeds, counters)`: drives one 10-bit + aomenc recipe over a seed sweep, decodes each attempt, pixel-compares EVERY shown + frame against ffmpeg's own 10-bit decode, and sums each tool counter **per attempt, + only over attempts that decoded and compared** (class `counter-from-refused-stream`). + Named decode refusals are tolerated and reported; a pixel mismatch panics with + plane + first-diff index + both values + the per-attempt firing deltas; no SKIP path. + - `encode_10bit_gradients_seed(...)`: the existing helper with the fixture seed exposed; + `encode_10bit_gradients` now delegates with seed 42 (all three prior call sites + unchanged). A caller-supplied `--cq-level` now REPLACES the built-in `--cq-level=30` + instead of being appended after it (two `--cq-level` on one aomenc line is a coin flip). + - the three gates above. +- `crates/ec-av1/src/gate_coverage.rs` + - `gate_bodies()` now (a) drops `#[ignore]`d gates — an ignored gate exercises nothing and + must not close a hole — and (b) recognises gates that spell `--passes=1` inside the + shared 10-bit helpers (`ten_bit_tool_gate` / `encode_10bit_gradients`); `is_ten_bit` + likewise. 45 -> 49 gates parsed, 4 -> 7 of them 10-bit. + - six entries deleted from `NEVER_EXERCISED_10BIT` (filter-intra, smooth-intra, + paeth-intra, intra-edge-filter, rect-partitions, ab-partitions); `enable-restoration` + kept with the failing-gate reason inline. 19 -> 13 holes. + +## Gate commands + results +- `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -- --nocapture --test-threads=1 10bit_intra_tools` + -> `6/6 attempts pixel-exact, filter_intra_hits=2 smooth_pred_hits=16 paeth_pred_hits=3 intra_edge_filter_hits=22` +- `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -- --nocapture --test-threads=1 rect_and_ab` + -> `12/16 attempts pixel-exact, rect_partition_hits=32 partab_hits=4` +- `EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib -- --nocapture --test-threads=1 10bit_restoration` + (run with the `#[ignore]` overridden) -> FAIL, message above. +- `cargo test -p ec-av1 --lib gate_coverage -- --nocapture` -> 5 passed, 0 failed; + `gate_coverage: 49 real-aomenc gates, 7 of them 10-bit`, `NEVER_EXERCISED_10BIT (13 of 26)`. + +EVIDENCE: crates/ec-av1/src/stream.rs (3 new gates) | EC_AV1_REQUIRE_AOMENC=1 cargo test -p ec-av1 --lib | intra-tools 6/6 pixel-exact (4 counters non-zero), rect+ab 12/16 pixel-exact (rect=32 partab=4), 10-bit LR gate fails Y[122] 351 vs 350 with lr_hits=2 + +## Refusals lifted +None — this lane authors gates only; no decode behaviour changed. The rect/ab gate's 4 +non-matching attempts are named refusals reported by the gate, not silenced. + +## Residue +- **fix-now (follow-on lane): the 10-bit loop-restoration defect.** Pinned recipe: + `encode_10bit_gradients_seed(name, 42, 192, 128, 1, ...)` with `--cq-level=15 + --enable-restoration=1 --enable-cdef=0` (full list in the gate). `lr_hits=2` on the + failing stream, so the LR filters ran; the mismatch is one LSB at 10 bits on the very + first row, the shape of an unscaled box sum / an 8-bit clamp bound. Un-ignore the gate + with the fix; do NOT weaken it. lane-hbdinter reports fixes of that shape on its own + branch — if that merges first, re-run this gate before assuming the defect is still open. +- accepted: `enable-angle-delta`, `enable-cfl-intra`, `enable-1to4-partitions`, + `enable-rect-tx`, `enable-tx64`, `enable-flip-idtx`, `enable-global-motion`, + `enable-intrabc`, `enable-dist-wtd-comp`, `enable-dual-filter`, `enable-ref-frame-mvs`, + `enable-superres` remain 10-bit holes — they are holes at 8 bits too (or flag-spelling + aliases), so they belong to the lanes that gate them at all, not to this one.