As an Amazon Associate I earn from qualifying purchases.

Codec Overview: Portmanteaux, Conjugate Structures and Lots of Code Excitement

I have to admit something.  I have short-term memory when it comes to studying certain topics in
preparation for the CCIE Voice or (now) the CCIE Collaboration certification.  Codecs and DSPs are full to the rim with bit rates, acronyms and trickery that always have me scrambling to confirm my fleeting memory of them.  So, I'm embarking to try to make more sense of it all.  Here we go!

Definition of "Codec"


In a general sense, the word "codec" is a portmanteau of "coder-decoder" or "compressor-decompressor".  As it pertains to voice technologies, it simply defines a method for converting analog voice signals to a digital form and then back to audio so that a remote party hears a rendition that closely approximates the original analog voice input.  (i.e,. audio compression format)

Codecs that reduce quality in order to achieve compression are considered "lossy".  This is an important concept when it comes to considering how to design network bandwidth requirements between call parties.  The ideal codec will consume minimal network bandwidth AND provide excellent quality ( minimal loss ).


Technical Details of ITU-T Audio Compression Formats

 

Audio Codec Compression Algorithms


  • Pulse Code Modulation (PCM):  In a PCM stream, the amplitude of the analog signal is sampled regularly at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps.
  • Adaptive Differential Pulse Code Modulation (ADPCM): Adaptive differential pulse-code modulation (ADPCM) is a variant of differential pulse-code modulation (DPCM) that varies the size of the quantization step, to allow further reduction of the required bandwidth for a given signal-to-noise ratio.
  • Low-Delay Code Excited Linear Prediction (LDCELP): Delay of the codec is only 5 samples (0.625 ms). The linear prediction is calculated backwards with a 50th order linear predictive coding filter. The excitation is generated with gain scaled VQ. The essence of CELP techniques, which is an analysis-by-synthesis approach to codebook search, is retained in LD-CELP. The LD-CELP however, uses backward adaptation of predictors and gain to achieve an algorithmic delay of 0.625 ms.
  • Conjugate-Structure Algebraic-Code-Excited Linear-Prediction (CS-ACELP): A voice compression algorithm defined in ITU-T G.729,ACELP improves on CELP through the algebraic expression, rather than the numeric description, of each entry in the codebook. ACELP yields quality that is considered to be as good as ADPCM, but requiring bandwidth of only 8 kbps, which yields a compression ration of 8:1. 
  • Multi-Pulse, Multi-Level Quantization (MP-MLQ):  Used by the high-rate coder portion of the ITU-T G.723.1 standard.

 

Codec Mean Opinion Scores


Each codec provides a certain quality of speech. The quality of transmitted speech is a subjective opinion of the listener. The mean opinion score (MOS) is a scale from 1 (bad) to 5 (excellent) used to rate the average quality.  Notice in the scale below the relationship between "Bit Rate" and "Compression Delay". These are important considerations when designing a voice network.

Compression Method Bit Rate (kbps) MOS Score Compression Delay (ms)
G.711 PCM 64 4.1 0.75
G.726 ADPCM 32 3.85 1
G.728 LD-CELP 16 3.61 3 to 5
G.729 CS-ACELP 8 3.92 10
G.729 x 2 Encodings 8 3.27 10
G.729 x 3 Encodings 8 2.68 10
G.729a CS-ACELP 8 3.7 10
G.723.1 MP-MLQ 6.3 3.9 30
G.723.1 ACELP 5.3 3.65 30

Codec DSP Complexity


Some codecs require additional DSP processing power to handle the required computations of the codec. High complexity codecs will result in fewer calls per DSP. 

  • Medium Complexity:  G.711 (a-law and u-law), G.726, G.729ab (G.729a Annex B)
  • High Complexity:  G.728, G.723, G.729, G.729b (G.729 Annex B)
Thanks to @ciscovoicedude for pointing out the following as published on their DSP Calculator:

Low Complexity Codecs: G.711, Fax Passthrough, Modem Passthrough, and Clear-Channel
Medium Complexity Codecs: G.726, G.729A, G.729AB, G.722, and T.38 Fax Relay
High Complexity Codecs: G.729, G.729B, G.723, G.728, iLBC, GSM-AMR, T.38 SG3 Fax, and Modem Relay

In Summary


That's a good start for now!  So many more codec topics that get much more detailed and are better left for another post later.  

No comments:

Post a Comment