Field Guide · term

Also known as: IMBE parameter unpacking, b_0 decode, IMBE quantizer

IMBE parameter quantization is the step that gives the 88 error-corrected bits of a P25 Phase 1 voice frame their meaning: it unpacks them into the multi-band excitation model parameters the synthesizer needs — a fundamental (pitch) frequency, the number of harmonics, a voiced/unvoiced decision per band, and the spectral amplitude at every harmonic.1 It is the inverse of the encoder’s quantization (TIA-102.BABA §5.3 / Annex E), and it is where a flat list of bits becomes a speech spectrum.

b0 (8) voicingK bits b2 gain6 PRBA gain blocks HOC spectral blocks ω₀, L, K inverse DCT → Tl[1..L] 88 bits → fundamental + per-band voicing + harmonic amplitudes
The 88-bit frame partitions into the scattered b0 fundamental, the K voicing bits, a 6-bit gain index, and the PRBA and HOC spectral-amplitude blocks that an inverse DCT turns into the per-harmonic residuals.

The fundamental frequency

Everything begins with b_0, the fundamental-frequency parameter — and it is not contiguous. Its 8 bits are read from scattered positions in the frame: bits 0–5 plus bits 85 and 86, packed MSB-first. From b_0 the decoder derives the fundamental frequency in radians per sample, ω₀ = 4π / (b_0 + 39.5), then the harmonic count L = ⌊0.9254 · ⌊π/ω₀ + 0.25⌋⌋, which the model constrains to the range 9–56. Preserving that inner integer truncation matters at the boundary cases. Values of b_0 above 207 are special: the narrow window 216–219 signals a silence frame, and any other value above 207 marks an invalid frame the decoder repeats rather than voices. A sustained run of the lowest b_0 values (0–7, the ~340–405 Hz, L = 9/10 corner) is the signature of an idle or settling carrier, not speech, and GopherTrunk mutes that buzz.

Voicing decisions

The number of voicing decisions is K = ⌈(L+2)/3⌉ for L < 37, and 12 otherwise — one binary voiced/unvoiced flag for each group of three harmonics, which is how the model fits up to 56 harmonic decisions into a handful of bits. To read them, the remaining 79 bits (positions 6–84) are first re-ordered through an L-indexed bit-order table into a bb[v][p] layout; the voicing bits then live in the first re-ordered vector. Each group of three consecutive harmonics shares one decision, which the synthesizer expands into per-harmonic voiced or unvoiced treatment.

PRBA and HOC spectral amplitudes

The spectral envelope is the largest part of the payload and the most heavily structured. A 6-bit gain index b_2 selects the overall level from a lookup table. Five PRBA (prediction-residual block-amplitude) blocks then supply a coarse gain vector, each block read MSB-first and dequantized as step × (value − 2^(bits−1) + 0.5). An inverse 6-point DCT-II turns those into per-band DC terms. The finer detail comes from the HOC (higher-order coefficient) blocks, whose per-slot bit allocations are table-driven and dequantized with a shared quantizer step scaled by a per-coefficient standard deviation; a zero bit allocation simply means that coefficient is absent. A second inverse DCT per band expands the coefficients into the log-amplitude residuals Tl[1..L]. These are residuals before the cross-frame log-amplitude prediction, which needs the previous frame’s state and lives in the synthesizer, not in the unpack.

Relevance to SDR

Parameter quantization is the bridge between GopherTrunk’s channel-coding layer and its synthesizer: the FEC hands over 88 clean bits, and this stage turns them into the ω₀, L, voicing decisions, and Tl residuals the harmonic and noise generators consume. It is transcribed to match mbelib’s reference unpack exactly, because every arithmetic detail — the scattered b_0 positions, the integer truncation in L, the DCT normalisation — changes the decoded pitch or envelope audibly. An error here does not crash; it produces the wrong voice, which is why the unpack is validated against reference vectors rather than only round-tripped.

Sources

  1. Multi-Band Excitation — Wikipedia, on the MBE model parameters (pitch, voicing, spectral amplitudes) this stage recovers. 

See also