Adaptive Differential Pulse Code Adaptive Differential Pulse Code - - PowerPoint PPT Presentation

adaptive differential pulse code adaptive differential
SMART_READER_LITE
LIVE PREVIEW

Adaptive Differential Pulse Code Adaptive Differential Pulse Code - - PowerPoint PPT Presentation

Graduate Institute of Electronics Engineering, NTU Adaptive Differential Pulse Code Adaptive Differential Pulse Code Modulation Modulation Instructor: Chia-Tsun Wu. 11/18/2004 ACCESS IC LAB ACCESS IC LAB Graduate Institute of Electronics


slide-1
SLIDE 1

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

Adaptive Differential Pulse Code Adaptive Differential Pulse Code Modulation Modulation

Instructor: Chia-Tsun Wu. 11/18/2004

slide-2
SLIDE 2

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P2

Outline Outline

File format for voice data files ADPCM encoding algorithm ADPCM decoding algorithm Step size determination Initial and reset conditions ADPCM CODEC C example code LAB

slide-3
SLIDE 3

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P3

File format for voice data files File format for voice data files

slide-4
SLIDE 4

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P4

ADPCM encoding algorithm ADPCM encoding algorithm

slide-5
SLIDE 5

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P5

ADPCM encoding algorithm ADPCM encoding algorithm

let B3 = B2 = B1 = B0 = 0 if (d(n) < 0) then B3 = 1 d(n) = ABS(d(n)) if (d(n) >= ss(n)) then B2 = 1 and d(n) = d(n) - ss(n) if (d(n) >= ss(n) / 2) then B1 = 1 and d(n) = d(n) - ss(n) / 2 if (d(n) >= ss(n) / 4) then B0 = 1 L(n) = (10002 * B3) + (1002 * B2) + (102 * B1) + B0

slide-6
SLIDE 6

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P6

ADPCM decoding algorithm ADPCM decoding algorithm

slide-7
SLIDE 7

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P7

ADPCM decoding algorithm ADPCM decoding algorithm

d(n) = (ss(n)*B2) + (ss(n)/2*B1) + (ss(n)/4*BO) + (ss(n)/8) if (B3 = 1) then d(n) = d(n) * (-1) X(n) = X(n-1) + d(n)

slide-8
SLIDE 8

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P8

Step size determination Step size determination

slide-9
SLIDE 9

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P9

Initial and reset conditions Initial and reset conditions

Step size ss(n) = 16 Estimated waveform value X = 0 (half scale) No DC offset input

slide-10
SLIDE 10

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P10

ADPCM CODEC C example code ADPCM CODEC C example code

Please refer to reference [2]

slide-11
SLIDE 11

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P11

Two examples Two examples

Example 1:

Speech: 8 bits resolutions, 22.5K sample rate ADPCM encode to 2 bits per sample

Example 2:

Music: 8 bits resolutions, 22.5K sample rate ADPCM encode to 2 bits per sample

slide-12
SLIDE 12

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P12

Distortions Distortions

Source ADPCM encode

slide-13
SLIDE 13

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P13

Distortions cont Distortions cont

slide-14
SLIDE 14

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P14

LAB LAB

Lab 1: Write a 16 to 4 or 12 to 4 ADPCM CODEC

Sample rate: 8KHz for speech Resolutions: 16 or 12 bits Encode to 4 bits

Lab 2: Write a 16 to 4 or 12 to 4 ADPCM CODEC

Sample rate: 44.1K for music Resolutions: 16 bits Encode to 4 bits

Lab 3: Write a 8 to 2 ADPCM CODEC

Sample rate: 8KHz for speech Resolutions: 8 bits Encode to 2 bits

Bonus: try to explain and optimal your algorithm to reduce distortions or noise. (need more analysis)

slide-15
SLIDE 15

ACCESS IC LAB

Graduate Institute of Electronics Engineering, NTU

P15

Reference Reference

http://resource.intel.com/telecom/support/app notes/adpcm.pdf http://strawberry.resnet.mtu.edu/pub/Microchi p/Dsk1/10/appnote/category/pic16/