macroblock-mosh
macroblock-mosh · runs in vfpga-runnerModel
An early-HD circuit-bent VFPGA that datamoshes the picture — MPEG/H.264 motion-compensated block prediction applied to the wrong reference, the classic I-frame-removal mosh. A register frame-store holds the reference; each frame the previous frame is read back, warped block-by-block by motion-vectors (the P-frame smear), macroblock-quantized (the DCT-block look), and re-mixed with the live input before being re-stored. The block motion combines a synthetic seeded storm (p2) with TRANSFERRED motion from a SECOND clip: patch a motion source to IIN2 and the bend estimates that clip’s per-block motion and carries it onto the picture (the canonical two-clip datamosh — clip B’s motion vectors on clip A). p1 sets the mosh amount (P-frame vs live), p2 the synthetic motion gain, p3 the block size, p4 the quantize, p5 the transferred-motion gain (0 + IIN2 unpatched = the original single-source mosh). CIN1/CIN2 add onto the two motion gains; GIN1 is a held gate that forces a clean I-frame (a reference reload). Every synthetic motion-vector is deterministic (frame + block + seed hashed) and the transferred motion is a deterministic normal-flow estimate, so the bend is reproducible. Both register frame-store ping-pong FBOs are render-local GPU state, swapped in place (no leak, no Y.Doc writes).
I/O
- Video in: 2 (vin1…vin2)
- Video out: 1 (vout1)
Controls (param knobs)
| Slot | Knob | Range | Default | What it does |
|---|---|---|---|---|
p1 | mosh | 0 … 1 | 0.85 | Blend toward the moshed reference (the P-frame strength / mosh amount). |
p2 | mvect | 0 … 0.3 | 0.05 | Synthetic motion-vector gain — the seeded block displacement (a storm runs away). |
p3 | block | 4 … 64 | 16 | Macroblock size in pixels (the block-grid quantum). |
p4 | quant | 0 … 1 | 0.3 | Per-block colour quantize (the DCT-block posterize look). |
p5 | mxfer | 0 … 0.3 | 0 | Transferred-motion gain — carry clip B’s (IIN2) per-block motion onto the picture (two-clip datamosh). |
CV roles
| Input | Role | What it modulates |
|---|---|---|
cv1 | MVECT | Adds onto the synthetic motion-vector gain (patch an LFO to drift the mosh storm). |
cv2 | MXFER | Adds onto the transferred-motion gain (modulate how much of clip B’s motion lands on the picture). |
Each CV input has a bipolar SCALE attenuverter + OFFSET on the card, and an always-on scope.
Gate roles
| Input | Role | What it triggers |
|---|---|---|
g1 | I-FRAME | A HELD gate: while high, force a clean I-frame (the reference reloads from live). |
Gate inputs raw-pass into the host's synthetic gN_evt params; the factory hysteresis edge-detects rising edges (rise > 0.6 / fall < 0.4).
Usage
Add a vfpga-runner, pick macroblock-mosh from the card's load preset… menu, and patch the
active outputs into OUTPUT / a video mixer / a downstream effect.