lane-av1422warp: report -- the two cancelling errors, the fix, and the lift gap
Browse files at this commit739882959602e8319291a8f72955e1a16bc8a753Parent: 73731001 changed file +106 -0
- lanes/av1422warp.report.md +106 -0
lanes/av1422warp.report.mdmodified+106 -0
| @@ -1883,6 +1883,112 @@ fix is provable in one run: the sequence diff must go flat. | |||
| 1883 | 1883 | ||
| 1884 | Not pinned, no gate, refusal untouched. | 1884 | Not pinned, no gate, refusal untouched. |
| 1885 | 1885 | ||
| 1886 | +## Round 32 — FIXED. The stream pairs bit-for-bit; the witness is pinned | ||
| 1887 | + | ||
| 1888 | +`af3285d5`. The 4:2:2 header refusal is **unchanged and unconditional**. | ||
| 1889 | + | ||
| 1890 | +### Round 31's hand-off was one of two errors, and they cancelled | ||
| 1891 | + | ||
| 1892 | +Round 31 pointed at `restoration.rs:519-524`. It was right that the row | ||
| 1893 | +term was wrong, and it was **half** the story. | ||
| 1894 | + | ||
| 1895 | +1. **`read_lr` derived the ROW corners from the COLUMN axis.** libaom's | ||
| 1896 | + `av1_loop_restoration_corners_in_sb` (`restoration.c:1303-1338`) steps | ||
| 1897 | + rows by `MI_SIZE >> subsampling_y` and columns by | ||
| 1898 | + `MI_SIZE >> subsampling_x` — the axes are not symmetric. This decoder | ||
| 1899 | + had one `mi_size = 4 >> subsampling_x` for both, on a base of 4 where | ||
| 1900 | + libaom's `MI_SIZE` is 8. At 4:2:2 (`ss_x` 1, `ss_y` 0) the row range | ||
| 1901 | + came out 4x too small, so `rrow0 == rrow1`: an empty range, zero | ||
| 1902 | + `read_lr_unit` calls, wherever libaom reads a chroma unit. **Those were | ||
| 1903 | + the two missing `wiener_restore_cdf` reads.** | ||
| 1904 | + | ||
| 1905 | +2. **The superblock extent was 2x too large.** `read_sb128_root` passed | ||
| 1906 | + `SB_MI * 2` for the 128x128 superblock, and the two 64px call sites | ||
| 1907 | + carried the same half-mi convention (`sb_r * SB_MI`, extent `SB_MI`). | ||
| 1908 | + | ||
| 1909 | +**`4 * 32 == 8 * 16`: the two errors cancelled exactly at 4:2:0.** That is | ||
| 1910 | +why 4:2:0 and 4:4:4 decoded byte-exact while carrying the bug, and why | ||
| 1911 | +the 4:2:0 evidence was never evidence of correctness here. At 4:2:2 the | ||
| 1912 | +cancellation breaks, because the row term stops following the column axis. | ||
| 1913 | +No amount of 4:2:0 testing could have found this. | ||
| 1914 | + | ||
| 1915 | +A third, smaller correction: the `read_lr` call is the **one** consumer | ||
| 1916 | +that turns a superblock's mode-info origin into *absolute* frame space | ||
| 1917 | +(it divides by the restoration-unit size, a real pixel count), and it was | ||
| 1918 | +handed `(sb_r & !1) * SB_MI` — twice the true mi row, since `sb_r` indexes | ||
| 1919 | +64px superblocks. The partition decode is self-consistent with that value | ||
| 1920 | +(relative offsets only), which is why the 128 path decoded correctly | ||
| 1921 | +everywhere else. The origin is corrected **only** where it is converted | ||
| 1922 | +to absolute frame space; the partition path is untouched. | ||
| 1923 | + | ||
| 1924 | +### Evidence | ||
| 1925 | + | ||
| 1926 | +| check | result | | ||
| 1927 | +|---|---| | ||
| 1928 | +| entropy pairing vs instrumented oracle | **246735 reads each side, no divergence anywhere** | | ||
| 1929 | +| 16 frames vs `aomdec --rawvideo` | **pixel-exact**, 2359296 bytes, sha256 `4bfc2395…aeb203` both sides | | ||
| 1930 | +| 4:2:0 control | byte-exact | | ||
| 1931 | +| 4:4:4 LR witness | byte-identical to its pre-lane decode | | ||
| 1932 | +| both previously pinned 4:2:2 witnesses | pixel-exact | | ||
| 1933 | +| LR gate family | 12/12 | | ||
| 1934 | +| battery: 420/444/inter/superres/cdef | 118 passed, 0 failed, 7 ignored | | ||
| 1935 | + | ||
| 1936 | +The pairing result is the strong one: not "past the window", but **no | ||
| 1937 | +divergence in the whole stream**. | ||
| 1938 | + | ||
| 1939 | +After the first two edits, two committed 4:2:0/4:4:4 LR gates **failed**. | ||
| 1940 | +That is how the 64px call sites' half-mi convention surfaced; fixing them | ||
| 1941 | +is part of this change, not a follow-up. | ||
| 1942 | + | ||
| 1943 | +### Pinned witness and gate | ||
| 1944 | + | ||
| 1945 | +`crates/ec-av1/fixtures/422_residual_compound_warp_16f.obu` — 38845 bytes, | ||
| 1946 | +sha256 `d78e2afb43ce311d3d82335a945c6f80f62db4537966d881c1349a68b3aecb95`, | ||
| 1947 | +fnv1a64 `0x0e73a51e2cc0c424`. Gate | ||
| 1948 | +`the_pinned_422_residual_compound_warp_witness_is_present_and_refuses_by_name`. | ||
| 1949 | + | ||
| 1950 | +The gate is **pin + refuse-by-name**, the established 4:2:2 pattern: with | ||
| 1951 | +the header refusal standing, no committed test *can* decode a 4:2:2 | ||
| 1952 | +stream, because the bypass that would allow it must never be committed. | ||
| 1953 | +The exactness and engagement figures live in the gate's doc comment with | ||
| 1954 | +the encode recipe. Mutation-proven both ways: a flipped fixture byte | ||
| 1955 | +panics `bytes drifted`; a wrong refusal string panics `must refuse by | ||
| 1956 | +name`. | ||
| 1957 | + | ||
| 1958 | +### Engagement, above the vertical midpoint | ||
| 1959 | + | ||
| 1960 | +Every pre-existing warp counter is frame-global, so this adds | ||
| 1961 | +`top_half_warp_hits` and `top_half_compound_hits` (permanent gate | ||
| 1962 | +counters; the throwaway dump and its example wiring were removed): | ||
| 1963 | + | ||
| 1964 | +- **top-half warp 248**, **top-half compound 3** | ||
| 1965 | +- frame-globally: compound_warp 25, compound_warp_8 18, rotzoom_gm_warp | ||
| 1966 | + 84, lr_wiener 22, lr_sgrproj 10, cdef_idx 53, part128_split 95 | ||
| 1967 | + | ||
| 1968 | +The loop-restoration numbers are load-bearing twice: decoding this stream | ||
| 1969 | +is what exposed the corner bug, and the fix is what made the sequence | ||
| 1970 | +pair. | ||
| 1971 | + | ||
| 1972 | +### Refusal-lift assessment — exactness bar MET, coverage NOT yet | ||
| 1973 | + | ||
| 1974 | +Not lifting, and here is the honest gap rather than a clean bill: | ||
| 1975 | + | ||
| 1976 | +- 16 frames of **one** 256x288 stream from **one** encoder recipe; | ||
| 1977 | +- top-half **compound is 3 blocks** — thin, even though top-half warp is | ||
| 1978 | + ample at 248; | ||
| 1979 | +- the code path whose bug we just fixed is *128x128 SB + loop restoration | ||
| 1980 | + + non-4:2:0*. **4:2:2 with loop restoration OFF is still untested**, | ||
| 1981 | + and it is a different range computation again (`av1_lr_count_units` over | ||
| 1982 | + a full-height chroma plane with no units to place). | ||
| 1983 | + | ||
| 1984 | +The old lift-blocker asked for a second 4:2:2 fixture with real residuals, | ||
| 1985 | +compound and warped motion above the vertical midpoint. This is that | ||
| 1986 | +fixture and it is exact. But one more exact stream is not the same as the | ||
| 1987 | +format being covered. **Recommendation: keep the refusal; charter the | ||
| 1988 | +LR-off 4:2:2 witness next**, then re-assess. | ||
| 1989 | + | ||
| 1990 | +Not lifting. Refusal untouched. Nothing pushed. | ||
| 1991 | + | ||
| 1886 | ## Two refuted hypotheses — do not re-chase | 1992 | ## Two refuted hypotheses — do not re-chase |
| 1887 | 1993 | ||
| 1888 | 1. **"libaom ORs the block's OWN `uv_mode` into the edge-filter type."** False. | 1994 | 1. **"libaom ORs the block's OWN `uv_mode` into the edge-filter type."** False. |