pmcgx
A pair codebook: one 20-bit state decodes to two weights, through two mcg-style products whose halves are crossed.
Why pairs
A V = 1 trellis with L = 16 has 65,536 states and moves K bits per step. A pair trellis with L = 20 moves 2K bits per step and emits two weights, so the bits per weight are the same, but each step chooses among 22K successors with a larger memory. The right panel shows those successors as points in the plane, first value against second, with the target pair as a cross. With 16 successors (K = 2) the encoder has more ways to land near any pair.
How it decodes
| step | operation |
|---|---|
| 1 | x₁ = (w · 0xCBAC1FED) mod 2³², x₂ = (w · 0xBCA14C51) mod 2³² |
| 2 | each x = (x & 0x8FFF8FFF) ^ 0x3B603B60 |
| 3 | v₀ = fp16(x₁ & 0xFFFF) + fp16(x₂ >> 16),
v₁ = fp16(x₁ >> 16) + fp16(x₂ & 0xFFFF) |
w is the 20 bits of the stream that end at bit 2K(p + 1) for pair p, wrapping as in the tail-biting ring. The exact layout is in the EXLR8 format spec.
Things to try
- Uncross the halves (
x₁.lo + x₁.hi,x₂.lo + x₂.hi) and watch the scatter grow stripes: the low halves never see the state's top 4 bits. - Set
L: 16and compare the scatter with L = 20.