G.711

G.711 is an ITU-T standard for audio companding. It is primarily used in telephony. The standard was released for usage in 1972. Its formal name is Pulse code modulation (PCM) of voice frequencies. It is required standard in many technologies, for example in H.320 and H.323 specifications. It can also be used for fax communication over IP networks (as defined in T.38 specification). G.711, also known as Pulse Code Modulation (PCM), is a very commonly used waveform codec. G.711 uses a sampling rate of 8,000 samples per second, with the tolerance on that rate 50 parts per million (ppm). Non-uniform (logarithmic) quantization with 8 bits is used to represent each sample, resulting in a 64 kbit/s bit rate. There are two slightly different versions; μ-law, which is used primarily in North America, and A-law, which is in use in most other countries outside North America.

Two enhancements to G.711 have been published: G.711.0 utilizes lossless data compression to reduce the bandwidth usage and G.711.1 increases audio quality by increasing bandwidth.

Contents

Features

Types

G.711 defines two main compression algorithms, the µ-law algorithm (used in North America & Japan) and A-law algorithm (used in Europe and the rest of the world). Both are logarithmic, but A-law was specifically designed to be simpler for a computer to process. The standard also defines a sequence of repeating code values which defines the power level of 0 dB.

The µ-law and A-law algorithms encode 14-bit and 13-bit signed linear PCM samples (respectively) to logarithmic 8-bit samples. Thus, the G.711 encoder will create a 64 kbit/s bitstream for a signal sampled at 8 kHz.[1]

G.711 μ-law tends to give more resolution to higher range signals while G.711 A-law provides more quantization levels at lower signal levels.

A-Law

A-law encoding thus takes a 13-bit signed linear audio sample as input and converts it to an 8 bit value as follows:

Linear input code Compressed code
s0000000wxyza s000wxyz
s0000001wxyza s001wxyz
s000001wxyzab s010wxyz
s00001wxyzabc s011wxyz
s0001wxyzabcd s100wxyz
s001wxyzabcde s101wxyz
s01wxyzabcdef s110wxyz
s1wxyzabcdefg s111wxyz

Where s is the sign bit. So for example, 1'0000'0001'0101 maps to 1000'1010 (according to the first row of the table), and 0'0000'0011'0101 maps to 0001'1010 (according to the second).

This can be seen as a floating point number with 4 bits of mantissa and 3 bits of exponent.

In addition, the standard specifies that all resulting even bits are inverted before the octet is transmitted. This is to provide plenty of 0/1 transitions to facilitate the clock recovery process in the PCM receivers. Thus, a silent A-law encoded PCM channel has the 8 bit samples coded 0x55 instead of 0x00 in the octets (or 0xD5 if the sign bit happens to be set).

Note that the ITU define bit 1 to have the value 128 and bit 8 to have the value 1.

The more widely accepted convention has bit 7 = 128 and bit 0 = 1.

Note that when data is sent over E0 (G.703), MSB (signbit) is sent first and LSB is sent last.

μ-Law

μ-law encoding takes a 14-bit signed linear audio sample as input, increases the magnitude by 32 (binary 100000), and converts it to an 8 bit value as follows:

Linear input code Compressed code
s00000001wxyza s000wxyz
s0000001wxyzab s001wxyz
s000001wxyzabc s010wxyz
s00001wxyzabcd s011wxyz
s0001wxyzabcde s100wxyz
s001wxyzabcdef s101wxyz
s01wxyzabcdefg s110wxyz
s1wxyzabcdefgh s111wxyz

Where s is the sign bit.

In addition, the standard specifies that all result bits are inverted before the octet is transmitted. Thus, a silent μ-law encoded PCM channel has the 8 bit samples coded 0xFF instead of 0x00 in the octets.

Also the "trick" of adding 32 means μ-law does not encode all 14-bit values; inputs must be within ±8159.

G.711.0

G.711.0, also known as G.711 LLC, utilizes lossless data compression to reduce the bandwidth usage by as much as 50 percent.[2] The Lossless compression of G.711 pulse code modulation standard was approved by ITU-T in September 2009.[3][4]

G.711.1

G.711.1 is an extension to G.711, published as ITU-T Recommendation G.711.1 in March 2008. Its formal name is Wideband embedded extension for G.711 pulse code modulation.[4][5]

G.711.1, allows the addition of narrowband and/or wideband (16000 samples/s) enhancements, each at 25 % of the bitrate of the (included) base G.711 bitstream, leading to data rates of 64, 80 or 96 kbit/s.

G.711.1 is compatible with G.711 at 64 kbit/s, hence an efficient deployment in existing G.711-based voice over IP (VoIP) infrastructures is foreseen. The G.711.1 coder can encode signals at 16 kHz with a bandwidth of 50–7000 Hz at 80 and 96 kbit/s, and for 8-kHz sampling the output may produce signals with a bandwidth ranging from 50 up to 4000 Hz, operating at 64 and 80 kbit/s.[5]

The G.711.1 encoder creates embedded bitstream structured in three layers corresponding to three available bit rates: 64, 80 and 96 kbit/s. The bitstream does not contain any information on which layers are contained, an implementation would require outband signalling on which layers are available. The three G.711.1 layers are: log companded pulse code modulation (PCM) of the lower band including noise feedback, embedded PCM extension with adaptive bit allocation for enhancing the quality of the base layer in the lower band, and weighted vector quantization coding of the higher band based on modified discrete cosine transformation (MDCT).[5]

Two extensions for G.711.1 are planned in 2010: superwideband extension (bandwidth to 14000 Hz) and lossless bitstream compression.[6]

Licensing

Since G.711 was released in 1972 its patents have long since expired, so it is freely available.[7]

See also

References

  1. ^ G.711 : Pulse code modulation (PCM) of voice frequencies; ITU-T Recommendation (11/1988), Retrieved on 2009-07-08
  2. ^ ITU-T (2009-07-17). "ITU-T Newslog - Voice codec gets new lossless compression". http://www.itu.int/ITU-T/newslog/Voice+Codec+Gets+New+Lossless+Compression.aspx. Retrieved 2010-02-28. 
  3. ^ ITU-T. "G.711.0 : Lossless compression of G.711 pulse code modulation". http://www.itu.int/rec/T-REC-G.711.0-200909-P/en. Retrieved 2010-02-28. 
  4. ^ a b Recent Audio/Speech Coding Developments in ITU-T and future trends, 2008-08, http://www.eurasip.org/Proceedings/Eusipco/Eusipco2008/plenaries/lamblin.pdf, retrieved 2010-02-28 
  5. ^ a b c ITU-T (2008) G.711.1 : Wideband embedded extension for G.711 pulse code modulation Retrieved on 2009-06-19
  6. ^ Nokia Research Center (2009-04-06), Coding standards, http://www.ficora.fi/attachments/suomiry/5lN8SYM14/Stand09-Hagqvist.pdf, retrieved 2010-03-01 
  7. ^ "G711 Spec". http://www.itu.int/ITU-T/recommendations/related_ps.aspx?id_prod=911. Retrieved 2011-07-05. 

External links