1 / 15

Adaptive Differential Pulse Code Modulation

Adaptive Differential Pulse Code Modulation. Instructor: Chia-Tsun Wu. 11/18/2004. 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.

peigi
Télécharger la présentation

Adaptive Differential Pulse Code Modulation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Adaptive Differential Pulse Code Modulation Instructor: Chia-Tsun Wu. 11/18/2004

  2. 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

  3. File format for voice data files

  4. ADPCM encoding algorithm

  5. 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

  6. ADPCM decoding algorithm

  7. 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)

  8. Step size determination

  9. Initial and reset conditions • Step size ss(n) = 16 • Estimated waveform value X = 0 (half scale) • No DC offset input

  10. ADPCM CODEC C example code • Please refer to reference [2]

  11. 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

  12. Distortions Source ADPCM encode

  13. Distortions cont’

  14. 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)

  15. Reference • http://resource.intel.com/telecom/support/appnotes/adpcm.pdf • http://strawberry.resnet.mtu.edu/pub/Microchip/Dsk1/10/appnote/category/pic16/

More Related