KB: G.722 & OPUS Encoding/Decoding Latency on the RSL10's LPDSP32

[RSL10 - Knowledge Base]


The RSL10 is a fully featured Wireless Audio Streaming device, capable of capturing and playing back digital audio I/O samples, encoding/decoding the samples using a codec, and wireless transmission of the compressed audio packets to/from the codecs over a custom wireless audio streaming protocol.

RSL10 is able to achieve this audio codec implementation efficiently by making use of an on-board Low-Power Dual-Harvard DSP (the LPDSP32) to perform the encoding and decoding operations alongside the Arm Cortex-M3 co-processor. To demonstrate this, the RSL10 and LPDSP32 come with a set of sample projects that implement the G.722 and OPUS/CELT open source codecs. The speed at which these codecs can be executed determines the maximum sample rate of the incoming audio, as well as the ability to run Stereo or Mono audio streaming configurations.

When using the G.722 and OPUS/CELT codecs on the LPDSP32, what is the latency that can be expected when a buffer of digital audio samples are provided to the DSP for encoding/decoding purposes?


The tables below are provided under the assumption that the Audio Broadcast protocol receiving/sending data with the Codec is working on a 10ms transmission interval (ie. the codec is passed 10ms worth of 16-bit audio samples each encode/decode cycle) and the System Clock is operating at 48MHz. If the transmission interval (i.e., number of packets passed in/out of the codec) or the System Clock is changed, these latency values can be used to estimate the delays you will experience by performing a linear ratio between the two.


Operation Setup Encoding
G.722 Mode 1 (16kHz) 0.9ms 0.8ms
G.722 Mode 2 (16kHz) 1.0ms 0.8ms
G.722 Mode 3 (16kHz) 1.0ms 0.8ms
OPUS/CELT (16kHz) 17.6ms 1.9ms
OPUS/CELT (24kHz) 23.9ms 2.7ms


Operation Setup Decoding
G.722 Mode 1 (16kHz) 0.9ms 0.8ms
G.722 Mode 2 (16kHz) 0.9ms 0.8ms
G.722 Mode 3 (16kHz) 0.9ms 0.8ms
OPUS/CELT (16kHz) 16.9ms 1.3ms
OPUS/CELT (24kHz) 22.7ms 1.7ms

1 Like