- •ABSTRACT
- •Contents
- •List of Figures
- •List of Tables
- •Introduction
- •Introducing the Software Application
- •Software Features
- •CCITT ADPCM Standard: Recommendation G.726
- •ADPCM Principle
- •ADPCM Encoder
- •ADPCM Decoder
- •Encoder Description
- •Input PCM Format Conversion
- •Difference Computation
- •Adaptive Quantizer
- •Operation at 40 Kbps
- •Operation at 32 Kbps
- •Operation at 24 Kbps
- •Operation at 16 Kbps
- •Inverse Adaptive Quantizer
- •Quantizer Scale Factor Adaptation
- •Adaptation Speed Control
- •Adaptive Predictor and Reconstructed Signal Calculator
- •Tone and Transition Detector
- •Decoder Description
- •Inverse Adaptive Quantizer
- •Quantizer Scale Factor Adaptation
- •Adaptation Speed Control
- •Adaptive Predictor and Reconstructed Signal Calculator
- •Tone and Transition Detector
- •Output PCM Format Conversion
- •Synchronous Coding Adjustment
- •Useful Features of the C54x for G.726 ADPCM
- •Input/Output PCM Format Conversions
- •Linear PCM Expanding
- •Synchronous Coding Adjustment
- •Delayed Variables Management, Use of Circular Buffers
- •Logarithmic Conversion
- •3-, 4-, or 5-Bit Quantizer
- •Inverse Quantizer
- •Transition Detector and Trigger Process
- •Limitation of Coefficients Using Compare Unit
- •Sign Representation
- •Coder Rate and PCM Laws Selection
- •Channel Selection
- •Data Memory Organization
- •Algorithm Tables (Program Space)
- •Program Organization
- •Channel Initialization Routine: _G726ENC_TI_reset / _G726DEC_TL_reset
- •Encoder Routine: G726COD
- •Decoder Routine: g726_decode1
- •FMULT
- •ACCUM
- •LIMA
- •EXPAND
- •SUBTA
- •SUBTB
- •QUAN
- •RECONST
- •ADDA
- •ANTILOG
- •ADDB
- •ADDC
- •FUNCTF
- •FILTA
- •FILTB
- •TRANS
- •TRIGA
- •TRIGB
- •LIMC
- •LIMD
- •TONE
- •SUBTC
- •FILTC
- •FUNCTW
- •FILTD
- •LIMB
- •FILTE
- •FLOATA
- •FLOATB
- •DELAY
- •COMPRESS (decoder only)
- •SYNC (decoder only)
- •References
- •IMPORTANT NOTICE
SPRA118
For 40-Kbps coding, the adaptive predictor is changed to decrease the leak factor used for zeros coefficient operation. In this case, the previous equation becomes:
bl (k) + 1 * 2*9 bl (k * 1) ) 2*7 sgn dq (k) sgn dq (k * i) , |
(21) |
If tr (k) = 1 (see section 2.4.12), then b1 (k) = b2 (k) = ... = b6 (k) = 0. |
|
As stated above, sgn[0] = 1, except sgn[dq (k–i)] is defined to be 0 only if dq (k–i) = 0 and i = 0. Note that bi (k) is implicitly limited to $ 2.
2.4.12Tone and Transition Detector
To improve performance for signals originating from frequency shift keying (FSK) modems operating in the character mode, a two-step detection process is defined. First, partial band signal (that is, tone) detection is invoked so that the quantizer can be driven into the fast mode of adaptation:
1, a2 (k) ¦ * 0.71875 |
(22) |
td (k) * 0, otherwise |
|
In addition, a transition from a partial band signal is defined so that the predictor coefficients can be set to zero, and the quantizer can be forced into the fast mode of adaptation:
1, a (k 1) |
|
0.71875 and d |
|
(k) |
|
24.2yl(k*1) |
(23) |
tr (k) * 0, otherwise2 * |
¦ * |
|
q |
|
§ |
|
|
2.5Decoder Description
Figure 3 is a block schematic of the decoder. A functional description of each block is given in section 2.5.1 through section 2.5.7.
14 G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP
SPRA118
ADPCM |
I(k) |
Inverse |
dq(k) |
Reconstructed |
sr(k) |
Output PCM |
sp(k) |
Synchronous |
sd(k) |
PCM |
|
Adaptive |
Signal |
Format |
Coding |
||||||||
Input |
|
|
|
|
|
Output |
|||||
|
Quantizer |
Calculation |
|
Conversion |
|
Adjustment |
|
||||
|
|
|
|
|
|
||||||
|
|
|
|
se(k) |
|
|
|
|
|
|
|
|
|
|
|
Adaptive |
|
|
|
|
|
|
|
|
|
|
|
Predictor |
|
|
|
|
|
|
|
|
|
|
|
a2(k) |
|
|
|
|
|
|
|
|
|
Quantizer |
y(k) |
Adaptation |
tr(k) |
Tone and |
|
|
|
|
|
|
|
Scale factor |
al(k) |
Speed |
td(k) |
Transition |
|
|
|
|
|
|
|
Adaptation |
Control |
Detection |
|
|
|
|
|||
|
|
|
|
|
|
|
|
||||
|
|
yl(k) |
|
|
|
|
|
|
|
Figure 3. Decoder Block Schematic
2.5.1Inverse Adaptive Quantizer
The function of this block is described in section 2.4.8.
2.5.2Quantizer Scale Factor Adaptation
The function of this block is described in section 2.4.9.
2.5.3Adaptation Speed Control
The function of this block is described in section 2.4.10.
2.5.4Adaptive Predictor and Reconstructed Signal Calculator
The function of this block is described in section 2.4.11.
2.5.5Tone and Transition Detector
The function of this block is described in section 2.4.12.
2.5.6Output PCM Format Conversion
This block converts the reconstructed uniform PCM signal, sr(k , into an A-law or m-law PCM signa,l sp(k), as required.
2.5.7Synchronous Coding Adjustment
The synchronous coding adjustment prevents cumulative distortion occurring on synchronous tandem codings (ADPCM, PCM, ADPCM, etc. digital connections), when:
G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP |
15 |