Merge lane-av1-decode: pin today's first real-stream stop (monochrome key frame)
Browse files at this commit2 changed files +376 -0
- crates/ec-av1/src/stream.rs +78 -0
- lanes/av1decode.report.md +298 -0
crates/ec-av1/src/stream.rsmodified+78 -0
| @@ -2016,6 +2016,84 @@ pub(crate) mod tests { | |||
| 2016 | ); | 2016 | ); |
| 2017 | } | 2017 | } |
| 2018 | 2018 | ||
| 2019 | + /// lane-av1-decode (pilot resume, 2026-09-19): a real libaom MONOCHROME key | ||
| 2020 | + /// frame is currently REFUSED BY NAME, and this gate pins that as today's | ||
| 2021 | + /// measured first stop for a real encoder stream. | ||
| 2022 | + /// | ||
| 2023 | + /// The parked lane's first wall (64x64 superblock-level partition arms) is | ||
| 2024 | + /// ALREADY CLOSED on this tree (both user films decode byte-exact; the | ||
| 2025 | + /// SB-level HORZ/VERT/AB/1:4 arms are witness-gated), so the re-measurement | ||
| 2026 | + /// this gate belongs to had to find where a real stream stops TODAY. A | ||
| 2027 | + /// `-pix_fmt gray` encode of the crate's own fixture recipe does. | ||
| 2028 | + /// | ||
| 2029 | + /// Root cause (localised with `EC_TRACE_MODE_STEP` on the instrumented | ||
| 2030 | + /// aomdec oracle vs this decoder, both over the same OBU): on the mono | ||
| 2031 | + /// stream ours reads `angle_uv` at `rng=50996`, while aomdec reads NO | ||
| 2032 | + /// `uv_mode`/`angle_uv` at all (the guard below); the first divergence at | ||
| 2033 | + /// `(0,0)` is aomdec reading `tx_depth ctx=0 cat=1` (`rng=43616`) where | ||
| 2034 | + /// ours reads a `uv_mode` (val=13). libaom's | ||
| 2035 | + /// `decodemv.c` guards that read with | ||
| 2036 | + /// `if (!cm->seq_params->monochrome && xd->is_chroma_ref)`: a monochrome | ||
| 2037 | + /// frame codes NO `uv_mode`/`cfl`/`angle_delta_uv`/`palette_uv` at all, | ||
| 2038 | + /// while this decoder's block layer has no `num_planes`/monochrome notion | ||
| 2039 | + /// and reads them for every block. That is the whole desync; the | ||
| 2040 | + /// "a Golomb tail longer than this decoder reads" refusal is the SYMPTOM | ||
| 2041 | + /// (the reader is left mid-symbol), not the defect -- which is why that | ||
| 2042 | + /// string's PROVEN claim ("read_golomb_reads_every_value_a_conformant_stream_can_carry") | ||
| 2043 | + /// does not contradict this gate. | ||
| 2044 | + /// | ||
| 2045 | + /// The twin 4:2:0 encode of the SAME source and recipe decodes, so this is | ||
| 2046 | + /// a monochrome defect and not a recipe defect. When monochrome decode | ||
| 2047 | + /// lands, flip this gate to a witness (decode BOTH twins pixel-exact | ||
| 2048 | + /// against ffmpeg); the refusal string is the tripwire. | ||
| 2049 | + #[test] | ||
| 2050 | + fn a_real_libaom_monochrome_key_frame_is_refused_by_name() { | ||
| 2051 | + const NAME: &str = "a_real_libaom_monochrome_key_frame_is_refused_by_name"; | ||
| 2052 | + const REFUSAL: &str = "a Golomb tail longer than this decoder reads"; | ||
| 2053 | + if !have_ffmpeg() { | ||
| 2054 | + eprintln!("SKIP {NAME}: no ffmpeg"); | ||
| 2055 | + return; | ||
| 2056 | + } | ||
| 2057 | + let emit = |pix: &str| -> Vec<u8> { | ||
| 2058 | + let out = Command::new("ffmpeg") | ||
| 2059 | + .args([ | ||
| 2060 | + "-v", "error", "-f", "lavfi", "-i", | ||
| 2061 | + "testsrc2=size=320x240:rate=30:duration=2", "-pix_fmt", pix, | ||
| 2062 | + "-c:v", "libaom-av1", "-cpu-used", "8", "-b:v", "300k", "-f", "obu", "-", | ||
| 2063 | + ]) | ||
| 2064 | + .stdin(Stdio::null()) | ||
| 2065 | + .stdout(Stdio::piped()) | ||
| 2066 | + .stderr(Stdio::piped()) | ||
| 2067 | + .output() | ||
| 2068 | + .expect("ffmpeg failed to run"); | ||
| 2069 | + assert!( | ||
| 2070 | + out.status.success(), | ||
| 2071 | + "{NAME}: ffmpeg ({pix}) failed: {}", | ||
| 2072 | + String::from_utf8_lossy(&out.stderr) | ||
| 2073 | + ); | ||
| 2074 | + out.stdout | ||
| 2075 | + }; | ||
| 2076 | + // CONTROL: the identical recipe at 4:2:0 decodes -- so the refusal below | ||
| 2077 | + // is about monochrome, not about the source or the encoder settings. | ||
| 2078 | + let twin = decode_stream(&emit("yuv420p")).expect("the 4:2:0 twin must decode"); | ||
| 2079 | + assert!(!twin.is_empty(), "{NAME}: the 4:2:0 twin decoded no frames"); | ||
| 2080 | + let err = decode_stream(&emit("gray")) | ||
| 2081 | + .err() | ||
| 2082 | + .map(|e| e.to_string()) | ||
| 2083 | + .unwrap_or_else(|| { | ||
| 2084 | + panic!("{NAME}: the monochrome stream now decodes -- flip this gate to a witness") | ||
| 2085 | + }); | ||
| 2086 | + assert!( | ||
| 2087 | + err.contains(REFUSAL), | ||
| 2088 | + "{NAME}: the monochrome stream stopped without the measured refusal \ | ||
| 2089 | + {REFUSAL:?} -- the desync moved; re-measure before trusting this gate. got: {err}" | ||
| 2090 | + ); | ||
| 2091 | + eprintln!( | ||
| 2092 | + "{NAME}: 4:2:0 twin {} frames, monochrome refused by name ({REFUSAL})", | ||
| 2093 | + twin.len() | ||
| 2094 | + ); | ||
| 2095 | + } | ||
| 2096 | + | ||
| 2019 | /// lane-t900 r25: the refusal "a frame OBU with no tile group" names a | 2097 | /// lane-t900 r25: the refusal "a frame OBU with no tile group" names a |
| 2020 | /// shape the parser cannot hand [`decode_stream`]. | 2098 | /// shape the parser cannot hand [`decode_stream`]. |
| 2021 | /// | 2099 | /// |
lanes/av1decode.report.mdadded+298 -0
| @@ -0,0 +1,298 @@ | |||
| 1 | +# lane-av1-decode (pilot resume) — the parked first wall is already closed; today's first stop is monochrome | ||
| 2 | + | ||
| 3 | +Base: `main` **79984549** (2026-09-19). Worktree `edith_codecs-av1dec`, branch | ||
| 4 | +`lane-av1-decode`, `CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1dec` (private). | ||
| 5 | +Gate: `cargo test -p ec-av1` (lib). No push. | ||
| 6 | + | ||
| 7 | +## TL;DR | ||
| 8 | + | ||
| 9 | +The charter's first wall — **64x64 superblock-level partition arms beyond | ||
| 10 | +NONE/SPLIT in the intra tile path** — is **ALREADY CLOSED on `main`**. It was | ||
| 11 | +built by lanes `sbpart`/`part32`/`sb128*`/`t900` in the three weeks the parked | ||
| 12 | +numbers describe, and it is not only un-refused: it is **witness-gated by seven | ||
| 13 | +real-aomenc pixel-exact gates**, and both user films decode **byte-exact** past | ||
| 14 | +every offset where the parked lane stopped. | ||
| 15 | + | ||
| 16 | +So the honest pilot result is a **re-measurement that redirects the resume**, not | ||
| 17 | +a code un-refusal of an arm that no longer exists. This report gives: | ||
| 18 | + | ||
| 19 | +1. the baseline re-measurement (parked vs today, both films), | ||
| 20 | +2. decisive proof the named wall is down, | ||
| 21 | +3. the walls that a real stream **does** stop on TODAY, root-caused, | ||
| 22 | +4. the ordered terrain map for the next wave, and | ||
| 23 | +5. one committed regression gate pinning today's measured first stop. | ||
| 24 | + | ||
| 25 | +**Distance advanced (parked → today):** `main` today decodes **100% of both films | ||
| 26 | +byte-exact at every probed offset**; at the parked tip (`3808cf8`, 2026-08-30) | ||
| 27 | +both films stopped early (ReelC at a superblock-level HORZ/VERT strip with a split | ||
| 28 | +transform; ReelB at a superblock-level partition). The refusal inventory | ||
| 29 | +shrank from **47** (41 REFUSALS + 6 CAPABILITY_CLAIMS) to **37** | ||
| 30 | +(36 REFUSALS + 1 CAPABILITY_CLAIM). The refusal-scan parser reproduces the parked | ||
| 31 | +**47** exactly, so the earlier "35 (34 + 1)" figure was a miscount. | ||
| 32 | + | ||
| 33 | +## 1. Baseline re-measurement (main 79984549) | ||
| 34 | + | ||
| 35 | +Harness: `decode_probe` (release) over OBU windows extracted with | ||
| 36 | +`ffmpeg -ss <s> -t <d> -i <film> -c:v copy -an -f obu`, run under | ||
| 37 | +`systemd-run --user --scope -p MemoryMax=8G`. Byte-exactness compares the probe's | ||
| 38 | +`EC_PROBE_OUT16` stream against `ffmpeg -pix_fmt yuv420p10le -f rawvideo` over the | ||
| 39 | +same OBU (`sha256` + per-frame numpy diff). Film paths come from the environment | ||
| 40 | +only; never committed. | ||
| 41 | + | ||
| 42 | +### Film A — 1920x792 10-bit, 128x128 superblocks (the parked lane's "ReelC") | ||
| 43 | + | ||
| 44 | +Refusal scan: **21 windows** (ss 300, 900, …, 12300; 2 s each) → **every one | ||
| 45 | +`OK`, 0 refusals** (parked tip: stopped at the SB-level HORZ/VERT split | ||
| 46 | +transform). | ||
| 47 | + | ||
| 48 | +Byte-exact windows (probe `EC_PROBE_OUT16` sha256 vs ffmpeg `yuv420p10le`): | ||
| 49 | + | ||
| 50 | +| ss | frames | probe hw | ffmpeg hw | differing | | ||
| 51 | +|---|---|---|---|---| | ||
| 52 | +| 0 | 72 | c0b84add535d4016 | c0b84add535d4016 | 0 | | ||
| 53 | +| 2700 | 290 | b788fdf9a0429a68 | b788fdf9a0429a68 | 0 | | ||
| 54 | +| 5400 | 273 | 19ea55ea5cde528e | 19ea55ea5cde528e | 0 | | ||
| 55 | +| 8100 | 95 | c6e9aeead5fbc701 | c6e9aeead5fbc701 | 0 | | ||
| 56 | +| 9000 | 261 | e7859bba900fb35e | e7859bba900fb35e | 0 | | ||
| 57 | +| 9900 | 175 | c852aaa1cd2ab28f | c852aaa1cd2ab28f | 0 | | ||
| 58 | +| 11700 | 169 | 8d1a6aaa64d2fd2f | 8d1a6aaa64d2fd2f | 0 | | ||
| 59 | + | ||
| 60 | +(ss 8100 and 9000 refused outright on the parked lane's descendant `lane-t900` — | ||
| 61 | +they are byte-exact here.) | ||
| 62 | + | ||
| 63 | +### Film B — 3840x1608 10-bit HDR (the parked lane's "ReelB") | ||
| 64 | + | ||
| 65 | +Refusal scan: **30 windows** (ss 300, 900, …, 17700; 2 s each) → **every one | ||
| 66 | +`OK`, 0 refusals**. | ||
| 67 | + | ||
| 68 | +Byte-exact windows (13 offsets: 300, 900, 1500, 2100, 2700, 3300, 3900, 4500, | ||
| 69 | +5100, 5700, 6300, 6900, 7500) — **sha256 identical, 0 differing frames each**, | ||
| 70 | +e.g. ss 300 = `79fdd1eb4085bbde` (136 fr), ss 2700 = `773ffa148582d9df` (104 fr), | ||
| 71 | +ss 5700 = `1faf056f15d159fb` (247 fr). | ||
| 72 | + | ||
| 73 | +### Fixture corpus (9 `fixtures/bitstreams/av1-*.ivf` → OBU via ffmpeg) | ||
| 74 | + | ||
| 75 | +| fixture | today | | ||
| 76 | +|---|---| | ||
| 77 | +| av1-1080p-23.976-10bit / -8bit | OK 48 fr | | ||
| 78 | +| av1-1080p-60-10bit / -8bit | OK 120 fr | | ||
| 79 | +| av1-2160p-23.976-8bit | OK 48 fr | | ||
| 80 | +| av1-altref | OK 60 fr | | ||
| 81 | +| av1-profile1-444 | OK 60 fr | | ||
| 82 | +| av1-tiles-1280 | OK 30 fr | | ||
| 83 | +| **av1-monochrome** | **REFUSED** (see §3) | | ||
| 84 | + | ||
| 85 | +## 2. The named wall is down (proof) | ||
| 86 | + | ||
| 87 | +**Code.** `decode_key_frame_tile_with_cdfs` (`crates/ec-av1/src/decode.rs`, | ||
| 88 | +the SB-level `match part` at ~:23978/:24050) has an arm for **all ten** | ||
| 89 | +`partition_w64` values: NONE, SPLIT, HORZ, VERT, HORZ_A|HORZ_B|VERT_A|VERT_B | ||
| 90 | +(`decode.rs:23978`), HORZ_4|VERT_4 (`decode.rs:24073`). The `_ =>` fallback at | ||
| 91 | +`decode.rs:24113` (the string *"a superblock-level partition value outside | ||
| 92 | +PARTITION_NONE..PARTITION_VERT_4"*) is therefore unreachable — pinned by | ||
| 93 | +`every_partition_value_of_an_enumerated_alphabet_has_an_arm`. The inter tile | ||
| 94 | +path carries the same arms (SB-level rect `decode.rs:4709`, AB, 1:4). | ||
| 95 | + | ||
| 96 | +**Witness gates** (real aomenc streams, pixel-exact, in `stream.rs`): | ||
| 97 | + | ||
| 98 | +| gate | line | | ||
| 99 | +|---|---| | ||
| 100 | +| `a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_decodes_pixel_exact` | 28356 | | ||
| 101 | +| `a_real_aomenc_stream_with_a_superblock_level_horz_vert_partition_and_delta_q_decodes_pixel_exact` | 30569 | | ||
| 102 | +| `a_real_aomenc_stream_with_a_superblock_level_ab_partition_decodes_pixel_exact` | 30341 | | ||
| 103 | +| `a_real_aomenc_stream_with_a_superblock_level_1to4_partition_decodes_pixel_exact` | 30800 | | ||
| 104 | +| `a_real_aomenc_inter_sequence_with_a_superblock_level_rect_partition_decodes_pixel_exact` | 12111 | | ||
| 105 | +| `a_real_aomenc_sb128_gathered_edge_horz_partition_decodes_pixel_exact` | 27435 | | ||
| 106 | +| `a_real_aomenc_sb128_ab_partition_at_the_128_root_decodes_pixel_exact` | 27803 | | ||
| 107 | + | ||
| 108 | +**Independent re-derivation (this lane).** The aomenc recipe the parked lane | ||
| 109 | +recorded (`--sb-size=64 --min-partition-size=32 --max-partition-size=64 | ||
| 110 | +--enable-rect-partitions=1 --enable-ab-partitions=0 --enable-1to4-partitions=0` | ||
| 111 | +on a `gradients`+`testsrc2` blend) reproduces `TRACE partition_w64` at the SB | ||
| 112 | +root with values **2 (VERT), 3 (SPLIT), 4 (HORZ_A), 7 (VERT_B)**; the stream | ||
| 113 | +decodes 16/16 frames and the probe's low byte equals `aomdec --rawvideo` | ||
| 114 | +**byte-identical** (`cmp` IDENTICAL, 589824 B). Repro: | ||
| 115 | + | ||
| 116 | +``` | ||
| 117 | +ffmpeg -f lavfi -i gradients=size=192x128:rate=4:duration=4 \ | ||
| 118 | + -f lavfi -i testsrc2=size=192x128:rate=4:duration=4 \ | ||
| 119 | + -filter_complex "[0:v][1:v]blend=all_mode=overlay" -pix_fmt yuv420p -f yuv4mpegpipe in.y4m | ||
| 120 | +aomenc --codec=av1 --passes=1 --end-usage=q --cq-level=45 --cpu-used=0 --threads=1 --row-mt=0 \ | ||
| 121 | + --sb-size=64 --enable-rect-partitions=1 --enable-ab-partitions=0 --enable-1to4-partitions=0 \ | ||
| 122 | + --min-partition-size=32 --max-partition-size=64 --enable-restoration=0 --enable-palette=0 \ | ||
| 123 | + --deltaq-mode=0 --enable-filter-intra=0 --enable-cfl-intra=0 --enable-intrabc=0 --obu -o sb64.obu in.y4m | ||
| 124 | +EC_AV1_TRACE=1 decode_probe sb64.obu # TRACE partition_w64 ... value=2/3/4/7 | ||
| 125 | +``` | ||
| 126 | + | ||
| 127 | +**Films.** Both films decode byte-exact at every probed offset with the SB-level | ||
| 128 | +arms firing — the strongest possible "un-refused with byte-exact proof". | ||
| 129 | + | ||
| 130 | +Conclusion: there is **nothing to un-refuse** here and no honest "distance" to | ||
| 131 | +add — the resume must redirect. | ||
| 132 | + | ||
| 133 | +## 3. Walls a real stream stops on TODAY (root-caused) | ||
| 134 | + | ||
| 135 | +Beyond the fixture corpus I swept a broad aomenc/ffmpeg-libaom recipe battery | ||
| 136 | +(`~/.cache/av1dec-recon/recipes.sh`, 22 recipes: sb64/128, 4:4:4, 4:2:2, | ||
| 137 | +lossless, screen, max-partition 4/16, tool toggles, aq/deltaq, cdef/lr off, | ||
| 138 | +intrabc/palette/cfl off, warped, all-intra). Every 4:2:0 8/10-bit film-like | ||
| 139 | +recipe decodes. Four real streams stop: | ||
| 140 | + | ||
| 141 | +### 3.1 Monochrome key frame → `a Golomb tail longer than this decoder reads` | ||
| 142 | + | ||
| 143 | +`ffmpeg -f lavfi -i testsrc2=size=320x240:rate=30:duration=2 -pix_fmt gray | ||
| 144 | +-c:v libaom-av1 -cpu-used 8 -b:v 300k -f obu` → REFUSED. The **4:2:0 twin of the | ||
| 145 | +same source+recipe decodes 60/60 frames**, so this is monochrome, not the recipe. | ||
| 146 | +(The committed io fixture `av1-monochrome.ivf` is a **different, earlier** stop: | ||
| 147 | +it refuses at `intra block copy on a HORZ/VERT/1:4 rect intra strip` — the | ||
| 148 | +intrabc-rect wall — before reaching this desync. The pinning gate in §5 | ||
| 149 | +therefore generates its stream from this ffmpeg recipe, not from that fixture.) | ||
| 150 | + | ||
| 151 | +**Root cause (localised).** Run the instrumented aomdec oracle and our probe with | ||
| 152 | +`EC_TRACE_MODE_STEP=1` over the same OBU. On the **mono** stream **ours reads | ||
| 153 | +`angle_uv` at `rng=50996`**, while aomdec reads **no** `uv_mode`/`angle_uv` at | ||
| 154 | +all (the guard below): the monochrome frame codes neither symbol. The first | ||
| 155 | +divergence at `(0,0)` is therefore aomdec reading `tx_depth ctx=0 cat=1` | ||
| 156 | +(`rng=43616`) where **ours reads a `uv_mode` (val=13)** and desyncs. (The | ||
| 157 | +`rng=56072` "agree through `uv_mode`/`angle_uv`" agreement belongs to the 4:2:0 | ||
| 158 | +twin, whose chroma symbols both decoders read; `56072` never appears in the mono | ||
| 159 | +trace.) libaom `av1/decoder/decodemv.c:933`: | ||
| 160 | +`if (!cm->seq_params->monochrome && xd->is_chroma_ref) { mbmi->uv_mode = ... }` — | ||
| 161 | +a monochrome frame codes **no** `uv_mode`/`cfl`/`angle_delta_uv`/`palette_uv`. | ||
| 162 | +This decoder's block layer has **no `num_planes`/monochrome notion at all** | ||
| 163 | +(`grep -n num_planes crates/ec-av1/src/decode.rs` finds only comments; the encoder | ||
| 164 | +`frame.rs` has the guards, the decoder does not), so it reads those symbols for | ||
| 165 | +every block and desyncs. The `Golomb` refusal is the **symptom** of being left | ||
| 166 | +mid-symbol, not the defect. | ||
| 167 | + | ||
| 168 | +**Disposition: `deferred(needs a monochrome/num_planes threading lane)`.** The | ||
| 169 | +fix is a feature, not a one-liner: thread `num_planes` into `FrameCtx`, gate the | ||
| 170 | +chroma **symbol** reads (`decode.rs:9153-9212` and the rect/sub-8/`_in_inter` | ||
| 171 | +twins), skip the chroma **coefficient** reads (≈12 `read_plane` u/v call sites) | ||
| 172 | +and chroma reconstruction, and emit a 1-plane picture. Gated today by the | ||
| 173 | +committed `a_real_libaom_monochrome_key_frame_is_refused_by_name` (flip it to a | ||
| 174 | +witness when this lands). | ||
| 175 | + | ||
| 176 | +### 3.2 4:4:4 (profile High) at high speed → same `Golomb` string | ||
| 177 | + | ||
| 178 | +`-pix_fmt yuv444p -c:v libaom-av1`: **ffmpeg-libaom cpu-used 8 refuses, 5/6/7 | ||
| 179 | +decode; aomenc cpu-used 6/7 refuse, 4/5/8 decode** — non-monotonic, so it is a | ||
| 180 | +coding-tool decision, not "4:4:4 is unsupported" (the fixture | ||
| 181 | +`av1-profile1-444.ivf` decodes fine). Localised first divergence at block | ||
| 182 | +`(0,0)` of the key frame: aomdec reads `tx_depth ctx=0 cat=1`, ours reads | ||
| 183 | +`txfm_split ctx=18` (`read_var_tx_size`, `decode.rs:17814`) — our tx-size read | ||
| 184 | +routes this block down the wrong path. | ||
| 185 | + | ||
| 186 | +**Disposition: `deferred`.** Not gate-able stably (the offending recipe depends on | ||
| 187 | +the encoder build/cpu-used). | ||
| 188 | + | ||
| 189 | +### 3.3 `--allintra` and 3.4 `--enable-warped-motion=1 --cpu-used=0` | ||
| 190 | +### → `a sub-8x8 leaf that uses intrabc (... no block-vector path ...)` | ||
| 191 | + | ||
| 192 | +Both stop on the sub-8 intrabc refusal. First divergence (allintra, block | ||
| 193 | +`(4,0)`): aomdec reads `tx_depth`, ours reads `intrabc`. The refusal is the | ||
| 194 | +symptom of the same class as 3.2 — a block-routing desync, not an encoder that | ||
| 195 | +truly wrote sub-8 intrabc. | ||
| 196 | + | ||
| 197 | +**Disposition: `deferred`.** | ||
| 198 | + | ||
| 199 | +### Inventory consequence | ||
| 200 | + | ||
| 201 | +Two refusals carry **PROVEN** entries claiming real streams never reach them | ||
| 202 | +(by census/enumeration): *"a Golomb tail longer than this decoder reads"* and | ||
| 203 | +*"a sub-8x8 leaf that uses intrabc"*. §3.1-3.4 **refute** those proofs: real | ||
| 204 | +libaom streams reach both. The census domain was too narrow (never covered | ||
| 205 | +monochrome / 4:4:4-fast / all-intra / warped-at-cpu0). They remain **inventory | ||
| 206 | +debt** until the root causes above land; the PROVEN tests must then be revisited. | ||
| 207 | +`each is a reachable refusal whose "unreachable" proof is now known false`. | ||
| 208 | + | ||
| 209 | +## 4. Terrain map for the next wave | ||
| 210 | + | ||
| 211 | +Remaining refusals: **36 REFUSALS + 1 CAPABILITY_CLAIM** (37 total). Ordered by dependency | ||
| 212 | +(what unblocks what): | ||
| 213 | + | ||
| 214 | +**Wave 1 — the only real-stream-reachable cluster (this lane's finding):** | ||
| 215 | +1. **Monochrome / `num_planes` threading** (3.1). Blocks: av1-monochrome fixture, | ||
| 216 | + the `-pix_fmt gray` family. Touches the chroma-symbol gate sites | ||
| 217 | + (`decode.rs:9153,9161,9166,9169,9205` + rect/sub8 twins) and every u/v | ||
| 218 | + `read_plane` site. **Unblocks nothing else directly**, but is the cleanest | ||
| 219 | + feature to build first (needed for a "all AV1 profiles" claim). | ||
| 220 | +2. **Block-routing / tx-size desync** (3.2, 3.3, 3.4): all-intra, 4:4:4-fast, | ||
| 221 | + warped-cpu0. Localised to the tx-size read (`decode.rs:17814`) choosing the | ||
| 222 | + inter var-tx reader where libaom reads `tx_depth`. One root cause may cover all | ||
| 223 | + three. | ||
| 224 | + | ||
| 225 | +**Wave 2 — census/enumeration-proven, no film/stream hits them yet** | ||
| 226 | +(do NOT spend a lane until a witness stream exists; each has a PROVEN test): | ||
| 227 | +- `an intra-coded {bw}x{bh} block on the inter block path ...` (decode.rs backtick | ||
| 228 | + unlocated; census `every_intra_in_inter_shape_the_census_lists_has_a_size_group_row`) | ||
| 229 | +- `a non-skip rectangular (HORZ/VERT/HORZ_B) strip needs rectangular residual coding` (decode.rs:26910) | ||
| 230 | +- `a coded HORZ/VERT strip whose chroma transform has no rect coefficient tables here` (decode.rs:9531) | ||
| 231 | +- `a split intra strip whose transform unit is {tx_w}x{tx_h} ...` (decode.rs:9574) | ||
| 232 | +- the rect-transform-table/scan trio (decode.rs:18160/18187/18240) | ||
| 233 | +- `a 32x32 partition type this decoder does not code` (decode.rs:23885) and the | ||
| 234 | + INTER twin (decode.rs:37355); `an inter 16x16-level partition value outside | ||
| 235 | + NONE/HORZ/VERT/SPLIT/AB/1:4` (decode.rs:36280) | ||
| 236 | +- `a 128x128 superblock partition value outside the 8-symbol alphabet` (decode.rs:22144) | ||
| 237 | +- `an inter var-tx tree with a leaf transform larger than 32x32/64x64` (decode.rs:17955/18402) | ||
| 238 | +- `CfL, filter intra or a palette on a 128-root HORZ/VERT intra block` (decode.rs:14993) | ||
| 239 | +- `an intra mode this decoder does not code (round 2)` (decode.rs:10442/29717) | ||
| 240 | +- `a motion_mode symbol for a block shape with no CDF row here` (decode.rs:28572) | ||
| 241 | +- `an OBMC neighbour whose switchable interp filter was never recorded` (decode.rs:25649) | ||
| 242 | +- `an intra 16x4/4x16 strip inside an inter 16x16-level 1:4 partition` (decode.rs:29646) | ||
| 243 | +- `an intrabc block whose var-tx tree resolved to mixed leaf transform sizes` (decode.rs:14287) | ||
| 244 | +- `intra block copy on a HORZ/VERT/1:4 rect intra strip` (decode.rs:9122) | ||
| 245 | +- `a sub-8x8 leaf that uses intrabc` (decode.rs:15959) — see §3.3, proof refuted | ||
| 246 | +- `a reference frame selected with no picture ...` / `a reference picture whose height does not match ...` | ||
| 247 | +- `a frame with no mode-info grid`; `a frame naming primary_ref_frame at an empty slot` | ||
| 248 | +- `a frame whose segmentation enables SEG_LVL_REF_FRAME/SKIP/GLOBALMV` | ||
| 249 | +- `a frame mixing lossless and lossy segments` (the only refusal with NO proving test) | ||
| 250 | + | ||
| 251 | +**Wave 3 — capability claims (not refusals):** | ||
| 252 | +- `filter intra on a superblock-level HORZ/VERT strip (... av1_filter_intra_allowed_bsize caps at 32x32)` | ||
| 253 | + | ||
| 254 | +**Do not re-charter:** the 64x64 SB-level partition arms (this report, §2) and | ||
| 255 | +anything already covered by the seven witness gates above. | ||
| 256 | + | ||
| 257 | +## 5. Gates / regression coverage added | ||
| 258 | + | ||
| 259 | +- **`a_real_libaom_monochrome_key_frame_is_refused_by_name`** (`stream.rs`): | ||
| 260 | + generates the monochrome stream and its 4:2:0 twin with ffmpeg-libaom, asserts | ||
| 261 | + the twin decodes and the monochrome stream stops on the exact measured refusal | ||
| 262 | + string. It is a tripwire for today's first real-stream stop: it fails if the | ||
| 263 | + refusal moves (re-measure) and must be flipped to a pixel-exact witness when | ||
| 264 | + monochrome decode lands. | ||
| 265 | + | ||
| 266 | +## 6. Gates run / suite | ||
| 267 | + | ||
| 268 | +- `cargo test -p ec-av1 --lib a_real_libaom_monochrome_key_frame_is_refused_by_name -- --nocapture` | ||
| 269 | + → `ok. 1 passed` (`4:2:0 twin 60 frames, monochrome refused by name`). | ||
| 270 | +- `cargo check -p ec-av1 --all-targets` → rc 0, **0 warnings** (parity with | ||
| 271 | + 79984549). | ||
| 272 | +- Full lib suite (completed on the lane by the verifier): **592 passed, 0 failed, | ||
| 273 | + 60 ignored** (6716 s). (An earlier in-lane run was cut off by a budget cap while | ||
| 274 | + showing "652 passed"; that partial figure is not a completed suite.) | ||
| 275 | + | ||
| 276 | +## 7. Repro commands (all re-derivable) | ||
| 277 | + | ||
| 278 | +``` | ||
| 279 | +# build the probe | ||
| 280 | +CARGO_TARGET_DIR=$HOME/.cache/cargo-target-av1dec cargo build --release -p ec-av1 --example decode_probe | ||
| 281 | + | ||
| 282 | +# film refusal scan (paths via env only) | ||
| 283 | +ffmpeg -loglevel error -ss <s> -t 2 -i "$FILM" -c:v copy -an -f obu /tmp/w.obu | ||
| 284 | +EC_PROBE_OUT16=$HOME/w.raw decode_probe /tmp/w.obu # OK: N frames | REFUSED: <string> | ||
| 285 | +ffmpeg -loglevel error -i /tmp/w.obu -pix_fmt yuv420p10le -f rawvideo $HOME/ref.raw | ||
| 286 | +sha256sum $HOME/w.raw $HOME/ref.raw # byte-exactness | ||
| 287 | + | ||
| 288 | +# first-divergence between aomdec and our decoder on any OBU | ||
| 289 | +EC_TRACE_MODE_STEP=1 ~/.cache/aom-oracle/build/aomdec --rawvideo -o /dev/null x.obu 2>a.step | ||
| 290 | +EC_TRACE_MODE_STEP=1 decode_probe x.obu 2>o.step; diff a.step o.step | ||
| 291 | +``` | ||
| 292 | + | ||
| 293 | +(Scripts kept at `~/.cache/av1dec-recon/`: `sweep.sh`, `pixcmp.sh`, `scan.sh`, | ||
| 294 | +`recipes.sh`, `diverge.sh`.) | ||
| 295 | + | ||
| 296 | +## 8. Git log | ||
| 297 | + | ||
| 298 | +- `lane-av1-decode` off `79984549`: report + `a_real_libaom_monochrome_key_frame_is_refused_by_name`. | ||