SlideShare una empresa de Scribd logo
1 de 29
AUDIO PROCESSING
6.3 Quantisation and Transmission of Sound
07/10/2013
1
INTRODUCTION
 Follows the process of sampling - Nyquist
rate
which is explicitly UNIFORM
 Once quantized –transmitted or stored
 Basically 1 . Linear or Uniform
2. Non Linear or Non Uniform
• Protection of weak passages over loud
• Uniform precision – entire range
• Fewer steps
 Baseband signal over compressor
07/10/2013
2
07/10/2013
3
•OK Reduction in the amount of Memory
required …….. Standard Answer !!!!
WHAT ELSE????
Whenever there’s non linearity.......
3 stages of compression scheme
1. Transformation
2. Loss
3. Coding
6.3.1 CODING OF AUDIO
 Quantization and Transformation coding of data
 Mu law technique + Simple algorithm further
compression
 Difference in signal
1. size of signal values
2. concentrate histogram pixel values
variance reduction therefore
lossless compression into
shorter bit stream
 Pulse Code Modulation – formal term for sampling and
Quantisation
07/10/2013
4
Bit rate = bits per sample x the
sampling rate
Compressed- 128kbps 192 kbps
256 kbps
Goal – quantized
sampled output
07/10/2013
5
 “Producing Quantised Sampled output for audio”
 Decission Boundaries for quantizer input intervals –coder mapping
 Representative values(reconstruction levels) output from a quantizer
– decoder mapping
 3 stages of compression scheme
1. Transformation
2. Loss
3. Coding
 PCM in Speech Compression
50 Hz to about 10kHzbandwidth
1. uniform quantization without companding 12 bits bit-rate 240 kbps
2. With companding 8 bits bit-rate to 160 kbps.
3. standard approach to telephony 4 kHz
4. - sampling rate 8kHz companded bit rate reduced to 64
kbps.
07/10/2013
6
6.3.2 PULSE CODE MODULATION
07/10/2013
7
2 Wrinkeles
Sounds up to 4 kHz
band limiting filter
Reconstructed after low pass
filtering
Original
analog
Decoded staircase
Reconstructed signal
after low pass
filtering
 Audio often not in PCM –difference –fewer bits
 Peaked histogram maximum at zero
 For example, histogram for a linear ramp signal -
flat, histogram for the derivative of the signal
(i.e., the differences, from sampling point to
sampling point) consists of a spike at the slope
value.
 assign short codes to prevalent values and long
code words to rarely occurring ones.
07/10/2013
8
DIFFERENTIAL CODING OF AUDIO
 predict the next sample as being equal to the
current sample
 transmitting these using a PCM system.
 Linear prediction
07/10/2013
9
6.3.4 LOSSLESS PREDICTIVE CODING


1n n
n n n
f f
e f f

2 to 4
1
n n k n k
k
f a f
Linear Predictor Function
CONTD…
07/10/2013
10
Digital speech signal. Histogram of digital speech signal values
Histogram of digital speech signal
differences.
What if Exceptionally Large Difference?
SU ,SD ,-32 EG 100 –
SU SU SU 4
PREDICTOR EXAMPLE
07/10/2013
11


1 2
1
( )
2
n n n
n n n
f f f
e f f ENCODER
DECODER
Calculate f1, f2, f3, f4, f5 = 21, 22, 27, 25, 22.
07/10/2013
12
6.3.5 DPCM
 Predictive Coding, except that it incorporates a
quantizer step.
   



 
1 2 3_ ( , , ,...) ,
,
[ ],
transmit ( ) ,
ˆreconstruct: .
n n n n
n n n
n n
n
n n n
f function of f f f
e f f
e Q e
codeword e
f f e
07/10/2013
13
Distortion - Average Squared Error
Lloyd-Max quantizer, which is based on a least-squares
minimization of the error term.
For speech, we could modify quantization steps adaptively by
estimating the mean and variance of a patch of signal values,
and shifting quantization steps accordingly, for every block of
signal values. That is, starting at time i we could take a block of
N values fn and try to minimize the quantization error:
2
1
[ ( ) ] /
N
n n
n
f f N
1
2
[ ]
i N
n n
n i
min f Q f
LLOYD MAX QUANTISER
1. Get Pdf
2. Guess M representation Levels
3. Apply Threshold Condition
4. Apply Mean Square Error Estimation
5. Iteration process (of steps 3 n 4)
07/10/2013
14
07/10/2013
15
 signal differences peaked, could model them
using a Laplacian probability distribution
function, which is strongly peaked at zero
 for variance σ2.
 one assigns quantization steps for a quantizer with
nonuniform steps by assuming signal differences, dn
are drawn from such a distribution and then choosing
steps to minimize....... ?

2
( ) (1/ 2 ) ( 2 | | / )x exp x
1
2
[ ] ( ).
i N
n n n
n i
min d Q d l d
QUANTISATION ERROR
07/10/2013
16
   



 
1 2 3_ ( , , ,...) ,
,
[ ] ,
transmit ( ) ,
ˆreconstruct: .
n n n n
n n n
n n
n
n n n
f function of f f f
e f f
e Q e
codeword e
f f e
07/10/2013
17
• Notice that the quantization noise, , is equal to the
quantization effect on the error term, .
• Suppose we adopt the particular predictor below:
(1)
so that is an integer.
• As well, use the quantization scheme:
(2)
n nf f
n ne e
1 2
ˆ
n n nf trunc f f 
[ ] 16*trunc 255 /16 256 8
ˆ
n n n
n n n
e Q e e
f f e

 
ˆ
n n ne f f
07/10/2013
18
en in range Quantized to value
-255 .. -240
-239 .. -224
.
.
.
-31 .. -16
-15 .. 0
1 .. 16
17 .. 32
.
.
.
225 .. 240
241 .. 255
-248
-232
.
.
.
-24
-8
8
24
.
.
.
232
248
07/10/2013
19
DELTA MODULATION
 This scheme sends only the difference between
pulses, if the pulse at time tn+1 is higher in
amplitude value than the pulse at time tn, then a
single bit, say a “1”, is used to indicate the positive
value.
 If the pulse is lower in value, resulting in a negative
value, a “0” is used.
 This scheme works well for small changes in signal
values between samples.
 If changes in amplitude are large, this will result in
large errors.
07/10/2013
20
1
1
ˆ ,
ˆ ,
if 0,
ˆ .
n n
n n n n n
n
n
n n n
f f
e f f f f
k e where k is a constant
e
k otherwise
f f e



 
Solution Sampling at many times
greater the Nyquist rate
If the slope of the actual signal curve
is high, the staircase approximation
cannot keep up. For a steep curve,
should change the step size k
adaptively
Adaptive DM
07/10/2013
21
f1 f2 f3 f4
10 11 13 15

11 10f f
1
1
ˆ ,
ˆ ,
if 0,
ˆ .
n n
n n n n n
n
n
n n n
f f
e f f f f
k e where k is a constant
e
k otherwise
f f e



 
e2 = 11 − 10 =
1,
e3 = 13 − 14 =
−1,
e4 = 15 − 10 =
5,
07/10/2013
22
Step Size + Decision
Boundaries !
6.3.7 ADPCM
• ADPCM (Adaptive DPCM) takes the idea of adapting the
coder to suit the input much farther.
quantizer and the predictor.
1. In Adaptive DM, adapt the quantizer step size to suit the input.
In DPCM, we can change the step size as well as decision
boundaries, using a non-uniform quantizer.
We can carry this out in two ways:
(a) Forward adaptive quantization: use the properties of the input
signal.
(b) Backward adaptive quantization: use the properties of the
quantized output. If quantized errors become too large, we should
change the non-uniform quantizer.
Multimedia Systems (eadeli@iust.ac.ir)
23
2. We can also adapt the predictor, again using
forward or backward adaptation. Making the
predictor coefficients adaptive is called Adaptive
Predictive Coding (APC):
(a) Recall that the predictor is usually taken to be a linear
function of previous reconstructed quantized values,
.
(b) The number of previous values used is called the
“order” of the predictor. For example, if we use M
previous values, we need M coefficients ai, i = 1..M in a
predictor
(6.22)
24
Multimedia Systems (eadeli@iust.ac.ir)
1
ˆ
M
n i n i
i
f a f

nf
• However we can get into a difficult situation if we try to change
the prediction coefficients, that multiply previous quantized
values, because that makes a complicated set of equations to
solve for these coefficients:
(a) Suppose we decide to use a least-squares approach to solving a
minimization trying to find the best values of the ai:
(6.23)
(b) Here we would sum over a large number of samples fn, for the
current patch of speech, say. But because depends on the
quantization we have a difficult problem to solve. As well, we
should really be changing the fineness of the quantization at the
same time, to suit the signal’s changing nature; this makes
things problematical.
25
2
1
ˆ( )
N
n n
n
min f f

nf
(c) Instead, one usually resorts to solving the
simpler problem that results from using not in
the prediction, but instead simply the signal fn
itself. Explicitly writing in terms of the coefficients
ai, we wish to solve:
(6.24)
Differentiation with respect to each of the ai, and
setting to zero, produces a linear system of M
equations that is easy to solve. (The set of
equations is called the Wiener-Hopf equations.)
26
2
1 1
( )
N M
n i n i
n i
min f a f

nf
Schematic diagram for ADPCM encoder and
decoder
27
Audio Processing
Audio Processing

Más contenido relacionado

La actualidad más candente

PPT Image Analysis(IRDE, DRDO)
PPT Image Analysis(IRDE, DRDO)PPT Image Analysis(IRDE, DRDO)
PPT Image Analysis(IRDE, DRDO)
Nidhi Gopal
 
SPEKER RECOGNITION UNDER LIMITED DATA CODITION
SPEKER RECOGNITION UNDER LIMITED DATA CODITIONSPEKER RECOGNITION UNDER LIMITED DATA CODITION
SPEKER RECOGNITION UNDER LIMITED DATA CODITION
niranjan kumar
 
Analysis of Butterworth and Chebyshev Filters for ECG Denoising Using Wavelets
Analysis of Butterworth and Chebyshev Filters for ECG Denoising Using WaveletsAnalysis of Butterworth and Chebyshev Filters for ECG Denoising Using Wavelets
Analysis of Butterworth and Chebyshev Filters for ECG Denoising Using Wavelets
IOSR Journals
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
shrinivasgnaik
 

La actualidad más candente (20)

DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal ProcessingDSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
DSP_2018_FOEHU - Lec 1 - Introduction to Digital Signal Processing
 
Sampling and Reconstruction of Signal using Aliasing
Sampling and Reconstruction of Signal using AliasingSampling and Reconstruction of Signal using Aliasing
Sampling and Reconstruction of Signal using Aliasing
 
Wavelet
WaveletWavelet
Wavelet
 
digital filter design
digital filter designdigital filter design
digital filter design
 
PPT Image Analysis(IRDE, DRDO)
PPT Image Analysis(IRDE, DRDO)PPT Image Analysis(IRDE, DRDO)
PPT Image Analysis(IRDE, DRDO)
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLABDIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
 
Digital Filters Part 1
Digital Filters Part 1Digital Filters Part 1
Digital Filters Part 1
 
Multrate dsp
Multrate dspMultrate dsp
Multrate dsp
 
Signal Processing
Signal ProcessingSignal Processing
Signal Processing
 
Design and realization of fir filter using chebyshev window
Design and realization of fir filter using chebyshev windowDesign and realization of fir filter using chebyshev window
Design and realization of fir filter using chebyshev window
 
Design of Filters PPT
Design of Filters PPTDesign of Filters PPT
Design of Filters PPT
 
SPEKER RECOGNITION UNDER LIMITED DATA CODITION
SPEKER RECOGNITION UNDER LIMITED DATA CODITIONSPEKER RECOGNITION UNDER LIMITED DATA CODITION
SPEKER RECOGNITION UNDER LIMITED DATA CODITION
 
1 digital filters (fir)
1 digital filters (fir)1 digital filters (fir)
1 digital filters (fir)
 
Digital Filters Part 2
Digital Filters Part 2Digital Filters Part 2
Digital Filters Part 2
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Digital Signal Processinf (DSP) Course Outline
Digital Signal Processinf (DSP) Course OutlineDigital Signal Processinf (DSP) Course Outline
Digital Signal Processinf (DSP) Course Outline
 
Analysis of Butterworth and Chebyshev Filters for ECG Denoising Using Wavelets
Analysis of Butterworth and Chebyshev Filters for ECG Denoising Using WaveletsAnalysis of Butterworth and Chebyshev Filters for ECG Denoising Using Wavelets
Analysis of Butterworth and Chebyshev Filters for ECG Denoising Using Wavelets
 
FILTER BANKS
FILTER BANKSFILTER BANKS
FILTER BANKS
 
Fir and iir filter_design
Fir and iir filter_designFir and iir filter_design
Fir and iir filter_design
 

Destacado (11)

Teoria de Desenvolvimento Moral
Teoria de Desenvolvimento MoralTeoria de Desenvolvimento Moral
Teoria de Desenvolvimento Moral
 
Adaptive quantization methods
Adaptive quantization methodsAdaptive quantization methods
Adaptive quantization methods
 
đề Cương xử lý âm thanh hình ảnh
đề Cương xử lý âm thanh hình ảnhđề Cương xử lý âm thanh hình ảnh
đề Cương xử lý âm thanh hình ảnh
 
Compression
CompressionCompression
Compression
 
Lecture 8 audio compression
Lecture 8 audio compressionLecture 8 audio compression
Lecture 8 audio compression
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Audio compression
Audio compressionAudio compression
Audio compression
 
Pcm
PcmPcm
Pcm
 
Compression
CompressionCompression
Compression
 
Multimedia
MultimediaMultimedia
Multimedia
 
Multimedia
MultimediaMultimedia
Multimedia
 

Similar a Audio Processing

International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
IJERD Editor
 
Surrey dl-4
Surrey dl-4Surrey dl-4
Surrey dl-4
ozzie73
 
Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...
Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...
Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...
CSCJournals
 
Dct,gibbs phen,oversampled adc,polyphase decomposition
Dct,gibbs phen,oversampled adc,polyphase decompositionDct,gibbs phen,oversampled adc,polyphase decomposition
Dct,gibbs phen,oversampled adc,polyphase decomposition
Muhammad Younas
 
Design and implementation of different audio restoration techniques for audio...
Design and implementation of different audio restoration techniques for audio...Design and implementation of different audio restoration techniques for audio...
Design and implementation of different audio restoration techniques for audio...
eSAT Journals
 
Comparison of Single Channel Blind Dereverberation Methods for Speech Signals
Comparison of Single Channel Blind Dereverberation Methods for Speech SignalsComparison of Single Channel Blind Dereverberation Methods for Speech Signals
Comparison of Single Channel Blind Dereverberation Methods for Speech Signals
Deha Deniz Türköz
 

Similar a Audio Processing (20)

Titan X Research Paper
Titan X Research PaperTitan X Research Paper
Titan X Research Paper
 
Closed loop DPCM
Closed loop DPCMClosed loop DPCM
Closed loop DPCM
 
Performance of Matching Algorithmsfor Signal Approximation
Performance of Matching Algorithmsfor Signal ApproximationPerformance of Matching Algorithmsfor Signal Approximation
Performance of Matching Algorithmsfor Signal Approximation
 
Digital communication unit II
Digital communication unit IIDigital communication unit II
Digital communication unit II
 
L010628894
L010628894L010628894
L010628894
 
Real time signal processing
Real time signal processingReal time signal processing
Real time signal processing
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
IRJET- Compressed Sensing based Modified Orthogonal Matching Pursuit in DTTV ...
IRJET- Compressed Sensing based Modified Orthogonal Matching Pursuit in DTTV ...IRJET- Compressed Sensing based Modified Orthogonal Matching Pursuit in DTTV ...
IRJET- Compressed Sensing based Modified Orthogonal Matching Pursuit in DTTV ...
 
Surrey dl-4
Surrey dl-4Surrey dl-4
Surrey dl-4
 
Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...
Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...
Blind, Non-stationary Source Separation Using Variational Mode Decomposition ...
 
Fixed Point Realization of Iterative LR-Aided Soft MIMO Decoding Algorithm
Fixed Point Realization of Iterative LR-Aided Soft MIMO Decoding AlgorithmFixed Point Realization of Iterative LR-Aided Soft MIMO Decoding Algorithm
Fixed Point Realization of Iterative LR-Aided Soft MIMO Decoding Algorithm
 
CE_PCM.ppt
CE_PCM.pptCE_PCM.ppt
CE_PCM.ppt
 
Dct,gibbs phen,oversampled adc,polyphase decomposition
Dct,gibbs phen,oversampled adc,polyphase decompositionDct,gibbs phen,oversampled adc,polyphase decomposition
Dct,gibbs phen,oversampled adc,polyphase decomposition
 
Waveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptxWaveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptx
 
Companding and DPCM and ADPCM
Companding and DPCM and ADPCMCompanding and DPCM and ADPCM
Companding and DPCM and ADPCM
 
Design and implementation of different audio restoration techniques for audio...
Design and implementation of different audio restoration techniques for audio...Design and implementation of different audio restoration techniques for audio...
Design and implementation of different audio restoration techniques for audio...
 
Unit iv wcn main
Unit iv wcn mainUnit iv wcn main
Unit iv wcn main
 
Waveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptxWaveform_codingUNIT-II_DC_-PPT.pptx
Waveform_codingUNIT-II_DC_-PPT.pptx
 
A novel and efficient mixed-signal compressed sensing for wide-band cognitive...
A novel and efficient mixed-signal compressed sensing for wide-band cognitive...A novel and efficient mixed-signal compressed sensing for wide-band cognitive...
A novel and efficient mixed-signal compressed sensing for wide-band cognitive...
 
Comparison of Single Channel Blind Dereverberation Methods for Speech Signals
Comparison of Single Channel Blind Dereverberation Methods for Speech SignalsComparison of Single Channel Blind Dereverberation Methods for Speech Signals
Comparison of Single Channel Blind Dereverberation Methods for Speech Signals
 

Último

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Último (20)

Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 

Audio Processing

  • 1. AUDIO PROCESSING 6.3 Quantisation and Transmission of Sound 07/10/2013 1
  • 2. INTRODUCTION  Follows the process of sampling - Nyquist rate which is explicitly UNIFORM  Once quantized –transmitted or stored  Basically 1 . Linear or Uniform 2. Non Linear or Non Uniform • Protection of weak passages over loud • Uniform precision – entire range • Fewer steps  Baseband signal over compressor 07/10/2013 2
  • 3. 07/10/2013 3 •OK Reduction in the amount of Memory required …….. Standard Answer !!!! WHAT ELSE???? Whenever there’s non linearity....... 3 stages of compression scheme 1. Transformation 2. Loss 3. Coding
  • 4. 6.3.1 CODING OF AUDIO  Quantization and Transformation coding of data  Mu law technique + Simple algorithm further compression  Difference in signal 1. size of signal values 2. concentrate histogram pixel values variance reduction therefore lossless compression into shorter bit stream  Pulse Code Modulation – formal term for sampling and Quantisation 07/10/2013 4 Bit rate = bits per sample x the sampling rate Compressed- 128kbps 192 kbps 256 kbps Goal – quantized sampled output
  • 6.  “Producing Quantised Sampled output for audio”  Decission Boundaries for quantizer input intervals –coder mapping  Representative values(reconstruction levels) output from a quantizer – decoder mapping  3 stages of compression scheme 1. Transformation 2. Loss 3. Coding  PCM in Speech Compression 50 Hz to about 10kHzbandwidth 1. uniform quantization without companding 12 bits bit-rate 240 kbps 2. With companding 8 bits bit-rate to 160 kbps. 3. standard approach to telephony 4 kHz 4. - sampling rate 8kHz companded bit rate reduced to 64 kbps. 07/10/2013 6 6.3.2 PULSE CODE MODULATION
  • 7. 07/10/2013 7 2 Wrinkeles Sounds up to 4 kHz band limiting filter Reconstructed after low pass filtering Original analog Decoded staircase Reconstructed signal after low pass filtering
  • 8.  Audio often not in PCM –difference –fewer bits  Peaked histogram maximum at zero  For example, histogram for a linear ramp signal - flat, histogram for the derivative of the signal (i.e., the differences, from sampling point to sampling point) consists of a spike at the slope value.  assign short codes to prevalent values and long code words to rarely occurring ones. 07/10/2013 8 DIFFERENTIAL CODING OF AUDIO
  • 9.  predict the next sample as being equal to the current sample  transmitting these using a PCM system.  Linear prediction 07/10/2013 9 6.3.4 LOSSLESS PREDICTIVE CODING   1n n n n n f f e f f  2 to 4 1 n n k n k k f a f Linear Predictor Function
  • 10. CONTD… 07/10/2013 10 Digital speech signal. Histogram of digital speech signal values Histogram of digital speech signal differences. What if Exceptionally Large Difference? SU ,SD ,-32 EG 100 – SU SU SU 4
  • 11. PREDICTOR EXAMPLE 07/10/2013 11   1 2 1 ( ) 2 n n n n n n f f f e f f ENCODER DECODER Calculate f1, f2, f3, f4, f5 = 21, 22, 27, 25, 22.
  • 12. 07/10/2013 12 6.3.5 DPCM  Predictive Coding, except that it incorporates a quantizer step.          1 2 3_ ( , , ,...) , , [ ], transmit ( ) , ˆreconstruct: . n n n n n n n n n n n n n f function of f f f e f f e Q e codeword e f f e
  • 13. 07/10/2013 13 Distortion - Average Squared Error Lloyd-Max quantizer, which is based on a least-squares minimization of the error term. For speech, we could modify quantization steps adaptively by estimating the mean and variance of a patch of signal values, and shifting quantization steps accordingly, for every block of signal values. That is, starting at time i we could take a block of N values fn and try to minimize the quantization error: 2 1 [ ( ) ] / N n n n f f N 1 2 [ ] i N n n n i min f Q f
  • 14. LLOYD MAX QUANTISER 1. Get Pdf 2. Guess M representation Levels 3. Apply Threshold Condition 4. Apply Mean Square Error Estimation 5. Iteration process (of steps 3 n 4) 07/10/2013 14
  • 15. 07/10/2013 15  signal differences peaked, could model them using a Laplacian probability distribution function, which is strongly peaked at zero  for variance σ2.  one assigns quantization steps for a quantizer with nonuniform steps by assuming signal differences, dn are drawn from such a distribution and then choosing steps to minimize....... ?  2 ( ) (1/ 2 ) ( 2 | | / )x exp x 1 2 [ ] ( ). i N n n n n i min d Q d l d QUANTISATION ERROR
  • 16. 07/10/2013 16          1 2 3_ ( , , ,...) , , [ ] , transmit ( ) , ˆreconstruct: . n n n n n n n n n n n n n f function of f f f e f f e Q e codeword e f f e
  • 17. 07/10/2013 17 • Notice that the quantization noise, , is equal to the quantization effect on the error term, . • Suppose we adopt the particular predictor below: (1) so that is an integer. • As well, use the quantization scheme: (2) n nf f n ne e 1 2 ˆ n n nf trunc f f  [ ] 16*trunc 255 /16 256 8 ˆ n n n n n n e Q e e f f e    ˆ n n ne f f
  • 18. 07/10/2013 18 en in range Quantized to value -255 .. -240 -239 .. -224 . . . -31 .. -16 -15 .. 0 1 .. 16 17 .. 32 . . . 225 .. 240 241 .. 255 -248 -232 . . . -24 -8 8 24 . . . 232 248
  • 19. 07/10/2013 19 DELTA MODULATION  This scheme sends only the difference between pulses, if the pulse at time tn+1 is higher in amplitude value than the pulse at time tn, then a single bit, say a “1”, is used to indicate the positive value.  If the pulse is lower in value, resulting in a negative value, a “0” is used.  This scheme works well for small changes in signal values between samples.  If changes in amplitude are large, this will result in large errors.
  • 20. 07/10/2013 20 1 1 ˆ , ˆ , if 0, ˆ . n n n n n n n n n n n n f f e f f f f k e where k is a constant e k otherwise f f e      Solution Sampling at many times greater the Nyquist rate If the slope of the actual signal curve is high, the staircase approximation cannot keep up. For a steep curve, should change the step size k adaptively Adaptive DM
  • 21. 07/10/2013 21 f1 f2 f3 f4 10 11 13 15  11 10f f 1 1 ˆ , ˆ , if 0, ˆ . n n n n n n n n n n n n f f e f f f f k e where k is a constant e k otherwise f f e      e2 = 11 − 10 = 1, e3 = 13 − 14 = −1, e4 = 15 − 10 = 5,
  • 22. 07/10/2013 22 Step Size + Decision Boundaries !
  • 23. 6.3.7 ADPCM • ADPCM (Adaptive DPCM) takes the idea of adapting the coder to suit the input much farther. quantizer and the predictor. 1. In Adaptive DM, adapt the quantizer step size to suit the input. In DPCM, we can change the step size as well as decision boundaries, using a non-uniform quantizer. We can carry this out in two ways: (a) Forward adaptive quantization: use the properties of the input signal. (b) Backward adaptive quantization: use the properties of the quantized output. If quantized errors become too large, we should change the non-uniform quantizer. Multimedia Systems (eadeli@iust.ac.ir) 23
  • 24. 2. We can also adapt the predictor, again using forward or backward adaptation. Making the predictor coefficients adaptive is called Adaptive Predictive Coding (APC): (a) Recall that the predictor is usually taken to be a linear function of previous reconstructed quantized values, . (b) The number of previous values used is called the “order” of the predictor. For example, if we use M previous values, we need M coefficients ai, i = 1..M in a predictor (6.22) 24 Multimedia Systems (eadeli@iust.ac.ir) 1 ˆ M n i n i i f a f  nf
  • 25. • However we can get into a difficult situation if we try to change the prediction coefficients, that multiply previous quantized values, because that makes a complicated set of equations to solve for these coefficients: (a) Suppose we decide to use a least-squares approach to solving a minimization trying to find the best values of the ai: (6.23) (b) Here we would sum over a large number of samples fn, for the current patch of speech, say. But because depends on the quantization we have a difficult problem to solve. As well, we should really be changing the fineness of the quantization at the same time, to suit the signal’s changing nature; this makes things problematical. 25 2 1 ˆ( ) N n n n min f f  nf
  • 26. (c) Instead, one usually resorts to solving the simpler problem that results from using not in the prediction, but instead simply the signal fn itself. Explicitly writing in terms of the coefficients ai, we wish to solve: (6.24) Differentiation with respect to each of the ai, and setting to zero, produces a linear system of M equations that is easy to solve. (The set of equations is called the Wiener-Hopf equations.) 26 2 1 1 ( ) N M n i n i n i min f a f  nf
  • 27. Schematic diagram for ADPCM encoder and decoder 27