CODEC


Analog Voice to PCM
Frame
Frame Size
G.729
iLBC
Packet
Addressing
Header Size

Untitled Document
Analog Voice to PCM

⊕ A2D

♦ An analog voice signal is received

♦ The signal is converted to a Pulse Code Modulation (PCM) digital stream

⊕ PCM Processing

♦ Remove echo

♦ Remove silence

♦ Tone Detection

    detected signaling tones are routed around the CODEC. Most CODECs garble signaling tones to the point that they are unrecognizable by the devices they are intended for.

♦ Remaining PCM samples are forwarded to the CODEC

Wed Mar 17 16:37:39 CST 2010

Untitled Document
Frame

♦ The PCM stream is fed into the CODEC

♦ Voice frames are created

♦ Most CODECs also compress the PCM stream

Codec Bandwidth IP Bandwidth
(2 Way)
Packet Delay (ms)
G.711 64kbps 160kbps 1.0
G.723 6.4 Kbps 34 Kbps 67.5
G.729a 8 Kbps 48 Kbps 25.0
iLBC 13.3/15 Kbps   30/20
Wed Mar 17 16:37:39 CST 2010 Untitled Document
Frame Size

♦ In g.729, each frame samples 10ms (80bytes) of voice streams and compressed to a 10 bytes frame.

Sampleing Freq 8000 Samples/Sec
Bits Per Sample 8 bits
Bits Per Second 64 Kbps
G.729 Frame Size (ms) 10ms
G.729 Frame Size (bytes) Before Compression 80 bytes
G.729 Frame Size (bytes) After Compression 10 bytes
iLBC Frame Size (ms) 20/30ms
iLBC Frame Size (bytes) Before Compression 160/240 bytes
iLBC Frame Size (bytes) After Compression 30/40 bytes
Wed Mar 17 16:37:39 CST 2010 Untitled Document
G.729

    ITU-T G.729語音壓縮標準技術利用 Conjugate-Structure Algebraic Code Excited Linear Prediction (CS-ACELP)演算法, 所發展出來的技術,其所用語音 frame 為10ms, 所以每一 frame 有80個取樣值(80 bytes)。在每10ms的時間內,語音訊號會被分析, 並利用CELP演算法,取出其特性參數,然後編碼成80 bits 的 frame, 裡面含有代表那段時域訊號對應於CELP的參數,壓縮比為8:1。

    G.729語音壓縮標準的應用非常廣泛,如VoIP網路閘道、IP電話、 視訊會議和電話會議等。ITU當初制定G.729語音壓縮標準時, 為了使其具有低位元率、高音質、卻又低複雜度的 特性,在G.729演算法中運用了相當多的專利技術, 其中大部分的專利為國際各大主要電 信業廠商所持有,這些公司包括法國電信(France Telecom)、Universite de Sherbrooke 及日本電報電話公司(NTT)。它們於1998年3月組織了G.729專利聯盟, 並委由Sipro Lab Telecom公司作為此聯盟的代表,負責處理各專利授權問題。 業者必須事先獲得相關專利 授權許可,方能合法使用生產ITU-T G.729相關產品。

♦ Reference:

U.S. Patent 5664055 ," CS-ACELP speech compression system with adaptive pitch prediction filter gain based on a measure of periodicity", http://www.freepatentsonline.com/5664055.html.
http://www.itu.int/rec/T-REC-G.729/e
Wed Mar 17 16:37:40 CST 2010 Untitled Document
iLBC

    iLBC (internet Low Bitrate Codec) 是一種免授權的編碼標準。 iLBC在有封包遺失的條件下的其性能明顯優於 G.723、G.728、G.729、GSM等標準編碼。

    iLBC是為專為提供穩健的IP語音通訊而開發的語音編碼, 使用8kHz的取樣率。 iLBC編解碼器支持兩種frame size,在13.3kbps位元率下編碼 的 frame size 為30ms,而15.2kbps位元率下編碼 的 frame size 則為20ms。

    使用iLBC編碼的封包可以獨立解碼, IP封包丟時,聲音的損失只侷限在丟失的封包上, 不會影響其他封包的解碼, 因此iLBC抗封包遺失的能力高於其他編碼標準。

♦ Reference:

http://www.vocal.com/ilbc.html
Wed Mar 17 16:37:40 CST 2010 Untitled Document
Packet

⊕ Frames to Packets

♦ Packet Assembler Software within the DSP takes frames from the CODEC and created packets

    several frames may be confined in a single packet

    A 12 byte RTP Header is added

      provides sequence number

      Time stamp

    The packet is forwarded to the gateway's host processor

    The packet is forwarded to the gateway's host processor

Wed Mar 17 16:37:40 CST 2010 Untitled Document
Addressing

    Dialed digits identified by the tone detection performed in the DSP are used to determin the destination number

    This number is mapped to an IP address

301-999-1212 192.128.100.2

    A 20 byte IP Header is added to the packet containging:

      IP address of this gateway (the source address)

      IP address of this destination gateway

    An 8 byte UDP header containing source and edestination sockets is also added

♦ packets are routed in the Intenet

Wed Mar 17 16:37:40 CST 2010 Untitled Document
Header Size
Protocol Size
(bytes)
RTP 12
UDP 8
IP 20
Total 40
Wed Mar 17 16:37:40 CST 2010