Merge lane-av1422hbd422: the two uncovered 4:2:2 cells are CLEAN -- 12-bit and superres both byte-exact
Browse files at this commit1 changed file +317 -0
- lanes/av1422hbd422.report.md +317 -0
lanes/av1422hbd422.report.mdadded+317 -0
| @@ -0,0 +1,317 @@ | ||
| 1 | +# lane-av1422hbd422 — 12-bit 4:2:2 and superres 4:2:2 against ffmpeg | |
| 2 | + | |
| 3 | +**Verdict: both coverages are CLEAN. No divergence to localise, nothing to fix.** | |
| 4 | +Every cell below is byte-exact against ffmpeg 8.1.3, per plane, on every decode-order | |
| 5 | +frame, with the comparator's liveness control passing 324/324 flip arms first. | |
| 6 | + | |
| 7 | +Target tree `main` = `228a55f5`. Branch `lane/av1422hbd422`. **No decoder source was | |
| 8 | +edited** — the probe was patch-run-restore in a scratch worktree that has been removed | |
| 9 | +(§6). | |
| 10 | + | |
| 11 | +Answers the two coverage questions the risk study opened: | |
| 12 | + | |
| 13 | +- **R3, "12-bit 4:2:2 is codable and has ZERO census coverage"** → **codable and clean.** | |
| 14 | + Three 12-bit 4:2:2 geometries decode byte-exact, including odd width 321 and odd | |
| 15 | + width+height 323x243, plus a lossless 12-bit 4:2:2 cell. | |
| 16 | +- **R9, "Superres + 4:2:2 has no cell either"** → **codable and clean.** | |
| 17 | + Three superres 4:2:2 cells (8-bit x2, 12-bit x1) with `use_superres=true` verified in | |
| 18 | + the frame headers, not merely `--superres-mode` on the command line. | |
| 19 | + | |
| 20 | +--- | |
| 21 | + | |
| 22 | +## 1. ENCODER PROVENANCE (required reading for anyone re-running this) | |
| 23 | + | |
| 24 | +| what | value | | |
| 25 | +|---|---| | |
| 26 | +| `aomenc` | `/home/user/.cache/aom-oracle/build/aomenc`, sha256 `af39b8c272d23fd2efb5e8760ac35d7c3a93aaef224f7e330b6b090c95c4a3ac`, libaom src `9bb526a` ("oracle snapshot: EC_SYMR names each read by its exact call site") | | |
| 27 | +| pixel oracle | `ffmpeg` 8.1.3, `-f rawvideo -pix_fmt yuv422p12le` / `yuv422p`, geometry read from `ffprobe`'s **coded_width/coded_height** (the SEQUENCE HEADER), never from an output byte count | | |
| 28 | +| comparator | `scripts/cmp422-ffmpeg.py` (imported as `cmpff`), which re-derives the decode→display assignment from luma identity and enumerates every solution | | |
| 29 | +| our side | `decode_probe` with `EC_AV1_FINAL_DUMP`, on the patch-run-restore build of §6 | | |
| 30 | +| source material | `ffmpeg -f lavfi -i testsrc2=...` → raw planar → hand-built y4m (header line + `FRAME\n` before **every** frame; libaom `y4minput.c` requires the six bytes per frame) | | |
| 31 | + | |
| 32 | +### 1a. THE aomenc SPELLING THAT MATTERS: `--profile=2` on 12-bit 4:2:2 FAILS | |
| 33 | + | |
| 34 | +This is the reproducibility trap in this cell family and it costs an hour if unknown. | |
| 35 | + | |
| 36 | +``` | |
| 37 | +$ aomenc --profile=2 --input-bit-depth=12 --bit-depth=12 ... 422p12.y4m | |
| 38 | +Warning: Assuming --pass=1 implies --passes=1 | |
| 39 | +Failed to set chroma subsampling x: Unspecified internal error (exit 1) | |
| 40 | +``` | |
| 41 | + | |
| 42 | +It is **not** that aomenc refuses 12-bit 4:2:2 — it is the `g_profile == 2` branch at | |
| 43 | +`apps/aomenc.c:2269-2282`, which for a `FILE_TYPE_Y4M` 12-bit input reaches for | |
| 44 | +`AV1E_SET_CHROMA_SUBSAMPLING_X/Y` on an already-initialised encoder and gets an error | |
| 45 | +back. 12-bit 4:2:0 at `--profile=2` hits the same call and succeeds, because 420's | |
| 46 | +`dst_c_dec_h/v` are 2/2 and 422's are 2/1 — the call only misbehaves for the 4:2:2 value. | |
| 47 | + | |
| 48 | +Measured matrix (same y4m, `--limit=2 --pass=1 --cq-level=24 --threads=1 --width=320 --height=242`): | |
| 49 | + | |
| 50 | +| command | result | | |
| 51 | +|---|---| | |
| 52 | +| `--profile=2 --bit-depth=12 --input-bit-depth=12` (4:2:2 y4m) | **exit 1**, `Failed to set chroma subsampling x` | | |
| 53 | +| `--profile=2 --bit-depth=12 --input-bit-depth=12 --input-chroma-subsampling-x=1 --input-chroma-subsampling-y=0` | **exit 1**, same | | |
| 54 | +| `--profile=2 --bit-depth=10 --input-bit-depth=12` | **exit 1**, same | | |
| 55 | +| `--profile=2 --bit-depth=12 --input-bit-depth=10` | **exit 1**, same | | |
| 56 | +| `--profile=0 --bit-depth=12 --input-bit-depth=12` | **exit 0**, `Warning: automatically updating to profile 2 to match input format.` | | |
| 57 | + | |
| 58 | +**Every 12-bit cell here was therefore produced with `--profile=0`, which auto-upgrades to | |
| 59 | +profile 2 on the y4m's own chroma tag.** That answers the assignment's explicit question: | |
| 60 | +aomenc **does** accept 12-bit 4:2:2 and **does** auto-upgrade the profile; the only thing | |
| 61 | +it will not do is accept `--profile=2` spelled on the command line at 12-bit 4:2:2. | |
| 62 | +The resulting bitstream is genuinely profile 2 — `ffprobe` reports | |
| 63 | +`Professional,320,242,yuv422p12le` for all of them. | |
| 64 | + | |
| 65 | +### 1b. Superres needs `--superres-denominator=12` AND a matching width, or it silently does nothing | |
| 66 | + | |
| 67 | +`--superres-mode=1 --superres-denominator=8` encodes cleanly and produces a bitstream in | |
| 68 | +which **no frame sets `use_superres` at all** (verified through the frame headers, §4). | |
| 69 | +This is not a 4:2:2 problem — it reproduces at 320x242 with denominators 4 and 8. What | |
| 70 | +makes it bite is the geometry: `aomenc` floors the coded width to the denominator grid, | |
| 71 | +and a 320-wide frame with `--superres-denominator=8` needs 40/8 = 5 coded columns ×8, which | |
| 72 | +the mode-1 selection rejects. `--superres-denominator=12` at 320 and 256-wide input does | |
| 73 | +engage it, and matches the shape the repo's own committed superres fixtures have | |
| 74 | +(`crates/ec-av1/fixtures/444_lossy_superres_256x128_d12.obu`: `size=171x128 up=256 | |
| 75 | +superres=true/12`). **A superres cell that was not checked in the frame headers is not a | |
| 76 | +superres cell.** | |
| 77 | + | |
| 78 | +### 1c. Odd-width source construction | |
| 79 | + | |
| 80 | +`ffmpeg -pix_fmt yuv422p12le` cannot emit an odd width (it silently returns a 320-wide | |
| 81 | +frame for a `-size 321x242` request; measured 309760 B, which is 320x242's frame size, | |
| 82 | +not 321x242's 311212 B). The odd-width cells are therefore built by hand: encode a | |
| 83 | +322-wide (and a 324-wide) 12-bit 4:2:2 y4m, then crop the luma plane to the odd width and | |
| 84 | +the two chroma planes to `ceil(w/2)` columns per row. Script kept at | |
| 85 | +`/home/user/.cache/hbd422/trimodd.py`, source y4m sha256 in §2. | |
| 86 | + | |
| 87 | +--- | |
| 88 | + | |
| 89 | +## 2. THE CELLS | |
| 90 | + | |
| 91 | +`aomenc` invocation common to all cells below (extras per row are additive): | |
| 92 | + | |
| 93 | +``` | |
| 94 | +aomenc --codec=av1 --limit=8 --lag-in-frames=25 --auto-alt-ref=1 --pass=1 --cq-level=24 \ | |
| 95 | + --threads=4 --kf-min-dist=0 --kf-max-dist=999999 --width=W --height=H \ | |
| 96 | + --cpu-used=0 --obu -o CELL.obu SRC.y4m | |
| 97 | +``` | |
| 98 | + | |
| 99 | +| cell | geometry / depth | extras | obu bytes | obu sha256 | src y4m sha256 | | |
| 100 | +|---|---|---|---|---|---| | |
| 101 | +| `s422_320x242_12b` | 320x242 12-bit | `--profile=0 --bit-depth=12 --input-bit-depth=12` | 9589 | `09a4c533b8f56f89c60fdd5ee1a97dac524534dc64ccd8684d74d8a72e2764c6` | `41698793bd9f042ef5ce72827b7094a62e2cf964757c4d1ebdf6d75341f1b8b5` | | |
| 102 | +| `s422_321x242_12b` | **321x242** (odd width) 12-bit | same | 9566 | `064a89f99abf3f19a20f3b904aa13dcdab17f7f69c42c68e7b406249a52d92bf` | `43fbf8df79a4df5db7a9633dab1346abfcf50d05c72339f3cb2f848587c12170` | | |
| 103 | +| `s422_323x243_12b` | **323x243** (odd width AND odd height) 12-bit | same | 16633 | `52b9b72bf6197d954e1c1bc4d0d3cda4a197ddb693599c03faa0cdc1df823106` | `670f6d45837c5ce6c3a0d50fe3ddc3e96c6ae3d54b70649fcd5ac431f07c2889` | | |
| 104 | +| `s422_320x242_12b_lossless` | 320x242 12-bit | same + `--lossless=1 --aq-mode=0 --limit=4` | 83136 | `f6d1c9aac24fac11b9e82e5c69bf3c6d4a8a6015e06085861ce94ecbf64d16d1` | `41698793bd9f042ef5ce72827b7094a62e2cf964757c4d1ebdf6d75341f1b8b5` | | |
| 105 | +| `s422sr_320x180_d12` | 320x180 8-bit **superres d12** | `--profile=2 --bit-depth=8 --input-bit-depth=8 --cpu-used=4 --limit=6 --superres-mode=1 --superres-denominator=12 --enable-warped-motion=1 --enable-obmc=1 --enable-palette=0 --enable-intrabc=0` | 10893 | `48eef43570eee32a334b7230f93c380480f2c9c9d11bfdbd6a49ffc2d0ad4065` | `443908db3a8f0f63ada7c686b9f4dadc30c7179320eba091937657603b35a33c` | | |
| 106 | +| `s422sr_256x128_d12` | 256x128 8-bit **superres d12** | same | 11803 | `047104ccf5dead3b4c9fa24289e2637aa6585b1d3de1cdd6a14792bc82a03197` | `6ae90321999c3fa94c88c8015af419142f303003feaea13da7bd70e875098d1a` | | |
| 107 | +| `s422sr_256x128_d12_12b` | 256x128 **12-bit** superres d12 | `--profile=0 --bit-depth=12 --input-bit-depth=12 --cpu-used=4 --limit=6 --superres-mode=1 --superres-denominator=12 --enable-warped-motion=1 --enable-obmc=1 --enable-palette=0 --enable-intrabc=0` | 10736 | `dad2c2fbb23d51420d4bbd5105d987e6d8df7eb997c4c63404d5de9523ff065f` | `a6e776b3a652e73890535126bf84bd323b71796682c8125474e34d0f55fb68e0` | | |
| 108 | + | |
| 109 | +Controls, from the existing 51-cell corpus (unchanged bytes, so the run also re-confirms | |
| 110 | +the corpus verdict on this build): | |
| 111 | + | |
| 112 | +| cell | obu sha256 | | |
| 113 | +|---|---| | |
| 114 | +| `s420_320x242` (4:2:0 8-bit) | `5832ecded9bc128f41b5a0ff16baa2283d4c2528b9bd301b4bfb706aafd7ea64` | | |
| 115 | +| `s422_320x242` (4:2:2 8-bit) | `909e58db18fd4b7590501e2cecfbc090cde49eb26c9a42e15b1ef1fc265843d8` | | |
| 116 | + | |
| 117 | +Cells built and measured but **not** part of the verdict, recorded because the negative | |
| 118 | +result is the useful part: `s422sr_320x242` and `s422sr_322x246` | |
| 119 | +(`sha 8bf07a4a…`, `8d5d9a95…`) at `--superres-denominator=8` — both byte-exact, both with | |
| 120 | +`use_superres=false` on every frame, i.e. plain 4:2:2 cells wearing a superres command | |
| 121 | +line. §1b. | |
| 122 | + | |
| 123 | +--- | |
| 124 | + | |
| 125 | +## 3. LIVENESS CONTROL (run FIRST, before any exactness verdict) | |
| 126 | + | |
| 127 | +`scripts/flipctl-422.py` maps once from the untouched streams, then flips **one sample per | |
| 128 | +arm per plane** — three arms per plane (first / middle / last), 36 arms per cell — in both | |
| 129 | +directions (oracle arm, ours arm) with the mapping pinned, over **every** decode→display | |
| 130 | +solution. | |
| 131 | + | |
| 132 | +``` | |
| 133 | +ctl_s420_320x242_8b: baseline [0, 0, 0] 17 decode / 16 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 134 | +ctl_s422_320x242_8b: baseline [0, 0, 0] 17 decode / 16 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 135 | +s422_320x242_12b: baseline [0, 0, 0] 9 decode / 8 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 136 | +s422_321x242_12b: baseline [0, 0, 0] 9 decode / 8 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 137 | +s422_323x243_12b: baseline [0, 0, 0] 9 decode / 8 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 138 | +s422sr_320x180_d12: baseline [0, 0, 0] 7 decode / 6 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 139 | +s422sr_256x128_d12: baseline [0, 0, 0] 7 decode / 6 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 140 | +s422sr_256x128_d12_12b:baseline [0, 0, 0] 7 decode / 6 shown, hidden [1], 1 mapping solution(s), 36 arms | |
| 141 | + 288 PASS, 0 FAIL of 288 flip arms | |
| 142 | + | |
| 143 | +s422_320x242_12b_lossless: baseline [0, 0, 0] 4 decode / 4 shown, hidden [], 1 mapping solution(s), 36 arms | |
| 144 | + 36 PASS, 0 FAIL of 36 flip arms | |
| 145 | +``` | |
| 146 | + | |
| 147 | +**324 arms, 324 PASS, 0 FAIL.** Each flipped sample moved its own plane's wrong-count by | |
| 148 | +exactly +1 and every other plane by exactly 0. A `0/0/0` surviving that is a comparator | |
| 149 | +that is not reading the oracle; it does not, here. | |
| 150 | + | |
| 151 | +--- | |
| 152 | + | |
| 153 | +## 4. PER-PLANE, PER-FRAME RESULTS | |
| 154 | + | |
| 155 | +Columns are **wrong sample counts** `(Y, U, V)`, decode order. `None` = hidden | |
| 156 | +alt-ref/forward frame (never shown, therefore never counted — the `hidden=[1]` each | |
| 157 | +stream's mapping reports). Display-order rows are given too, because the mapping is what | |
| 158 | +makes index-by-index comparison legitimate; every cell had exactly **1** mapping solution, | |
| 159 | +so there is no ambiguity to choose between. | |
| 160 | + | |
| 161 | +### 4a. 12-bit 4:2:2 | |
| 162 | + | |
| 163 | +| cell | pix_fmt | decode frames (Y,U,V) | display frames (Y,U,V) | total | | |
| 164 | +|---|---|---|---|---| | |
| 165 | +| `s422_320x242_12b` | `yuv422p12le` | `[0,0,0] None [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 8 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 166 | +| `s422_321x242_12b` | `yuv422p12le` | `[0,0,0] None [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 8 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 167 | +| `s422_323x243_12b` | `yuv422p12le` | `[0,0,0] None [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 8 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 168 | +| `s422_320x242_12b_lossless` | `yuv422p12le` | `[0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 4 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 169 | +| `ctl_s420_320x242_8b` | `yuv420p` | 16 × `[0,0,0]` + 1 `None` | 16 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 170 | +| `ctl_s422_320x242_8b` | `yuv422p` | 16 × `[0,0,0]` + 1 `None` | 16 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 171 | + | |
| 172 | +No first divergent sample exists for any of these; the comparator's `first` is `none` and | |
| 173 | +its per-plane bounding box is `[None, None, None, None]` for all three planes. | |
| 174 | + | |
| 175 | +### 4b. Superres 4:2:2 | |
| 176 | + | |
| 177 | +| cell | pix_fmt | decode frames (Y,U,V) | display frames (Y,U,V) | total | | |
| 178 | +|---|---|---|---|---| | |
| 179 | +| `s422sr_320x180_d12` | `yuv422p` | `[0,0,0] None [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 6 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 180 | +| `s422sr_256x128_d12` | `yuv422p` | `[0,0,0] None [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 6 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 181 | +| `s422sr_256x128_d12_12b` | `yuv422p12le` | `[0,0,0] None [0,0,0] [0,0,0] [0,0,0] [0,0,0] [0,0,0]` | 6 × `[0,0,0]` | **Y=0 U=0 V=0** | | |
| 182 | + | |
| 183 | +### 4c. Superres is genuinely engaged (frame headers, `EC_PROBE_HDR=1`) | |
| 184 | + | |
| 185 | +A green pixel verdict on a bitstream that never set `use_superres` would prove nothing | |
| 186 | +about the superres upscale path. Per-cell distinct frame-header shapes: | |
| 187 | + | |
| 188 | +| cell | `frame_width x frame_height` | `upscaled_width` | `use_superres` / `superres_denom` | | |
| 189 | +|---|---|---|---| | |
| 190 | +| `s422sr_320x180_d12` | `213x180` | 320 | `true / 12` (plus `320x180 up=320 superres=false` on the key/alt-ref frames) | | |
| 191 | +| `s422sr_256x128_d12` | `171x128` | 256 | `true / 12` (plus `256x128 up=256 superres=false`) | | |
| 192 | +| `s422sr_256x128_d12_12b` | `171x128` | 256 | `true / 12` (plus `256x128 up=256 superres=false`) | | |
| 193 | +| `s422sr_320x242` (rejected) | `320x242` | 320 | `false / 8` — **no superres frame at all** | | |
| 194 | +| `s422sr_322x246` (rejected) | `322x246` | 322 | `false / 8` — **no superres frame at all** | | |
| 195 | +| reference: committed `444_lossy_superres_256x128_d12.obu` | `171x128` | 256 | `true / 12` | | |
| 196 | + | |
| 197 | +Note the chroma geometry under superres: the frame header's coded luma is 171x128 and the | |
| 198 | +chroma planes are per-axis (`round_ss(171,1) x 128`), then upscaled to the 256-wide render | |
| 199 | +size. All of it byte-exact. | |
| 200 | + | |
| 201 | +### 4d. Reachability counters (non-vacuity: the arms really ran) | |
| 202 | + | |
| 203 | +`decode_probe`'s census on the new cells, so a reader can tell an exact result that | |
| 204 | +exercised something from one that exercised nothing: | |
| 205 | + | |
| 206 | +| counter | `s422_320x242_12b` | `s422_321x242_12b` | `s422_323x243_12b` | `s422sr_320x180_d12` | `s422sr_256x128_d12` | `s422sr_256x128_d12_12b` | | |
| 207 | +|---|---|---|---|---|---|---| | |
| 208 | +| `cfl_ac` 422 arm | 146 | 156 | 24 | 214 | 206 | 186 | | |
| 209 | +| `cfl_ac` 444 / 420 arms | 0 / 0 | 0 / 0 | 0 / 0 | 0 / 0 | 0 / 0 | 0 / 0 | | |
| 210 | +| `chroma422_square` | 52 | 52 | 128 | 68 | 5 | 8 | | |
| 211 | +| `chroma422_rect` | 276 | 270 | 824 | 540 | 374 | 322 | | |
| 212 | +| `chroma422_sub8` | 92 | 118 | 405 | 289 | 256 | 239 | | |
| 213 | +| `intra_in_inter_palette` y/uv | 8 / 3 | 11 / 3 | 43 / 18 | 0 / 0 | 0 / 0 | 0 / 0 | | |
| 214 | +| `intrabc_hits` | 15 | 23 | 14 | 0 | 0 | 0 | | |
| 215 | +| `rect_inter` tu / txsplit / obmc | 21 / 2 / 36 | 12 / 2 / 43 | 83 / 5 / 73 | 45 / 0 / 0 | 27 / 0 / 0 | 23 / 0 / 0 | | |
| 216 | +| `sub8_inter_rect` horz8x4 | 91 | 93 | 355 | 65 | 73 | 50 | | |
| 217 | +| **`predict_scaled`** | 0 | 0 | 0 | **4066** | **3442** | **3070** | | |
| 218 | +| **`predict_scaled` sub8 / leaf8** | 0 / 0 | 0 / 0 | 0 | **307 / 158** | **320 / 159** | **227 / 133** | | |
| 219 | + | |
| 220 | +Filter coverage from the same frame headers (per-cell distinct `(cdef_bits, lr)`): | |
| 221 | +`323x243` reaches `cdef_bits=1` and `cdef_bits=2`, `lr=[Sgrproj, Sgrproj, Sgrproj]` and | |
| 222 | +`lr=[None, Switchable, Switchable]`; the 12-bit superres cell reaches `cdef_bits=2` and | |
| 223 | +`lr=[Wiener, None, None]`. So 12-bit 4:2:2 is not exact only on a filter-free stretch of | |
| 224 | +pixels, and the superres cells exercise the scaled-reference prediction path thousands of | |
| 225 | +times per stream (`predict_scaled > 3000`, including 227–320 sub-8x8 inter blocks under a | |
| 226 | +scaled reference and 133–159 8x8 partition leaves under one — the three "scaled" refusal | |
| 227 | +strings in `refusal_inventory.rs`, none of which fired). | |
| 228 | + | |
| 229 | +--- | |
| 230 | + | |
| 231 | +## 5. WHAT THIS DOES AND DOES NOT CLOSE | |
| 232 | + | |
| 233 | +**Closes:** R3 and R9 as *coverage gaps*. The risk study's claim was that no 12-bit 4:2:2 | |
| 234 | +cell and no superres 4:2:2 cell exists anywhere, so neither format had ever been decoded | |
| 235 | +here. Both are now measured byte-exact against ffmpeg. | |
| 236 | + | |
| 237 | +**Does not close, and is not touched by this lane:** | |
| 238 | + | |
| 239 | +1. **R8's "no 4:2:2 unit census".** Still true and still a prerequisite for the lift's | |
| 240 | + non-vacuity gate: `set_census_444` arms the unit counters at `ss (0,0)` only, so | |
| 241 | + `census_444_units()` reads `[0,0,0]` on every cell in this report. The `chroma422_*` | |
| 242 | + counters above are the only 4:2:2 arm-reachability signal the tree currently has, and | |
| 243 | + they cover a subset of arms. Anyone writing the post-lift exactness gate should gate on | |
| 244 | + one of the `chroma422_*` counters (they are `> 0` on every cell here) rather than on | |
| 245 | + the 444 census. | |
| 246 | +2. **R2, film grain.** This lane produced no `--film-grain-test` cell at all, so | |
| 247 | + `film_grain.rs`'s 4:2:0-only geometry is unmeasured here — that arm belongs to | |
| 248 | + `lane/av1422grain`. Nothing in this report says anything about it. | |
| 249 | +3. **The seven known-diverging 8-bit cells (R4).** Untouched; they are not in either | |
| 250 | + coverage question and the corpus controls re-confirm `s420_320x242` and | |
| 251 | + `s422_320x242` are still byte-exact on this build. | |
| 252 | +4. **`refusal_inventory.rs:2129-2148` (R7)** and the residual `(0,1)` assertion (R11). | |
| 253 | + Source-level, not measurement-level; untouched. | |
| 254 | + | |
| 255 | +**No divergence was found, therefore no arm was localised and nothing was fixed.** The | |
| 256 | +reserved group-tail chroma SKIP arm, `film_grain.rs`, and `decode_rect4_16_intrabc` were | |
| 257 | +not edited. | |
| 258 | + | |
| 259 | +--- | |
| 260 | + | |
| 261 | +## 6. PROBE HYGIENE | |
| 262 | + | |
| 263 | +The 4:2:2 guard at `crates/ec-av1/src/stream.rs:1803` was neutralised **only** in a | |
| 264 | +throwaway worktree: | |
| 265 | + | |
| 266 | +``` | |
| 267 | +git worktree add -f --detach /home/user/.cache/wt/probe422hbd main | |
| 268 | +# stream.rs:1802 -> "// TEMP-PROBE-BYPASS: EC_AV1_ALLOW_422_PROBE -- patch, run, restore." | |
| 269 | +# stream.rs:1803 -> "if false && seq.subsampling_x != seq.subsampling_y {" | |
| 270 | +EC_NOMEMGUARD=1 CARGO_TARGET_DIR=/home/user/.cache/tgt/av1422hbd422 \ | |
| 271 | + cargo build -p ec-av1 --example decode_probe # Finished in 8.79s | |
| 272 | +# ...all measurements above... | |
| 273 | +cd /home/user/.cache/wt/probe422hbd && git checkout -- crates/ec-av1/src/stream.rs | |
| 274 | +git worktree remove --force /home/user/.cache/wt/probe422hbd | |
| 275 | +``` | |
| 276 | + | |
| 277 | +Post-restore state, verified: | |
| 278 | + | |
| 279 | +- `git status --porcelain` in the probe worktree: **empty**. | |
| 280 | +- `grep -c TEMP-PROBE-BYPASS crates/ec-av1/src/stream.rs`: **0**. | |
| 281 | +- `grep -n 'if false &&' crates/ec-av1/src/stream.rs`: **no matches**. | |
| 282 | +- The **primary** checkout `/home/user/Documents/Code/Rust/edith_codecs`: | |
| 283 | + `git status --porcelain` **empty**, `grep -c TEMP-PROBE-BYPASS` **0**. | |
| 284 | +- `git worktree list` no longer contains `probe422hbd`. | |
| 285 | + | |
| 286 | +The bypassed binary at `/home/user/.cache/tgt/av1422hbd422` was built into a target | |
| 287 | +directory **only this lane uses**, deliberately not the one `scripts/run422-ffmpeg.py` | |
| 288 | +hardcodes (`/home/user/.cache/tgt/av1422seed/debug/examples/decode_probe`), so no | |
| 289 | +concurrent lane can be served a 4:2:2-decoding binary by that shared driver. The stale- | |
| 290 | +binary trap in §4 of the bypass skill does not apply to anyone else here. | |
| 291 | + | |
| 292 | +Artifacts (not committed): cells, y4m sources, encoder stderr, `work/<cell>/ours.f*`, | |
| 293 | +`out_final.json`, `out_extra.json`, `cells_final.json`, `drv.py` — all under | |
| 294 | +`/home/user/.cache/hbd422/`. | |
| 295 | + | |
| 296 | +--- | |
| 297 | + | |
| 298 | +## 7. ONE-LINE VERDICTS | |
| 299 | + | |
| 300 | +- **12-bit 4:2:2 — CLEAN.** Byte-exact vs ffmpeg `yuv422p12le` at 320x242, **321x242 (odd | |
| 301 | + width)**, 323x243 (odd width *and* height) and 320x242 lossless; Y=U=V=0 on every frame; | |
| 302 | + 324/324 liveness arms pass. R3's "zero coverage" is now measured coverage. No defect to | |
| 303 | + attribute. | |
| 304 | +- **Superres 4:2:2 — CLEAN.** Byte-exact with `use_superres=true`, `superres_denom=12` | |
| 305 | + confirmed in the frame headers, at 320x180 and 256x128 in 8-bit and 256x128 in 12-bit; | |
| 306 | + `predict_scaled` 3070–4066 per stream including sub-8x8 inter and 8x8 leaves under a | |
| 307 | + scaled reference, so the upscale path is genuinely exercised. R9 closed. No defect to | |
| 308 | + attribute. | |
| 309 | +- **aomenc and 12-bit 4:2:2 — one spelling caveat, not a capability gap:** `--profile=0` | |
| 310 | + works (auto-upgrades to profile 2); `--profile=2` spelled explicitly fails with | |
| 311 | + `Failed to set chroma subsampling x` at `apps/aomenc.c:2269-2282`. Use `--profile=0`. | |
| 312 | +- **aomenc and superres — one silent-no-op caveat:** `--superres-mode=1 | |
| 313 | + --superres-denominator=8` at 320-wide input encodes cleanly with `use_superres=false` | |
| 314 | + on every frame. Always read the flag back out of the frame headers before believing a | |
| 315 | + superres cell. | |
| 316 | +- **Nothing was fixed**, because nothing diverged. The decoder source is untouched and | |
| 317 | + the guard stands; this report adds coverage, not a fix. | |
| \ No newline at end of file |