O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Audio compression

12.630 visualizações

Publicada em

Publicada em: Tecnologia, Diversão e humor
  • Seja o primeiro a comentar

Audio compression

  1. 1. Audio CompressionM.K.H.Gunasekara – AS2010377J.A.S. Fernando – AS2010362CSC 362 1.5 Seminar IDepartment of Statistics and Computer Science
  2. 2. Overview• Introduction• Pulse Code Modulation• µ - law• A - law• Differential Pulse Code Modulation• Adaptive Differential Pulse Code Modulation• Application• MPEG Audio Compression• MPEG Encoder Architecture• MPEG Audio Compression Algorithm• MPEG Layers• MPEG Layers Applications• Comparison of MPEG audio compression standards• Summary• ReferencesAudio Compression - AS2010377 2
  3. 3. Introduction• A process that is useful for conserving bothtransmission bandwidth and storage space.• The various audio compression techniquesoffer different levels of complexity,compressed audio quality, and amountof data compression.Audio Compression - AS20103773
  4. 4. Audio CompressionAudio Compression - AS2010377 4Lossy Audio Compression• AAC• ADPCM• ATRAC• Dolby AC-3• MP2• MP3Lossless Audio Compression• Apple Lossless• apt-X Lossless• Audio Lossless Coding• Direct Stream Transfer (DST)• Dolby TrueHD• DTS-HD Master Audio• Free Lossless Audio Codec4
  5. 5. What is PCM ?• PCM is a method used to digitally representsampled analog signals.• It is the standard form of digital audio incomputers, Compact Discs, digital telephonyand other digital audio applications.Audio Compression - AS2010377 55
  6. 6. How PCM works ?• Sampling• Quantizing• EncodingAudio Compression - AS2010377 6Figure 01 : Block Diagram of Pulse Code Modulation6
  7. 7. Sampling• Sampling theory (Nyquist)– If input signal has maximum frequency (bandwidth) f,sampling frequency must be at least 2f– With a low-pass filter to interpolate between samples,the input signal can be fully reconstructedExample : highest frequency of telephone voice channel is 3.4 kHzSampling rate ≥ 2 x 3.4≥ 6.8 kHzHence sample rate is 8 kHzAudio Compression - AS2010377 77
  8. 8. Sampling• Ideal - an impulse at each sampling instant• Natural - a pulse of short width with varying amplitude• Flattop - sample and hold, like natural but with singleamplitude valueAudio Compression - AS2010377 8Figure 02 : Sampling Methods8
  9. 9. Quantization• The samples are divided into many discrete levels.Then each sample is numbered according to theircorresponding level.• Quantization error - the coded signal is anapproximation of the actual amplitude value.Figure 03 : Linear Quantization Figure 04 : Non Linear QuantizationAudio Compression - AS2010377 99
  10. 10. Encoding• After quantizing the corresponding level it isto be represented in some manner.• We represent levels in binary format.• Representation of level 50 = 110010Figure 05 : Representation of sample signalAudio Compression - AS2010377 1010
  11. 11. Figure 07- Circuit diagram of pulse code modulationFigure 06- Block diagram of pulse code modulationAudio Compression - AS2010377 1111
  12. 12. What is µ law ?• µ -law encoding is a form of logarithmicquantization or companding.• Its based on the observation that manysignals are statistically more likely to be near alow signal level than a high signal level.• Most quality codecs (including theSparcstations audio codec) use µ -lawencoded samples.Audio Compression - AS2010377 1212
  13. 13. What is A law ?• A-Law compression is extremely similar toMu-Law compression• If the absolute value of the source sample isless than 256, the 16-bit sample is simplyshifted down 4 bits and converted to an 8-bitvalue, thus losing the top 4 bits in the process.Audio Compression - AS2010377 1313
  14. 14. A law and µ lawBoth methods compress 2:1 ratio.• µ -Law has a larger dynamic range compared toA-law• µ -Law has worse distortion with small signalscompared to A-law• µ -Law is used in North-America and Japan whileA-law is commonly used in Europe• A-law takes precedence over µ -law withinternational callsAudio Compression - AS2010377 1414
  15. 15. Differential PCM• Differential pulse-code modulation is a signalencoder that uses the baseline of pulse-codemodulation but adds some functionalitiesbased on the prediction of the samples of thesignal.Audio Compression - AS2010377 1515
  16. 16. Adaptive Differential PCM• ADPCM, commonly termed as a form ofcompression, is a more efficient way of storingwaveforms than 16-bit or 8-bit PCM.• ADPCM stores the value differences betweentwo adjacent PCM samples and makes someassumptions that allow data reduction.• Because of these assumptions low frequenciesare properly reproducedAudio Compression - AS2010377 1616
  17. 17. Adaptive Differential PCMAudio Compression - AS2010377 17• An ADPCM algorithm is used to map a series of 8bit µ-law (or a-law) PCM samples into a series of4 bit ADPCM samples. In this way, the capacity ofthe line is doubled.• Some ADPCM techniques are used in Voice overIP communications.• ADPCM was also used by Interactive MultimediaAssociation for development of legacy audiocodec known as ADPCM DVI, IMA ADPCM or DVI417
  18. 18. ApplicationsAudioCompressionFormatAlgorithm Bit Rate Bits per sample ImplementationsG.711 Companding A-law ; µ-law ; PCM64 kbit/s 8 bit FFmpeg, Ekiga,Asterisk (PBX)G.711.1 A-law ; µ-law 64, 80, 96 kbit/s 16 bit VoIPG.721 ADPCM 32 kbit/s 13 bitG.722 ADPCM 64 kbit/s 14 bit QuickTime,RealPlayerAudio Compression - AS2010377 1818
  19. 19. Wrap - up• Techniques to compress general digital audiosignals include µ -law and adaptive differentialpulse code modulation.• These approaches apply low-complexity, low-compression, and medium audio qualityalgorithms to audio signals.Audio Compression - AS2010377 1919
  20. 20. MPEG Audio Compression• Motion Picture Experts Group• An ISO standard for high-fidelity audio compression.• A lossy compression.• But can achieve transparent, perceptually losslesscompression.• Compresses without regard to the source of the audiodata.• Removes distortion and other features that areimperceptible to the human ear.• 6-to-1 compression ratio.20Audio Compression - AS201036220
  21. 21. MPEG Audio Compression• Four channel modes- Monophonic- Dual monophonic- Stereo- Joint- stereo• Has 3 distinct layers for compression21Audio Compression - AS201036221
  22. 22. MPEG Encoder ArchitectureAudioInput EncodedBit StreamTime toFrequencyMappingFilter bankBit Allocation,Quantize andcodingPsychoacousticModelBit streamformatting22Audio Compression - AS201036222
  23. 23. MPEG Audio CompressionAlgorithm• The input audio stream passes through a filterbank.Filter Bank- Divides the input into multiple subbands.- Relatively simple and provide good timeresolution23Audio Compression - AS201036223
  24. 24. MPEG Audio CompressionAlgorithm …• The input audio stream simultaneously passesthrough a psychoacoustic model.The Psychoacoustic Model- The key component of the MPEG encoderthat enables its high performance.- Analyzes the audio signal and computes theamount of noise masking that is available as afunction of frequency.24Audio Compression - AS201036224
  25. 25. MPEG Audio CompressionAlgorithm...• The bit or noise allocation block uses the signal-to-mask ratios to decide how to apportion the totalnumber of code bits available for the quantizationof the subband signals to minimize the audibilityof the quantization noise.• Finally, the last block takes the representation ofthe quantized audio samples and formats the datainto a decodable bit stream.25Audio Compression - AS201036225
  26. 26. MPEG Layers• Offers three compatible layers.- Layer I- Layer II- Layer III• Each succeeding layer able to understand thelower layers.• Each succeeding layer offers more complexityand better compression for a given level of audioquality.26Audio Compression - AS201036226
  27. 27. MPEG Audio Layer I27• Uses the basic filter bank found in all layers.• This filter bank divides the audio signal into 32constant-width frequency bands.• Bit rates greater than 128 kbits/s per channel.Audio Compression - AS201036227
  28. 28. MPEG Audio Layer II28• A simple enhancement of Layer I.• It improves compression performance bycoding data in larger groups.• Bit rates of 128 kbits/s per channel.• Improves performance by representing the bitallocation, the scale factor values, and thequantized samples.Audio Compression - AS201036228
  29. 29. MPEG Audio Layer III– Widely popular under the name Mp3– The most complex with the best audio quality– Used for bit rates of 64 kbits/s per channel.• Compensates for some filter bank deficienciesbyprocessing the filter outputs with a modifieddiscrete cosine transform (MDCT).29Audio Compression - AS201036229
  30. 30. MPEG Audio Layer III Filter BankProcessing30Audio Compression - AS201036230
  31. 31. MPEG Audio Layer IIIenhancements31• Alias reduction• Nonuniform quantization• Entropy coding of data values• Use of a bit reservoir• Noise allocation instead of bit allocationAudio Compression - AS201036231
  32. 32. MPEG Layers Applications32Layer ApplicationI Digital audio cassetteII Digital audiobroadcastIII CD qualityAudio Compression - AS201036232
  33. 33. Comparison of MPEG audiocompression standards33Standard Audio Samplingrate(kHz)Compressed bitrate (kbits/sec)ChannelsMPEG - 1 Layer I 32, 44.1, 48 32- 448 1- 2 channelsMPEG - 1 Layer I 32, 44.1, 48 32 – 384 1-2 channelsMPEG - 1 Layer III 32, 44.1, 48 32 – 320 1-2 channelsMPEG - 2 Layer I 32, 44.1, 48 32 - 448 1 – 5.1 channels16, 22.05, 24 32 - 256MPEG - 2 Layer II 32, 44.1, 48 32 - 384 1 – 5.1 channels16, 22.05, 24 8 - 160MPEG - 2 Layer III 32, 44.1, 48 32 - 384 1 – 5.1 channels16, 22.05, 24 8 - 160Audio Compression - AS201036233
  34. 34. Comparison of MPEG audiocompression standards34• MPEG 2 AAC- more efficient than the previous MPEG audio standards- supports from 1 to 48 channels at sampling rates of 8 to96 kHz• MPEG 4 AAC- similar to the MPEG-2 AAC standard, with some minorchanges- supports the compression of natural audio at bit ratesranging from 2 up to 64 kb/s.Audio Compression - AS201036234
  35. 35. Summary35• The MPEG audio standard has three layers ofsuccessive complexity for improve compressionperformance.• MPEG audio has been extended in followingways- Multichannel audio support- Lower, compressed audio rates- Lower audio sampling ratesAudio Compression - AS201036235
  36. 36. References36• Introduction To Data Compression ,Third Edition,Khalid Sayood• B. Cavagndo , J. Bier, Introduction to Digital AudioCompression,Available:http://rizal.blog.undip.ac.id/files/2009/07/introductiontodigitalaudiocompression.pdf• Davis Yen Pen, Digital Audio Compression,Available:www.ece.jcu.edu.au/subjects/ee3700/resources/Digital_Audio_Compression.pdfAudio Compression - AS201036236
  37. 37. 37THANK YOUAudio Compression - AS2010377 & AS201036237