G.729

G.729 Narrow-Band Voice Compression Algorithm and its many annexes

G.729, G.729A, G.729AB, G.729D …. G.729 FLAVORS (ANNEXES AND APPENDICES)

Features List

  • Functions are C-callable.
  • Multi-channel capable.
  • The encoder and decoder meet all ITU G.729 compliance and interoperability requirements.
  • Can be integrated with echo cancellers.
  • Capable of in-band synchronization.
  • Available as part of Adaptive Digital’s G.PAK turnkey DSP software packages

A standard G.729 packet contains 80 bits of compressed data representing a 10 millisecond frame of speech. The 8 kbps rate comes from: 8000 bits/second = 80 bits / 0.01 seconds.

PlatformG.729G.729AG.729BG.729ABG.729DG.729FG.729I/E
ARM Cortex A8AvailableAvailableAvailableAvailableAvailableAvailableAvailable
ARM Cortex A9AvailableAvailableAvailableAvailableAvailableAvailableAvailable
ARM Cortex A15AvailableAvailableAvailableAvailableAvailableAvailableAvailable
ARM Cortex M3AvailableAvailable
ARM Cortex M4AvailableAvailableAvailable
ARM Cortex M7Available
ARM9EAvailable
ARM11Available
TI TMS320C64x+ / C66xAvailableAvailableAvailableAvailableAvailableAvailable
TI TMS320C67/674xAvailableAvailableAvailableAvailableAvailableAvailableAvailable
TI TMS320C64xAvailableAvailableAvailableAvailableAvailableAvailable
TI TMS320C62xAvailable
TI TMS320C55xAvailableAvailableAvailableAvailableAvailable
TI TMS320C54xAvailableAvailableAvailableAvailableAvailable
Win32 Static**AvailableAvailable
Win32 DLL**AvailableAvailableAvailable

 

     «    mobile scroll  left and right   »

** WINDOWS 32 DLL – CONTACT SALES FOR SPECIFICATIONS

ADT G.729 is available on the above Platforms: Other configurations are available upon request.

Specifications

NOTE: We specify MIPS (Millions of Instructions Per Second) as MCPS (Millions of Instruction Cycles Per Second). Unless otherwise specified, peak MIPS are indicated.

G.729 ARMv8 Cortex-A53

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
Annex  ABFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 ABEncode12.126562148
Decode3.28002200
Enc/Decode15.291 K609234564348

     «    mobile scroll  left and right   »

All Memory usage is given in units of byte.
Annex  AFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 AEncode15.626562148
Decode3.28002200
Enc/Decode18.891 K609234564348

     «    mobile scroll  left and right   »

G.729 ARMv7 Cortex-A8/A9/A15

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
Annex AB/AFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 AB 

G.729 A

Optimized
Encode12.126562148
Decode3.98002200
Enc/Decode1686.8 K608034564348

     «    mobile scroll  left and right   »

The following specifications for G.729 H / I / B / D / F / E / G are preliminary. They have not yet been optimized.

 

Annex BFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 B
Cortex- A8

Un-Optimized
Preliminary
Encode80.4 (8kbps)3712
Decode19.0 (8kbps)2560
Enc/Decode99.4 (8kbps)253408779281926272

     «    mobile scroll  left and right   »

Annex H/IFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 H / I

Cortex-A8

Un-Optimized

Preliminary
Encode80.4 (8kbps)3712
66.2 (6.4kbps) 
95.7 (11.8kbps)
Decode19.0 (8kbps)2560
19.8 (6.4kbps) 
29.9 (11.8kbps)
Enc/Decode99.4 (8kbps)253408779281926272
86.0 (6.4kbps) 
125.6 (11.8kbps)

     «    mobile scroll  left and right   »

Annex D/FFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 D / F

Cortex-A8

Un-Optimized

Preliminary
Encode80.4 (8kbps)3712
66.2 (6.4kbps)
Decode19.0 (8kbps)2560
19.8 (6.4kbps)
Enc/Decode99.4 (8kbps)253408779281926272
86.0 (6.4kbps)

     «    mobile scroll  left and right   »

Annex E/GFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 E / G

Cortex-A8

Un-Optimized

Preliminary
Encode80.4 (8kbps)3712
95.7 (11.8kbps)
Decode19.0 (8kbps)2560
29.9 (11.8kbps)
Enc/Decode99.4 (8kbps)253408779281926272
125.6 (11.8kbps)

     «    mobile scroll  left and right   »

G.729 ARM Cortex-M7

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
G.729FunctionMIPS
Ave | Max
Program MemoryData MemoryScratchPer-Channel
G.729 
Cortex-M7
Encode33.4  |   36.849601960
Decode6.9    |   7.510241400
Enc/Decode40.3  |   44.349 kbytes610059843360

     «    mobile scroll  left and right   »

G.729 ARM Cortex-M4

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
G.729FunctionMIPSProgram MemoryData MemoryPer-Channel
G.729

Cortex-M4
Encode462148
Decode102200
Enc/Decode5659 kbytes10 kbytes3.3 kbytes

     «    mobile scroll  left and right   »

Annex ABFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729  AB

Cortex-M4*
Encode33.526562184
Decode12.58002200
Enc/Decode469970485634564384

     «    mobile scroll  left and right   »

G.729 ARM9E / ARM11

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
Annex AB/AFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729AB, G.729AEnc27.324002148
Dec10.98002200
Enc/Dec38.2142.2k601632004348

     «    mobile scroll  left and right   »

G.729 C64x, C64x+ / C66x

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
Annex ABFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729 AB  C64xEnc5.224002148
Dec1.28002200
Enc/Dec6.363k6.7k32004344
G.729 AB  C64x+ / C66xEnc4.824002148
Dec1.28002200
Enc/Dec657k6.7k32004344

     «    mobile scroll  left and right   »

Annex B/FFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729B / G.729F

C64x
Enc20.481922388
Dec4.701568
Enc Dec25.7119k7.2K81923956
G.729 B  / G.729 F

C64x + / C66x
Enc19.681922388
Dec5.101568
Enc Dec24.784k7.2K81923956

     «    mobile scroll  left and right   »

Annex EFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729EEnc423776
Dec182560
*G.729 B, D, E – G.729 Annex I combines G 729 D (6.4kbps rate) , G729 (8kbps rate) and G729 E (11.8 kbps rate). Annex B is integrated into all 3 rates. Giving 5 different possible rates: 0, 1.6k, 6.4k, 8k and 11.8k The 3 bit rates are switchable frame to frame by the host.

     «    mobile scroll  left and right   »

G.729 C674x

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
Annex IFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729I*Enc333776
Dec122560

     «    mobile scroll  left and right   »

G.729AB – C6x

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of byte.
Annex ABFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729AB C62x/67xEnc5.224002148
Dec1.38002200

     «    mobile scroll  left and right   »

G.729D C55x

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of 16-bit word.
Annex DFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729DEnc32.2 (8 kbps)24780657049601980
20.5 (6.4 kbps)
Dec5.9 (8 kbps)12607657410241416
6.4 (6.4 kbps)
G.729DEnc/Dec38.1 (8 kbps)28040663049603396
26.9 (6.4 kbps)

     «    mobile scroll  left and right   »

G.729 C54x

CPU UTILIZATION & MEMORY REQUIREMENTS
All Memory usage is given in units of 16-bit word.
C54xFunctionMIPSProgram MemoryData MemoryScratchPer-Channel
G.729Enc18.07208661911943100
Dec3208629081133100
G.729 AEnc9.7216262151942899
Dec1.8216219891132899
G.729 BEnc18.9422385711943401
Dec3.2422335521133401
G.729 ABEnc10423685672463200
Dec2.2423626251133200

     «    mobile scroll  left and right   »

Description

The Adaptive Digital Technologies’ G.729 voice coder software is an implementation of ITU Recommendation 
G.729 8 kbit/s CS-ACELP Speech Codec.

G.729 is an umbrella of vocoder standards. The G.729 vocoders perform voice compression at bit rates that vary between 6.4 and 12.4 kbps.

The figure below shows an example of the G.729 vocoder connected to a digital communication channel. The input speech is fed into the G.729 encoder as a stream of16-bit PCM samples, sampled at a rate of 8000 samples/second. The G.729 encoder compresses the data into the Encode Stream. The encoder also outputs the DTX status, which is discussed later in this data sheet.  

Communications

The digital channel carries the data stream and DTX status to the decoder, which regenerates a representation of the original speech, and outputs it as the output speech – again as 16-bit PCM at a sampling rate of 8000 samples/second. Since G.729 is a uses lossy compression, the output speech is not identical to the input speech.

The decoder is also fed a frame erase flag, which is an indication that the decode stream has temporarily been corrupted. The decoder is able to “smooth over” the output , doing its best to conceal the loss of data and minimize the loss in voice quality. This process is known as packet loss concealment (PLC). It works surprisingly well even under high packet loss rates.

Adaptive Digital’s G.729AB voice compression algorithm is a highly optimized version of the G.729 ITU Annex A and Annex B standard. G.729 AB offers toll quality speech at a reasonably low bit rate of 8Kbps. The G.729 AB codec uses Discontinuous Transmission (DTX), Voice Activity Detection (VAD), and Comfort Noise Generation (CNG) to reduce bandwidth usage. G.729AB is used in wireless voice, voice-over-packet-networks, multimedia, and voice circuit multiplexing applications.

Standard / AnnexDescriptionBit Rate 
(kbps)
DTX AnnexMOS
G.729G.729 main body (original)8Annex  B3.9
G.729  /ALower Complexity G.7298Annex  B3.7
G.729 /  CG.729 floating point83.7
G.729 /  C+Floating Point, with DTX and multiple bit rates6.4/8/12.4Annex  B6.4 kbps: 3.6
8 kbps: 3.9 
12.4 kbps:  4.1
G.729 / DMultiple bit rates6.4 / 8Annex  F6.4 kbps: 3.6
8 kbps: 3.9
G.729 /  EHigher Quality Vocoder12.4Annex  G4.2

The first column in the table lists the ITU standard and applicable DTX Annex. The last column in thetable lists the G.729 MOS (Mean Opinion Score) for the various flavors. MOS is a subjective rating given to vocoders. MOS runs a scale from 1 to 5, with 1 being the worst and 5 being the best. 

A score of 4 and above is considered to be “toll quality” speech.

 

Note the column labeled DTX annex. Although the G.729 family of vocoders does an excellent job of compressing speech, it does even better when using Discontinuous Transmission or DTX. DTX is the process by which the encoder determines on a frame-by-frame basis whether there is voice activity or not. If there is no voice activity, the encoder produces either a reduced bit rate (DTX) frame of compressed data representing the background noise characteristics, or it produces no data at all. If the decoder receives a full voice packet, it regenerates speech. If it receives a DTX frame, it generates noise that is representative of the background noise. If it receives no frame at all, it continues to generate background noise according to the specifications from the most recent DTX frame. (If the decoder was expecting a speech frame but received nothing, it will perform its packet loss concealment instead.)

That all said , the DTX annex column in the table above lists the annex letter to the G.729 specification that describes how DTX is to be performed in conjunction with the associated base annex. Let’s take the first row in the table, for example – G.729 (main body). G.729 compresses speech, with a compressed bit rate of 8 kbps. If DTX is be used, it will be specified by G.729 Annex B. When G.729 is combined with it’s Annex B DTX feature, the combined vocoder is often referred to as G.729B. Similarly, when G.729 D is combined with its DTX feature, the combined vocoder is often referred to as G.729D/F.

A standard G.729 packet contains 80 bits of compressed data representing a 10 millisecond frame of speech. The 8 kbps rate comes from: 8000 bits/second = 80 bits / 0.01 seconds. A G.729 Annex B DTX packet contains 16 bits, resulting in a bit rate of 1600 bps. Of course, a real conversation will not operate at 1600 bps unless there is only background noise present. The actual bit rate when using DTX lies somewhere between 1600 bps and 8000 bps. Typically, DTX can save approximately half the channel bandwidth on average. This comes about because telephone calls tend to be half-duplex. Only one person speaks at a time. You could argue therefore that, on average, each person speaks less than half the time.

The other DTX annexes (F and G), offer similar bandwidth savings when combined with their respective base annexes (D and E).

There are a few more annexes of interest. Annex H is a reference implementation of switching between annexes D and E. Annex I is a reference implementation that integrates the G.729 main body with annexes B, D, and E. Annex J is G.729’s answer to audio coding. G.729J increases the audio bandwidth from 3.3 kHz to 7 kHz. Annex J is a variable bit rate codec with bit rates between 8 and 32 kbps. Annex J has been published as a separate standard – G.729.1.

Let’s get back to the G.729 appendices. Appendix 1 discusses the external reset performance for G.729 codecs in systems that use an external DTX.

Appendices 2 and 3 are workarounds that have been devised to eradicate a deficiency that has been identified in the Annex B voice activity detector.

In the VoIP space, which is our primary interest, G.729 (main body) has been deemed by most designers to be too complex. In nuts and bolts terms, that means that it requires lots of DSP horsepower and hence reduces the number of channels of the vocoder that can be run on a given DSP. But people do like the voice quality / bit rate combination afforded by G.729 (main body). As a result, many users opt for G.729A, which yields almost the same voice quality as G.729 at the same bit rate of 8 kbps, but at around half the complexity. Many users also opt for the DTX, making G.729AB the most popular.

G.729E requires more bandwidth (12.4 kbps) than G.729A (8 kbps) or G.729D (6.4 kbps), but G.729E offers somewhat better voice quality than G.729A (4.2 vs. 3.7) and significantly better quality when passing music-on-hold. G.729E by no means compares with audio or music codecs. After all, G.729E starts with a sampling rate if 8 kHz and is therefore restricted to the telecom bandwidth of 300-3300 Hz, which is nowhere what is necessary for high fidelity (or medium fidelity) music. But, G.729/A and G.729D are absolutely lousy when it comes to music-on-hold.

Low bit rate vocoders look at their input signals and try to model them using a human vocal tract model. That model limits the tools available to the vocoder. So if the input signal is speech, the low bit rate vocoder does a reasonably good job at modeling and therefore compressing the speech without losing too much fidelity. By increasing the bit rate to 12.4 kbps and by adding tools, G.729E performs better than its lower bit rate counterparts while maintaining its voice tools. But it is no substitute to audio and music codecs.

Another aspect to G.729 that is of interest is its ability (or lack thereof) to pass DTMF signals and modem signals reliably. In the case of DTMF signals, G.729 can pass the tones to some extent, and under the right conditions a DTMF detector can detect the resulting synthesized tones. But “under the right conditions” is usually not good enough for telecom systems. Telecom systems are expected to be able to pass DTMF tones that can be detected reliably under a wide range of specified conditions, some of which are not so good. In order to achieve reliable DTMF handling when using a low bit rate vocoder such as G.729, it is necessary to employ a tone relay function.

 

Function APIs

API function call summary

G729_ADT_encodeInit(. . .)    Initializes the G.729 encoder software
G729_ADT_decodeInit(. . .)     Initializes the G.729 encoder software
G729_ADT_encode(. . .)    Executes the G.729 encoder          
G729_ADT_decode(. . .)    Executes the G.729 decoder
G729_ADT_Annex_(A. . .I)_encoderInit(. . .)   Initializes the G.729 (A. . .I)_ encoder software
G729_ADT_Annex_(A. . .I)_decoderInit(. . .)   Initializes the G.729 (A. . .I)_ encoder software
G729_ADT_Annex_(A. . .I)_encode(. . .)    Executes the G.729 (A. . .I)_ encoder     
G729_ADT_Annex_(A. . .I)_decode(. . .)    Executes the G.729 (A. . .I)_ decod

Translate »