Session 1: hardware research, content measurement, codec decision, MAME harness
Verified GVRAM is one word-access per pixel in ALL color modes; chose 256-color 256x192 with movem.l bursts (page 1 sacrificed as double-buffer). Measured 8 scenes from the Blu-ray source: blit costs under 8% of the 12fps cycle budget, so I/O is the bottleneck, not CPU. Naive delta+RLE reaches only 3.2:1 (365 KB/s, 470MB) -> decision to use 4x4 vector quantization (~30 KB/s). "Shot on twos" assumption failed: the transfer has zero duplicate frames, so 12fps requires explicit decimation. Documents three false measurement results and their root causes (per-frame Floyd-Steinberg dithering, temporal denoise, exact-match dedupe on noisy source). MAME Lua injection harness works and is reusable for cycle-cost measurement; the IOCS _B_READ disk benchmark is blocked returning -1. Claude-Session: https://claude.ai/code/session_01194oWYW8DQXK1SZ2DnChW6
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import numpy as np, glob, sys
|
||||
from PIL import Image
|
||||
d=sys.argv[1]
|
||||
f=sorted(glob.glob(f"{d}/f*.png"))
|
||||
a=[np.asarray(Image.open(x).convert("RGB"),dtype=np.int16) for x in f]
|
||||
# noise-tolerant per-pair change: % of pixels differing by more than 8 levels
|
||||
p=np.array([100.0*np.count_nonzero(np.abs(a[i]-a[i-1]).max(axis=2)>8)/(a[0].shape[0]*a[0].shape[1]) for i in range(1,len(a))])
|
||||
print(f" pairs={len(p)} mean={p.mean():.2f}% median={np.median(p):.2f}% p90={np.percentile(p,90):.2f}% max={p.max():.2f}%")
|
||||
ev,od=p[0::2],p[1::2]
|
||||
print(f" even-idx pairs mean={ev.mean():.2f}% odd-idx pairs mean={od.mean():.2f}% ratio={max(ev.mean(),od.mean())/max(min(ev.mean(),od.mean()),1e-9):.1f}x")
|
||||
print(f" first 16 pairs: {np.round(p[:16],2)}")
|
||||
Reference in New Issue
Block a user