forge
Explore
Log in

Don't you dare go Hollow

lane-av1422warp: report -- round 33 rework, and 248 retracted

Browse files at this commit

d976c2b70e0d339cd0a6fbad9bb61d2b8c1d1578Ahmet Kaan GümüşParent: 4e1fb23
Records the five reviewer findings and what each cost. Two were real
defects the round-32 evidence had hidden: the OBMC pair-merge snap was
clamped on the snapped INDEX rather than the reported offset, and the
top-half warp census omitted is_globalmv && side >= 8.

Retracts 248. The corrected upper-half figure is 3 warp and 3 compound;
248 came from a counter testing only the global-motion model term and so
counted blocks that are not global-mv blocks. The gate doc comment and the
lift section are corrected with it. Frame-global figures unchanged.

Also records that no stream in the corpus exercises the OBMC snap branch
(a1.obu's 1338 traced neighbours are identical before and after the fix),
which is why the new unit gate exists; that the snapshot tuple is usize so
libaom's -1 is carried as 0; and that neither top-half accessor has, or
can have, a committed reader while the refusal stands.

Rewrites Verdict, the summary table, the lift section and State to the
final state: 16/16 pixel-exact, entropy 246735/246735 paired, fixture
pinned with its gate, refusal KEPT on the LR-off / second-recipe / thin-
engagement grounds. Per-round sections stay as dated history.
lanes/av1422warp.report.mdmodified+155 -30
@@ -1,4 +1,4 @@
1-# lane-av1422warp — second 4:2:2 coverage witness: one crash fixed, one edge-filter reference fixed, one transform-size defect localized
1+# lane-av1422warp — the second 4:2:2 coverage witness: stream pixel-exact 16/16, fixture pinned, refusal KEPT
22
33 Base `a7d22aec`, worktree `~/.cache/wt/av1422warp`, branch `lane-av1422warp`, no
44 push. Target dir `$HOME/.cache/cargo-target-av1422warp`.
@@ -6,31 +6,40 @@ push. Target dir `$HOME/.cache/cargo-target-av1422warp`.
66 ## Verdict
77
88 The charter asked for a pixel-exact 4:2:2 stream with real residuals, compound
9-and warped motion above the vertical midpoint. **The stream is not pixel-exact**,
10-so it is NOT pinned and no coverage gate was written — a gate over a non-exact
11-stream is a false claim. What it bought is two real 4:2:2 defects fixed (one a
12-decode-blocking panic) and a third localized to a single desync window and handed
13-off with paired dumps. The sequence-header refusal **stays**.
14-
15-| commit | defect | before | after |
9+and warped motion above the vertical midpoint. **It is pixel-exact**: all 16
10+frames match `aomdec --rawvideo` byte for byte, and the entropy stream pairs
11+246735-for-246735 against the instrumented oracle with no divergence anywhere.
12+The fixture is **pinned** and a **coverage gate is committed**. The
13+sequence-header refusal **stays** — see the lift section, which sets out why
14+"exact" and "covered" are not the same bar.
15+
16+| commit | what it settles | before | after |
1617 |---|---|---|---|
18+| `af3285d5` | **the lift-blocker fix**: `read_lr` stepped the row axis by the COLUMN axis's term, and the superblock extent was 2x too large — the two cancelled exactly at 4:2:0, so 4:2:0/4:4:4 decoded byte-exact while carrying the bug | first divergence at symbol 107517; 16 frames non-exact | **246735/246735 paired, 16/16 pixel-exact** |
1719 | `4579d209` | OBMC strides the 4:2:2 chroma prediction with the square `chroma_side` | 0 frames decoded (panic) | 16/16 decode |
1820 | `a9611ea2` | chroma-above neighbour read one mi column left of libaom's | frame 0 PREFILT 56142 diffs | 53395 diffs; first divergent block byte-exact |
21+| `a4532a41` → superseded | the OBMC pair-merge snap was clamped on the INDEX rather than the reported offset (reviewer P2) | read one column right of libaom, then skipped `mi_col + 1` | snap unconditional, offset saturates |
22+
23+## Pinned, and the gate
1924
20-## The stream (throwaway, `~/.cache/av1422warp/`, not committed)
25+`crates/ec-av1/fixtures/422_residual_compound_warp_16f.obu` — 38845 B, sha256
26+`d78e2afb43ce311d3d82335a945c6f80f62db4537966d881c1349a68b3aecb95`, fnv1a64
27+`0x0e73a51e2cc0c424`. Gate
28+`the_pinned_422_residual_compound_warp_witness_is_present_and_refuses_by_name`
29+— pin plus refuse-by-name, the established 4:2:2 pattern, because with the
30+header refusal standing no committed test *can* decode a 4:2:2 stream. It is
31+mutation-proven both ways (flipped fixture byte panics `bytes drifted`; wrong
32+refusal string panics `must refuse by name`).
2133
22-- `a1.obu` 38845 B, sha256 `d78e2afb43ce311d3d82335a945c6f80f62db4537966d881c1349a68b3aecb95`
34+## The stream (source recipe; the fixture is now committed)
35+
36+- pinned `a1.obu` 38845 B, sha256 `d78e2afb43ce311d3d82335a945c6f80f62db4537966d881c1349a68b3aecb95`
2337 - source `src422.y4m` sha256 `4d35eaf65d1a5541b3177e1183644c163b3868d8f141bed0ce9fdf833280ba9f`
2438 - 4:2:0 control `a420.obu` sha256 `1f43ef1ace6f7fa2f38c2deff765dd0bc529cbf7432788c736c7261350525e5b`
2539
26-```
27-ffmpeg -f lavfi -i "mandelbrot=size=256x288:rate=24:maxiter=220:start_scale=3:end_scale=0.35:end_pts=300,rotate=a=0.10*t:c=none:ow=256:oh=288" \
28- -frames:v 24 -pix_fmt yuv422p -f yuv4mpegpipe src422.y4m
29-aomenc --codec=av1 --profile=2 --input-bit-depth=8 --limit=16 --width=256 --height=288 \
30- --lag-in-frames=25 --auto-alt-ref=1 --enable-global-motion=1 --cq-level=24 \
31- --cpu-used=0 --threads=4 --kf-min-dist=0 --kf-max-dist=99999 -o a1.webm src422.y4m
32-ffmpeg -i a1.webm -c:v copy -f obu a1.obu
33-```
40+Measured against `aomdec --rawvideo`: 2359296 bytes, sha256
41+`4bfc2395e5ca6ea178f606e6b1ced773e26fc2d85bc3a6cdb63a402939aeb203` on both
42+sides.
3443
3544 Rotzoom mandelbrot is lane-av1gwarp12's lever (a similarity transform is exactly
3645 the family the 4-parameter ROTZOOM model expresses); `lag-in-frames=25` plus
@@ -1989,6 +1998,84 @@ LR-off 4:2:2 witness next**, then re-assess.
19891998
19901999 Not lifting. Refusal untouched. Nothing pushed.
19912000
2001+## Round 33 — reviewer rework, five findings
2002+
2003+All five accepted. Two were real defects the round-32 evidence had hidden, and
2004+one of those two invalidates a number this report had already published.
2005+
2006+### P2 (a4532a41) — the OBMC snap was clamped on the wrong value
2007+
2008+`overlappable_above` / `overlappable_left` snapped the pair index with
2009+`& !1` and then clamped the **snapped index** to `mi_col`/`mi_row` to stop the
2010+reported offset underflowing. libaom (`obmc.h:44-46`) does the snap
2011+unconditionally and reads at `snap + 1`; only the *reported* offset
2012+(`above_mi_col - mi_col`) is negative, and it feeds
2013+`av1_setup_build_prediction_by_above_pred` while the **read** feeds
2014+`above_filter.get(mi_col + src4)` and the `MiInfo` itself. So the clamp
2015+silenced the underflow and, in exchange, read the neighbour one column RIGHT
2016+of libaom's and then stepped past `mi_col + 1` entirely.
2017+
2018+Both sites now keep the snap unconditional and clamp only the offset
2019+(`col.saturating_sub(mi_col)`, `row.saturating_sub(mi_row)`). Note the
2020+representability point, because it is a real (if small) residual: the tuple is
2021+`usize`, so libaom's `-1` is carried as `0`.
2022+
2023+**New gate** `the_obmc_pair_merge_snap_reads_libaoms_neighbour_not_one_to_the_right`
2024+pins the snapped READ with a synthetic grid carrying distinguishable
2025+neighbours at the pair's even half, its odd half, and the column to the right.
2026+Mutation-proven: restoring the old clamp on the column fails with
2027+`left: (30, 30)`, restoring it on the row fails with `left: (30, 30) /
2028+right: (20, 20)`. The test is necessary because **no stream in the corpus
2029+exercises this branch** — a1.obu's 1338 traced OBMC neighbours are identical
2030+before and after the fix, because its 4-wide pair never starts on an odd edge.
2031+
2032+### P2 (msac.rs:448) — hot-path env lookup
2033+
2034+`SymbolDecoder::symbol` called `std::env::var_os("EC_SYMR")` on **every symbol
2035+read of every stream**, production formats included. Now
2036+`crate::envflags::env_flag!("EC_SYMR")` (one `LazyLock<bool>` per call site, the
2037+`ecdump_armed` precedent at msac.rs:1059). Proved byte-identical: the same
2038+build with `var_os` and with `env_flag!` produces identical 246735-line
2039+`EC_SYMR` traces.
2040+
2041+### P3 — `MI_SIZE` doc (restoration.rs)
2042+
2043+The constant's doc claimed "`MI_SIZE` (aom_scale.h): pixels per mode-info
2044+unit". libaom's `MI_SIZE` is **4** (`av1/common/enums.h:39-40`,
2045+`1 << MI_SIZE_LOG2`, `MI_SIZE_LOG2 2`) and lives in `enums.h`, not
2046+`aom_scale.h`. The constant is renamed `MI_SIZE_8PX` and both its doc and
2047+`read_lr`'s are restated in 8-pixel terms, with the reason the value is
2048+double libaom's (its `denom` is a pixel count, so its numerator and
2049+denominator already sit on opposite scales) and the paired trace named as the
2050+authority. The rename exists so nobody "corrects" it back to 4.
2051+
2052+### P3 (finding 5) — the top-half census was an upper bound, and 248 was wrong
2053+
2054+`top_half_warp_hits` incremented on "either slot's global-motion model >
2055+TRANSLATION" alone, omitting `is_globalmv && side >= 8`, so it counted blocks
2056+that are not global-mv blocks. It now increments on `is_global_mv0 ||
2057+is_global_mv1`, the same predicates libaom's `is_global_mv_block` uses, with
2058+the census moved below their definition.
2059+
2060+**The corrected upper-half figure is 3, not 248** (compound stays 3). The
2061+frame-global numbers are unchanged: compound_warp 25, compound_warp_8 18,
2062+rotzoom_gm_warp 84, lr_wiener 22, lr_sgrproj 10, cdef_idx 53, part128_split
2063+95. The gate doc comment and the lift section are corrected; the earlier 248
2064+was never a count of anything real.
2065+
2066+Both accessors' `#[allow(dead_code)]` comments claimed they were "read only
2067+from the `#[cfg(test)]` gates" / "read by the pinned 4:2:2 coverage gate".
2068+**Neither has a committed reader and none can**, for the same reason the gate
2069+cannot decode: the header refusal stands. Both docs now say that plainly.
2070+
2071+### P2 (report headline)
2072+
2073+Verdict, summary table, lift section and State rewritten to the final state:
2074+16/16 pixel-exact, fixture pinned with its gate, refusal KEPT with the
2075+LR-off / second-recipe reasoning. Per-round sections are left as history, so
2076+the report still contains the superseded 248 and the earlier non-exact
2077+verdict — they are dated by round, and the top of the file is the truth.
2078+
19922079 ## Two refuted hypotheses — do not re-chase
19932080
19942081 1. **"libaom ORs the block's OWN `uv_mode` into the edge-filter type."** False.
@@ -2008,14 +2095,37 @@ each variant of the smooth-type resolution: committed neighbours-only 56142;
20082095 own-mode OR'd in 62175; chroma range `8..=10` 63624; range `7..=10` 63624;
20092096 `7..=10` plus own mode 64759. All strictly worse than the committed form.
20102097
2011-## Refusal-lift bar: NOT met
2012-
2013-Beyond the stream still being non-exact, the charter's other precondition is
2014-unproven: compound and warped motion above the vertical midpoint has not been
2015-measured on a pixel-exact 4:2:2 stream, because there is not one. The stream
2016-does open the OBMC-chroma and chroma-edge-filter defects, which no prior 4:2:2
2017-fixture reached — that is real coverage progress, and it is not the same thing as
2018-the bar.
2098+## Refusal-lift bar: NOT met — exactness is not coverage
2099+
2100+The old blocker ("a second 4:2:2 fixture with real residuals, compound and
2101+warped motion above the vertical midpoint would justify lifting") is now
2102+**discharged as written**: that fixture exists, and it is exact. The refusal
2103+still stays, on three grounds that a second exact stream does not answer.
2104+
2105+1. **The top-half engagement is thin, and smaller than it first looked.**
2106+ Measured with the census gated on libaom's actual `is_global_mv_block`
2107+ (reviewer P3 corrected this — see below), the upper half carries **3**
2108+ global-mv blocks and **3** `GLOBAL_GLOBALMV` compound blocks. An earlier
2109+ figure of 248 came from a counter that tested only the global-motion model
2110+ term and so counted every block with a non-`TRANSLATION` model on either
2111+ slot, global-mv or not; it was an upper bound, not engagement. The
2112+ frame-global figures are ample (25 compound-warp, 18 compound-warp 8x8
2113+ leaf, 84 rotzoom global-warp) but they are not the charter's
2114+ above-the-midpoint condition.
2115+2. **One stream, one recipe.** Everything rests on a single 256x288 mandelbrot
2116+ encode. A second independent encoder recipe would test the decoder against
2117+ a different partitioning and motion-field structure rather than re-testing
2118+ the same one.
2119+3. **The path just fixed is still only half-covered.** What `af3285d5` repaired
2120+ is *128x128 superblock + loop restoration + non-4:2:0*. **4:2:2 with loop
2121+ restoration OFF** is untested, and it is a different range computation
2122+ again (`av1_lr_count_units` over a full-height chroma plane with no units to
2123+ place). A refusal lifted on the strength of the stream that found the bug
2124+ would be lifting on the stream's own blind spot.
2125+
2126+**Recommendation: keep the refusal; charter the LR-off 4:2:2 witness next,
2127+then a second encoder recipe, then re-assess.** The lift decision should not be
2128+made in the same round that fixed the bug the stream was built to find.
20192129
20202130 ## Known unresolved
20212131
@@ -2030,7 +2140,22 @@ the bar.
20302140
20312141 ## State
20322142
2033-Two commits on `lane-av1422warp`, no push. Worktree clean; the
2034-`EC_AV1_ALLOW_422_PROBE` bypass is reverted and in neither commit. All
2035-instrumentation (`EC_FULLDUMP`, `EC_FDSTR`, the `OOB_BLEND_*` bounds rungs) was
2036-removed before the commits. No suite run on this branch — Main's job.
2143+44 commits on `lane-av1422warp`, no push. Worktree clean; the
2144+`EC_AV1_ALLOW_422_PROBE` bypass is reverted and in no commit. All temporary
2145+instrumentation was removed except what is documented above as a permanent
2146+gate counter or as the `EC_SYMR` trace.
2147+
2148+Final state, for the server suite:
2149+
2150+- **pixel-exact**: 16/16 frames vs `aomdec --rawvideo`; entropy pairs
2151+ 246735-for-246735 with no divergence anywhere in the stream.
2152+- **identity**: 4:2:0 control byte-exact, 4:4:4 LR witness byte-identical to
2153+ its pre-lane decode, both previously pinned 4:2:2 witnesses pixel-exact, LR
2154+ gate family 12/12, OBMC family 9/9, scoped battery (420/444/inter/superres/
2155+ cdef) 118 passed / 0 failed / 7 ignored.
2156+- **pinned**: `422_residual_compound_warp_16f.obu` with its gate.
2157+- **refusal**: UNCHANGED and unconditional. The bypass is not committed.
2158+
2159+Known unresolved, carried forward: the left chroma reference row term
2160+(`+ss_y`, libaom `av1_common_int.h:1400-1401`) is still not shipped, for the
2161+reason given above.