macroblock-mosh

VFPGA macroblock-mosh · runs in vfpga-runner

Model

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)

SlotKnobRangeDefaultWhat it does
p1mosh0 … 10.85Blend toward the moshed reference (the P-frame strength / mosh amount).
p2mvect0 … 0.30.05Synthetic motion-vector gain — the seeded block displacement (a storm runs away).
p3block4 … 6416Macroblock size in pixels (the block-grid quantum).
p4quant0 … 10.3Per-block colour quantize (the DCT-block posterize look).
p5mxfer0 … 0.30Transferred-motion gain — carry clip B’s (IIN2) per-block motion onto the picture (two-clip datamosh).

CV roles

InputRoleWhat it modulates
cv1MVECTAdds onto the synthetic motion-vector gain (patch an LFO to drift the mosh storm).
cv2MXFERAdds 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

InputRoleWhat it triggers
g1I-FRAMEA 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.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo