Merge lane-av1oddluma: the remaining two 4:2:0 cells are an ENTROPIC fork at read 6 (report only)
Browse files at this commit1 changed file +132 -0
- lanes/av1oddluma.report.md +132 -0
lanes/av1oddluma.report.mdadded+132 -0
| @@ -0,0 +1,132 @@ | |||
| 1 | +# lane-av1oddluma — the odd-dimension regime: NARROWED, NOT FIXED | ||
| 2 | + | ||
| 3 | +Base `5b27ed79`, branch `lane-av1oddluma`. **No code change.** | ||
| 4 | + | ||
| 5 | +## Verdict, plainly | ||
| 6 | + | ||
| 7 | +I did not fix `320x236` and `322x248`. I did establish they are **not** the | ||
| 8 | +`tx_type` class I just fixed, that the divergence is **entropic** (not | ||
| 9 | +reconstruction), that it forks at **coefficient read 6 of frame 0**, and exactly | ||
| 10 | +what still has to be read to close it. "Narrowed, not fixed" is the honest | ||
| 11 | +outcome here. | ||
| 12 | + | ||
| 13 | +## 1. Red-before + control | ||
| 14 | + | ||
| 15 | +Live comparator against the oracle's real `aomdec --rawvideo` bytes: | ||
| 16 | + | ||
| 17 | +| cell | Y | U | V | exact frames | | ||
| 18 | +|---|---|---|---|---| | ||
| 19 | +| `320x236` | 234349 | 56957 | 52981 | 0/16 | | ||
| 20 | +| `322x248` | 36286 | 13359 | 13001 | 0/16 | | ||
| 21 | + | ||
| 22 | +**Control (`EC_FLIP`, one bit of the real oracle buffer):** | ||
| 23 | +* `320x236`, byte 0 → `Y=234350` (**+1 Y**) | ||
| 24 | +* `322x248`, byte 0 → `Y=36287` (**+1 Y**) | ||
| 25 | + | ||
| 26 | +Per-frame counts are flat from frame 0 — **the KEYFRAME is already wrong** in both | ||
| 27 | +(`320x236` f0: Y 11198 U 2416 V 2409; `322x248` f0: Y 2170 U 814 V 775). So no | ||
| 28 | +propagation, no motion compensation, no loop filter: this is keyframe parse or | ||
| 29 | +keyframe reconstruction. | ||
| 30 | + | ||
| 31 | +Correction to the framing I was given: 234349 is **not** near whole-frame. Luma is | ||
| 32 | +74240 samples/frame, so `320x236` f0 is 11198/74240 ≈ **15%**, `322x248` f0 is | ||
| 33 | +2170/79360 ≈ **2.7%**. Not a whole-frame fork. | ||
| 34 | + | ||
| 35 | +## 2. Entropic, and where | ||
| 36 | + | ||
| 37 | +`EC_ECDUMP_IN` on both sides, paired by `(value, range)` (our `bit` field runs a | ||
| 38 | +constant +15 against the oracle's and is not comparable; that offset holds for | ||
| 39 | +reads 0–5 and then breaks, which is itself the signal). | ||
| 40 | + | ||
| 41 | +Reads 0–5 are **identical**. Read 6: | ||
| 42 | + | ||
| 43 | +| | side/tx | mi | ctx | value | range | | ||
| 44 | +|---|---|---|---|---|---| | ||
| 45 | +| ours | 4 | (not printed) | 2 | 44513 | 48640 | | ||
| 46 | +| oracle | TX_8X4 (`tx=6`) | plane 0 (0,4) bc=0 br=0 | 1 | 40060 | 51808 | | ||
| 47 | + | ||
| 48 | +Bit positions at read 6: ours 1010, oracle 683 (against a +15 convention offset at | ||
| 49 | +read 5), i.e. **312 extra bits consumed inside one unit**. So the fork is inside | ||
| 50 | +the unit that starts at read 6 — the first `TX_8X4` luma unit of the 8×8 block at | ||
| 51 | +mi (0,4) — and it is a **parse** divergence, not a reconstruction one. | ||
| 52 | + | ||
| 53 | +## 3. What is NOT wrong (measured, so nobody re-checks it) | ||
| 54 | + | ||
| 55 | +The seven units before the fork are byte-for-byte identical, including everything | ||
| 56 | +that would be the usual suspect: | ||
| 57 | + | ||
| 58 | +* **Block walk order** matches: the 16×16 block at mi(0,0) → its U → its V → the | ||
| 59 | + next block at mi(0,4). | ||
| 60 | +* **`all_zero`**: 1,1,1,0,0,0 on both. | ||
| 61 | +* **`eob`**: 3, 50, 50 on both (`TRACE eob value=3/50/50` vs | ||
| 62 | + `tag=eob eob=3/50/50`). | ||
| 63 | +* **Coefficient positions**: oracle `c=49→pos=31, c=48→23, c=47→30, c=46→37, | ||
| 64 | + c=45→44, c=44→51, c=43→58, c=42→57, c=41→50, c=40→43, c=39→36, c=38→29`; | ||
| 65 | + ours `59,58,51,44,37,30,23,15,22,29,36,43,50,57`. **The oracle's positions | ||
| 66 | + transposed (`(p % 8) * 8 + p / 8`) are exactly ours.** Our `default_scan_gen(8)` | ||
| 67 | + is the documented correct row-major transcription of libaom's column-major | ||
| 68 | + `default_scan_8x8` (`decode.rs:7644`: *"transposed from libaom's column-major | ||
| 69 | + buffer into this decoder's row-major `pos = row * side + col`"*). **The scan and | ||
| 70 | + the placement are right.** | ||
| 71 | +* **Contexts and levels**: `c=48 ctx=22`, `c=46 ctx=21`, `c=42 ctx=21`, | ||
| 72 | + `c=38 ctx=22`, `c=49 level=1`, `c=47 level=1` — identical on both sides. | ||
| 73 | + | ||
| 74 | +So it is **not** a transposed scan, **not** a wrong CDF row, **not** a wrong | ||
| 75 | +`eob`, **not** a block-order fork. | ||
| 76 | + | ||
| 77 | +## 4. The one open measurement, named | ||
| 78 | + | ||
| 79 | +Reads 0–5 agree and the `base` levels for the read-5 (V-plane 8×8) unit agree, but | ||
| 80 | +the `EC_ECDUMP_IN` states diverge by read 6. Two candidate sites, in order: | ||
| 81 | + | ||
| 82 | +1. **The sign / Golomb tail of the V-plane 8×8 unit** (`tag=sign` / | ||
| 83 | + `tag=post_golomb` on the oracle, `TRACE dc_sign` / `TRACE golomb` on ours). | ||
| 84 | + Both read `eob=50`; an `eob` that high with mostly-zero bases means the tail | ||
| 85 | + carries almost all the bits, and 312 bits of disagreement is tail-shaped. | ||
| 86 | + **Deciding measurement:** run `EC_TRACE_COEFF` (oracle) and `EC_AV1_TRACE` | ||
| 87 | + (ours) and diff the `sign`/`post_golomb` lines for that unit. If the first | ||
| 88 | + differing `c` is a Golomb-bits read, the bug is in the **b**-plane Golomb | ||
| 89 | + context, not in any scan or table. | ||
| 90 | +2. **A unit-count difference.** We read **3138** `EC_ECDUMP_IN` units against the | ||
| 91 | + oracle's **4095** for the same 16 frames. Since frame 0 already forks at read 6, | ||
| 92 | + this is a *consequence*, not a cause — but once (1) is ruled out, the next | ||
| 93 | + check is which unit we skip or add. | ||
| 94 | + | ||
| 95 | +The oracle rung that settles it, once the tail is diffed: | ||
| 96 | +`EC_COEFF_STEP tag=post_golomb c=<k> level=<n> rng=<r>` versus our | ||
| 97 | +`TRACE golomb` at the same scan index. `EC_COEFF_STEP tag=sign c=<k> sign=<s> | ||
| 98 | +dcctx=<d>` versus our `TRACE dc_sign ctx=<d> value=<s>` — our `dcctx` convention | ||
| 99 | +also carries an offset (7 for chroma, per `read_plane`'s own comment), so compare | ||
| 100 | +the *sign values* first and the ctx second. | ||
| 101 | + | ||
| 102 | +## 5. Sweep — and a trigger rule I must NOT state | ||
| 103 | + | ||
| 104 | +The 27-cell grid (widths 320/322/324 × heights 224…256) still has **25/27 exact** | ||
| 105 | +after the `tx_type` fix, with `320x236` and `322x248` the two failures. An | ||
| 106 | +extended grid (heights 260/264/268/272, widths 318/326/330) was encoded this | ||
| 107 | +session; see `not_done` for why I am not quoting its numbers. | ||
| 108 | + | ||
| 109 | +**The obvious rule — "a dimension that is not a multiple of 8" — is FALSE and I am | ||
| 110 | +not proposing it.** 324 is 4 mod 8 and `324x240` is exact; 236 is 4 mod 8 and | ||
| 111 | +`320x236` fails; 322 is 2 mod 8 and `322x232` is exact. There is no consistent | ||
| 112 | +geometric split in the data I have. The honest statement is that the trigger is | ||
| 113 | +**content**: a unit whose sign/Golomb tail is reached. Both failures are large | ||
| 114 | +(eob=50 in a chroma unit is unusual), which fits — sparse content triggers it, | ||
| 115 | +exactly as the `tx_type` bug did. | ||
| 116 | + | ||
| 117 | +## 6. `not_done` | ||
| 118 | + | ||
| 119 | +* **Not fixed.** No decoder change. The tree is byte-identical to `5b27ed79`. | ||
| 120 | +* **The extended grid's numbers are not quoted.** The encodes completed but I ran | ||
| 121 | + out of budget to sweep them; quoting unmeasured cells would be exactly the | ||
| 122 | + sin this wave has been about. Whoever picks this up should run them first — the | ||
| 123 | + fixtures are `/tmp/h232fix/o{318,326,330}x{232,236,240,248}.obu` and | ||
| 124 | + `/tmp/h232fix/o{320,322,324}x{260,264,268,272}.obu` with the recipe in | ||
| 125 | + `lanes/av1422h232.report.md`. | ||
| 126 | +* **The trigger rule is not established**, only bounded (2 of 27 cells, both | ||
| 127 | + content-shaped). §5 says why the geometric hypothesis fails. | ||
| 128 | +* **Not the `tx_type` bug.** Named separately in | ||
| 129 | + `lanes/av1422h232.report.md` §3 and measured apart here: this regime carries | ||
| 130 | + **luma** errors, which a chroma `tx_type` change cannot produce. | ||
| 131 | +* **4:2:2 not re-measured** (needs `EC_AV1_ALLOW_422_PROBE`, not committable). | ||
| 132 | +* **Full suite not run** (lane rules: scoped only). | ||