RealAudio sipr

From MultimediaWiki
Jump to navigation Jump to search

Audio codec found in RealMedia files, not as common as cook.

Allegedly the same codec as ACELP.net. May be partly based on G.729, however RealAudio predates the finalization of the G.729 specifications for the 6.5 kbit/s and 11.8 kbit/s variants. ITU-T G.729 page

Codec library with debugging symbols: v50b3_linux20elf.tar.gz

Sipr flavors

0  6.5 Kbps Voice
1  8.5 Kbps Voice
2  5 Kbps Voice
3  16 Kbps Voice

Bit stream frame format

16 Kbps Voice

Bits Meaning
1 Switched MA predictor
7 LSP quantization, index 1
8 LSP quantization, index 2
7 LSP quantization, index 3
7 LSP quantization, index 4
7 LSP quantization, index 5
First subframe
9 Pitch delay
4 Gain codebook index
9 Fixed codebook index (pulses 1 and 6)
9 Fixed codebook index (pulses 2 and 7)
9 Fixed codebook index (pulses 3 and 8)
9 Fixed codebook index (pulses 4 and 9)
9 Fixed codebook index (pulses 5 and 10)
Second subframe
9 Pitch delay
4 Gain codebook index
9 Fixed codebook index (pulses 1 and 6)
9 Fixed codebook index (pulses 2 and 7)
9 Fixed codebook index (pulses 3 and 8)
9 Fixed codebook index (pulses 4 and 9)
9 Fixed codebook index (pulses 5 and 10)

Decoding of the pitch (adaptive codebook) vector

Decode pitch lag

16 Kbps Voice, 1/3 resolution

In the first subframes, a fractional pitch lag is used with resolutions:

  • 1/3 in the range [29 1/3; 159]
  • 1 in the range [160; 281]

...encoded using 9 bits.


In the second subframe, a pitch lag resolution of 1/3 is always used in the range [T1 - 10 2/3, T1 + 9 2/3], where T1 is nearest integer to the fractional pitch lag of the previous (1st) subframe. The search range is bounded by [30, 281].

Above procedure is applied only if encoded pitch delay is in the range [0, 61]. In the other case the pitch delay is set to T1 + 1, where T1 is reconstructed pitch delay and T1 is nearest integer to the fractional pitch lag of the previous (1st) subframe.

Decoding of the innovative (algebraic or fixed codebook) vector

16 Kbps Voice