Separate the two axes: profiles are I/O, the CPU ceiling is one target for both

The profiles were chosen against disk bandwidth and say nothing about CPU. The
locked CPU target is a stock 10MHz 68000 for both of them, so both must fit
833,333 cycles -- picking sasi does not rescue it, it still misses 31% of
frames against scsi's 42%.

Splits the miss into what the encoder can fix and what it cannot: re-coding
every non-SKIP block as V1 is the floor, and it still misses 11 frames at sasi
and 12 at scsi, all of them above ~90% non-SKIP. So a cost-aware mode decision
can reach about three quarters of the misses; the rest need a structural
answer, not a better encoder.

Also: V4 is 448 cycles against RAW's 400, and RAW is pixel-exact. On the CPU
axis V4 is strictly dominated and the byte lagrangian's mode preference
inverts. Only the byte-rich profile can take that escape, so the cycle ceiling
should cost sasi MORE quality than scsi despite costing it fewer cycles.
FINDINGS 28.7/28.8.

Claude-Session: https://claude.ai/code/session_01194oWYW8DQXK1SZ2DnChW6
This commit is contained in:
prosolis
2026-08-23 15:14:12 -07:00
parent ed353d24a9
commit 31c4c1aba1
2 changed files with 65 additions and 0 deletions
+13
View File
@@ -43,6 +43,18 @@ worth 4 bytes, with no idea what it costs to draw.
cliff? `tools/analysis/11_cpu_budget.py` scores a container without needing
MAME, so the search loop is cheap; confirm the winner on the 68000 with
`tools/bench/decode.lua`.
3b. **Know which misses are yours to fix before starting.** Re-coding every
non-SKIP block as V1 is the floor any mode assignment can reach, and it
still misses 11 frames at `sasi` and 12 at `scsi` — every frame above ~90%
non-SKIP. So the cost-aware decision can reach about three quarters of the
misses (26 of 37 at `sasi`) and the rest are item 4. FINDINGS 28.7.
3c. **Buy RAW, not V4, wherever the bytes allow.** RAW is 400 cycles against
V4's 448 *and* is pixel-exact, so on the CPU axis V4 is strictly dominated —
the byte lagrangian's preference inverts. `scsi` can take that escape and
`sasi` cannot afford it, so expect the cycle ceiling to cost `sasi` more
quality even though it costs `sasi` fewer cycles. FINDINGS 28.8.
4. **28.5 may not be solvable by the encoder at all.** An all-V1 frame — the
cheapest possible full redraw — is **110.5%** of the budget. A scene cut
changes 100% of the screen, so *no* mode assignment fits one at 12fps. Decide
@@ -157,6 +169,7 @@ the display path is pixel-exact.
| Double buffer | **none** — page 1 sacrificed | enables `movem.l` 24px bursts; delta coding needs a RAM reference frame anyway |
| **Codec** | **hybrid VQ: SKIP / V1 4x4 / V4 four-2x2 / RAW, per-block rate-distortion** | flat 4x4 VQ was measured and rejected — see FINDINGS 9-10 |
| **Quality modes** | **two: `sasi` and `scsi`** (USER DECISION, session 2) | one codec, one decoder, one bitstream; only `lam` differs |
| Profile axis | **I/O bandwidth only** | the profiles say nothing about CPU; **both target the same stock 10MHz 68000**, and the Super has SCSI at 10MHz. FINDINGS 28.7 |
| Framerate | 12 fps, **explicit decimation** | source has zero duplicate frames; no free "twos" win |
| Emulator | MAME 0.277 x68000 | accurate enough that measured cycles mean something |
| SNES project reuse | **MIT — cleared** | `data/events/` scene graph is reusable with attribution |