From 4b6247dc1423a96d924f10e6bb07c3fb5a4b7f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Mon, 28 Sep 2026 22:02:21 +0300 Subject: [PATCH] docs+ec-av1: lane-av1444rect r5 -- the counters document that they prove reach, not that the fix bites; the retraction derives its length from plane extents Main's two notes, both taken. 1. Both route counters now say in their own doc comments that a non-zero count proves REACH and nothing more, and point at skill://ec-av1-pipeline-gate-counters: a counter needs a DIFFERS-style assertion to carry a claim. The intra-BC one is also recorded as deliberately armed OUTSIDE the own444 expression, so the mutation still increments it and the red lands on the pixel/entropy arm -- what carries the claim is the measured fork move (read 11750 -> 12465, luma first wrong 164416 -> 205264, 455240 -> 390380) and the mutation, not the count. 2. The retraction's re-measurement wrote assert len(ours) == 2 * len(ref). That factor is a coincidence of 4:4:4 against 4:2:0 at the same geometry -- it is the bits-per-sample ratio (our dump_yuv emits u16, the oracle's 8-bit dump is u8) and has nothing to do with chroma, so it is wrong at 4:2:2, at any high bit depth, or on any fixture where the two sides disagree on bit depth. The report now says to derive the expected byte length from the plane extents and the two bit depths and assert the oracle dump against that, never against a copied constant. Also recorded in the method notes: the 636-vs-1086 chroma and 2052-vs-1309 luma unit-count asymmetry from the round-4 census is explicitly NOT claimed as a defect, since luma is pixel-exact to 205264 and the surplus is most likely a counting-shape difference (our var-tx leaves vs libaom's unit walk). --- crates/ec-av1/src/decode.rs | 25 +++++++++++++++++++------ lanes/av1444rect.report.md | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/crates/ec-av1/src/decode.rs b/crates/ec-av1/src/decode.rs index 41e61206..56e94e4d 100644 --- a/crates/ec-av1/src/decode.rs +++ b/crates/ec-av1/src/decode.rs @@ -5508,8 +5508,10 @@ pub(crate) fn intra_rect4_strip_in_inter_hits(shape: usize) -> usize { // coefficient context over the STRIP'S OWN extent instead of the 4:2:0 pair's // (see [`decode_inter_block`]'s `around_c`). `is_chroma_reference` // (av1_common_int.h:1454) is unconditionally true at ss (0,0), so no pair -// exists there; the counter is what keeps a 4:4:4 1:4-strip gate from passing -// vacuously (a 4:2:0 stream of the same content leaves it at 0). +// exists there; the counter keeps a 4:4:4 1:4-strip gate from passing +// vacuously (a 4:2:0 stream of the same content leaves it at 0). It proves +// REACH only, never that the fix bites -- that is the gate's byte compare and +// its mutation, not this count (skill://ec-av1-pipeline-gate-counters). thread_local! { static RECT4_INTER_OWN_CHROMA444_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; } @@ -5526,10 +5528,21 @@ pub(crate) fn reset_rect4_inter_own_chroma444_hits() { RECT4_INTER_OWN_CHROMA444_HITS.with(|c| c.set(0)); } -// lane-av1444rect r2: how many intra-BC 1:4 strips at `ss (0,0)` coded their -// OWN 16x4 / 4x16 chroma plane block instead of the 4:2:0 pair's 8x4 (see -// [`decode_rect4_16_intrabc`]'s `own444`). A 4:2:0 / 4:2:2 stream of the same -// recipe leaves it at 0, which is what makes it the 4:4:4-only route. +// lane-av1444rect r2: how many intra-BC 1:4 strips at `ss (0,0)` took the +// own-chroma arm of [`decode_rect4_16_intrabc`]'s `own444`. A 4:2:0 / 4:2:2 +// stream of the same recipe leaves it at 0, which is what makes it the +// 4:4:4-only route. +// +// WHAT THIS COUNTER IS NOT: it is NOT evidence that the fix bites, and it +// never was. A route counter fires identically before and after a change that +// changes nothing downstream, so a non-zero count proves REACH and nothing +// more. On this lane it is also armed deliberately OUTSIDE the `own444` +// expression, so that the mutation (`own444 = false`) still increments it and +// the red comes from the pixel/entropy arm instead. The evidence that the ss +// gate bites is the measured fork move -- first entropy fork read 11750 -> +// 12465, luma first wrong sample 164416 -> 205264, 455240 -> 390380 total -- +// not this count. See skill://ec-av1-pipeline-gate-counters: a counter needs +// a DIFFERS-style assertion to carry a claim. thread_local! { static INTRABC_RECT4_OWN_CHROMA444_HITS: std::cell::Cell = const { std::cell::Cell::new(0) }; } diff --git a/lanes/av1444rect.report.md b/lanes/av1444rect.report.md index 7a398f0e..6fb93dbc 100644 --- a/lanes/av1444rect.report.md +++ b/lanes/av1444rect.report.md @@ -190,6 +190,16 @@ clamp on a 4:4:4 chroma TX_32X64 is still the prime suspect. Re-measured here to prove the class claim above: H2's numbers are bit-identical before and after, so this fix neither caused nor cured it. +> **Derive the length, do not copy the multiplier.** The re-measurement +> below writes `assert len(ours) == 2 * len(ref)`. That factor is a +> **coincidence of 4:4:4 against 4:2:0 at the same geometry** — our `dump_yuv` +> emits `u16` per sample while the oracle's 8-bit dump is `u8`, so the factor is +> the bits-per-sample ratio and has nothing to do with chroma. At 4:2:2, at a +> high bit depth, or on any fixture where the two sides do not agree on bit +> depth, `2 *` is simply wrong. Compute the expected byte length from the plane +> extents and the two bit depths (and assert the oracle's dump length against +> that, not against a constant) before comparing anything. + **H3: RETRACTED — my first claim was void, Agent142-2's measurement stands.** I reported this stream "byte-exact 6/6". It is not. My throwaway compare script hardcoded the frame geometry to 128x96 (the H1 fixture's) and @@ -386,6 +396,15 @@ other fired 4800 msac bits away. ## 8. Method notes for the next lane +- **A route counter is not proof a fix bites.** This lane learned it the hard + way: a counter can fire identically before and after a change that changes + nothing downstream, so a non-zero count proves REACH and nothing more. Both + counters this lane added carry that warning in their own doc comment, and + the intra-BC one is deliberately armed OUTSIDE the `own444` expression so the + mutation still increments it and the red lands on the pixel/entropy arm + instead. What carries the claim is the measured fork move and the mutation + red. Rule now in skill://ec-av1-pipeline-gate-counters: a counter needs a + DIFFERS-style assertion before it can carry a claim. - `testsrc2` is time-parameterised: any sweep recipe quoting it must pin `rate`, or the fixture is not reproducible. `rate=1` vs `rate=25` on 128x96 yuv444p is the difference between an 8121-byte exact stream and