System information

We’ve all seen optical illusions; likewise, voice-compression algorithms take advantage
of our tendency to interpret what we believe we should hear, rather than what we
actually hear.
The purpose of the various encoding algorithms is to strike a balance
between efficiency and quality.
§
Originally, the term codec referred to a COder/DECoder: a device that converts between
analog and digital. Now, the term seems to relate more to COmpression/
DECompression.
Before we dig into the individual codecs, take a look at Table B-1—it’s a quick reference
that you may want to refer back to.
Table B-1. Codec quick reference
Codec Data bitrate (Kbps) License required?
G.711 64 Kbps No
G.726 16, 24, 32, or 40 Kbps No
G.729A 8 Kbps Yes (no for pass-through)
GSM 13 Kbps No
iLBC 13.3 Kbps (30-ms frames) or 15.2 Kbps (20-ms frames) No
Speex Variable (between 2.15 and 22.4 Kbps) No
G.722 64 Kbps No
G.711
G.711 is the fundamental codec of the PSTN. In fact, if someone refers to PCM (dis-
cussed in Appendix A) with respect to a telephone network, you are allowed to think
of G.711. Two companding methods are used: μlaw in North America and alaw in the
rest of the world. Either one delivers an 8-bit word transmitted 8,000 times per second.
If you do the math, you will see that this requires 64,000 bits to be transmitted per
second.
Many people will tell you that G.711 is an uncompressed codec. This is not exactly
true, as companding is considered a form of compression. What is true is that G.711
is the base codec from which all of the others are derived.
‡ Read the following: “Aoccdrnig to rsereach at an Elingsh uinervtisy, it deosn’t mttaer in waht oredr the ltteers
in a wrod are, the olny iprmoetnt tihng is taht frist and lsat ltteres are in the rghit pclae. The rset can be a
toatl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae we do not raed ervey lteter by istlef,
but the wrod as a wlohe.” (The source of this quote is unknown.) We do the same thing with sound: if there
is enough information, our brains can fill in the gaps.
§ On an audio CD, quality is far more important than saving bandwidth, so the audio is quantized at 16 bits
(times 2, as it’s stereo), with a sampling rate of 44,100 Hz. Considering that the CD was invented in the late
1970s, this was quite impressive stuff back then. The telephone network does not require this level of quality
(and needs to optimize bandwidth), so telephone signals are encoded using 8 bits, at a sampling frequency
of 8,000 Hz.
626 | Appendix B:Protocols for VoIP