Материал: spra118

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам

Application Report

SPRA118 - May 2002

G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP

Peter Dent

C5000 DSP Software Applications

Aaron Aboagye

 

ABSTRACT

The G.726 is a voice-compression algorithm standard defined by the International Telecommunication Union (ITU). It can be used in many applications such as digital cordeless telephones, radio/wireless local loop, and pair-gain. The software package described in this application report is plug and play compliant with the multichannel framework using the TMS320C54x DSP.

Note: To license the code presented on this application note, please contact “MESI: Miller Engineering Services, Inc. http://www.mesi.net/

Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.1 Introducing the Software Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

1.2 Software Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 CCITT ADPCM Standard: Recommendation G.726 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1 ADPCM Principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

2.2 ADPCM Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.3 ADPCM Decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.4 Encoder Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.4.1 Input PCM Format Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.4.2 Difference Computation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.4.3 Adaptive Quantizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.4.4 Operation at 40 Kbps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2.4.5 Operation at 32 Kbps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.4.6 Operation at 24 Kbps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.4.7 Operation at 16 Kbps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.4.8 Inverse Adaptive Quantizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.4.9 Quantizer Scale Factor Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.4.10 Adaptation Speed Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.4.11 Adaptive Predictor and Reconstructed Signal Calculator . . . . . . . . . . . . . . . . . . . . . . . 13

2.4.12 Tone and Transition Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.5 Decoder Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.5.1 Inverse Adaptive Quantizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.5.2 Quantizer Scale Factor Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.5.3 Adaptation Speed Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.5.4 Adaptive Predictor and Reconstructed Signal Calculator . . . . . . . . . . . . . . . . . . . . . . . 15

Trademarks are the property of their respective owners.

1

SPRA118

2.5.5 Tone and Transition Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5.6 Output PCM Format Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.5.7 Synchronous Coding Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3 Useful Features of the C54x for G.726 ADPCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.1 Input/Output PCM Format Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.1 Log-PCM Companding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.2 Linear PCM Expanding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.1.3 Synchronous Coding Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2 Floating-Point Features: Conversion, Storage, and Multiplication . . . . . . . . . . . . . . . . . . . . . . . 22 3.2.1 Floating-Point Format Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.2 Floating-Point Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.2.3 Floating-Point Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.3 Delayed Variables Management, Use of Circular Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.4 Logarithmic Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.5 3-, 4-, or 5-Bit Quantizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.6 Inverse Quantizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.7 Transition Detector and Trigger Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.8 Double Precision/Dual 16-Bit Arithmetic Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.9 Limitation of Coefficients Using Compare Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.10 Sign Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.11 Coder Rate and PCM Laws Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 3.12 Channel Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4 Data Memory Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.1 Algorithm Tables (Program Space) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5 Program Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

5.1 Channel Initialization Routine: _G726ENC_TI_reset / _G726DEC_TL_reset . . . . . . . . . . . . . 46 5.2 Encoder Routine: G726COD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 5.3 Decoder Routine: g726_decode1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.4 Brief Functional Description of Each Sub-Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 5.4.1 FMULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.4.2 ACCUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 5.4.3 LIMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.4.4 MIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.4.5 EXPAND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.4.6 SUBTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 5.4.7 LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.4.8 SUBTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.4.9 QUAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.4.10 RECONST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 5.4.11 ADDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4.12 ANTILOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4.13 ADDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 5.4.14 ADDC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.4.15 FUNCTF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.4.16 FILTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.4.17 FILTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5.4.18 TRANS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.4.19 TRIGA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

2 G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP

SPRA118

5.4.20 TRIGB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.4.21 UPA2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 5.4.22 LIMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.4.23 UPA1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.4.24 LIMD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.4.25 XOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.4.26 UPB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.4.27 TONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.4.28 SUBTC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.4.29 FILTC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 5.4.30 FUNCTW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.4.31 FILTD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.4.32 LIMB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.4.33 FILTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 5.4.34 FLOATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.4.35 FLOATB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.4.36 DELAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.4.37 COMPRESS (decoder only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.4.38 SYNC (decoder only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

List of Figures

Figure 1. ADPCM Encoder and Decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Figure 2. Encoder Block Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Figure 3. Decoder Block Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

 

List of Tables

 

Table 1.

Quantizer Normalized Input/Output Characteristic for 40 Kbps Operation . . . . . . . . . . . . . . . .

. 8

Table 2.

Quantizer Normalized Input/Output Characteristic for 32 Kbps Operation . . . . . . . . . . . . . . . . .

9

Table 3.

Quantizer Normalized Input/Output Characteristic for 24 Kbps Operation . . . . . . . . . . . . . . . .

10

Table 4.

Quantizer Normalized Input/Output Characteristic for 16 Kbps Operation . . . . . . . . . . . . . . . .

10

Table 5.

Internal Processing Delayed Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

Table 6.

Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

Table 7.

Address Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

Table 8.

Global Variables: G.726 Commands, Input and Output Signals . . . . . . . . . . . . . . . . . . . . . . . . .

37

Table 9. Coder Rate and PCM-Law Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

Table 10.

Temporary Internal Processing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

Table 11.

Temporary Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

Table 12.

Quantizer Definition for 40-Kbps ADPCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39

Table 13.

Quantizer Definition for 32-Kbps ADPCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

Table 14.

Quantizer Definition for 24-Kbps ADPCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

Table 15.

Quantizer Definition for 16-Kbps ADPCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

Table 16. Quantizer Output Levels for 40-Kbps ADPCM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP

3

SPRA118

where yu (k) is limited by:

 

1.06 v yu(k) v 10.00

(5)

 

For 40-Kbps ADPCM, the discrete function, W(I), is defined as follows (infinite precision values):

|I(k)|

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

W|I(k)|

43.50

33.06

27.50

22.38

17.50

13.69

11.19

8.81

6.25

3.63

2.56

2.50

2.44

1.50

0.88

0.88

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For 32-Kbps ADPCM, the discrete function, W(I), is defined as follows (infinite precision values):

|I(k)|

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

W|I(k)|

70.13

22.19

12.38

7.00

4.00

2.56

1.13

–0.75

 

 

 

 

 

 

 

 

 

For 24-Kbps ADPCM, the discrete function, W(I), is defined as follows (infinite precision values):

|I(k)|

3

2

1

0

 

 

 

 

 

W|I(k)|

36.38

8.56

1.88

–0.25

 

 

 

 

 

For 16-Kbps ADPCM, the discrete function, W(I), is defined as follows (infinite precision values):

|I(k)|

1

0

 

 

 

W|I(k)|

27.44

–1.38

 

 

 

The factor (1–2–5) introduces finite memory into the adaptive process so that the states of the encoder and the decoder converge following transmission errors.

The slow (locked) scale factor, yl (k), is derived from yu (k), with a low pass-filter operation:

 

yl(k) + 1 * 2*6 yl(k * 1) ) 2*6 yu(k)

(6)

The fast and slow scale factors are then combined to form the resultant scale factor:

 

y(k) + al (k) yu (k * 1) ) 1 * al (k) yl (k * 1)

(7)

Where

 

0 v al(k) v 1

(8)

2.4.10Adaptation Speed Control

The controlling parameter, al (k), can assume values in the range [0, 1]. It tends towards unity for speech signals, and towards zero for voiceband data signals. It is derived from a measure of the rate-of-change of the difference signal values.

Two measures of the average magnitude of I(k) are computed:

dms (k)

+ 1 * 2*5 dms(k * 1) ) 2*5 F I(k)

(9)

and

 

 

dml (k)

+ 1 * 2*7 dml(k * 1) ) 2*7 F I(k)

(10)

 

G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP

11

SPRA118

For 40-Kbps ADPCM, F|I(k)| is defined by:

|I(k)|

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

F|I(k)|

6

6

5

4

3

2

1

1

1

1

1

0

0

0

0

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

For 32-Kbps ADPCM, F|I(k)| is defined by:

|I(k)|

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

F|I(k)|

7

3

1

1

1

0

0

0

 

 

 

 

 

 

 

 

 

For 24-Kbps ADPCM, F|I(k)| is defined by:

|I(k)|

3

2

1

0

 

 

 

 

 

F|I(k)|

7

2

1

0

 

 

 

 

 

For 16-Kbps ADPCM, F|I(k)| is defined by:

|I(k)|

1

0

 

 

 

F|I(k)|

7

0

 

 

 

Thus, dms (k) is a relatively short-term average of F|I(k)|, and dml (k) is a relatively long-term average of F|I(k)|.

Using these two averages, the variable ap (k) is defined:

1 * 2*4ap (k * 1) ) 2*3, if dms (k) * dml (k) w 2*3 dml (k)

1 * 2*4ap (k * 1) ) 2*3, if y (k) ¦ 3 (11) ap (k) + 1 * 2*4ap (k * 1) ) 2*3, if td (k) + 1

1, if tr (k) + 1

1 * 2*4 ap (k * 1), otherwise

Thus, ap (k) tends towards the value 2 if the difference signal between dms (k) and dml (k) is large (average magnitude of I(k) changing), and ap (k) tends towards the value 0 if the difference is small (average magnitude of I(k) relatively constant). ap (k) also tends towards 2 for idle channel (indicated by y(k) t 3) or partial band signals (indicated by td (k) = 1 as described in section 2.4.12). Note that ap (k) is set to 1 upon detection of a partial band signal transition (indicated by tr (k) = 1, see section 2.4.12 ).

ap (k) is then limited to yield al (k) used in equation (7) above:

1,

ap (k * 1) § 1

(12)

al (k) + ap (k * 1) ap (k * 1) v 1

 

12 G.726 Adaptive Differential Pulse Code Modulation (ADPCM) on the TMS320C54x DSP

Источник: https://studfile.net/preview/16497444/