SlideShare ist ein Scribd-Unternehmen logo
1 von 75
Downloaden Sie, um offline zu lesen
MP3 Audio Decoding
Shereef Shehata
Introduction
A generic block diagram of a perceptual audio encoder
Masking
Thresholds
Time-
Frequency
Analysis
Psychoacoustic
Analysis
Quantization
and
Encoding
Bit-allocation
Entropy
(Lossless)
coding
Parameters MUX
Side
information
Input Audio
• The absolute threshold of hearing in a noiseless environment.
Table 1.1: Band Edges of 26 Critical Bandwidth Auditory
Fil- ters that Span the Audio Spectrum.
Band No. Bandwidth(Hz) Band No. Bandwidth(Hz)
1 - 100 14 2000-2320
2 100-200 15 2320-2700
3 200-300 16 2700-3150
4 300-400 17 3150-3700
5 400-510 18 3700-4400
6 510-630 19 4400-5300
7 630-770 20 5300-6400
8 770-920 21 6400-7700
9 920-1080 22 7700-9500
10 1080-1270 23 9500-12000
11 1270-1480 24 12000-15500
12 1480-1720 25 15500-25000
13 1720-2000 26 25000-
Noise Masking Tone
Tone Masking Noise
Non-simultaneous masking properties of the human ear
The ISO/MPEG-1 Layer III (MP3) encoder
Analysis Subband Filter Bank
A uniform 32-band critically sampled analysis-synthesis filter bank.
32
+
H0(z)
H1(z)
H2(z)
H31(z)
G0(z)
G1(z)
G2(z)
G31(z)
32
32
32 32
32
32
32
s(n) sout(n)
v0(n) y0(n)
v0(n)
v0(n)
v0(n)
y1(n)
y2(n)
y31(n)
w0(n)
w1(n)
w2(n)
w31(n)
0 100 200 300
Time Index (Samples)
(a)
400 500 600
-4
3
2
1
0
-1
-2
-3
4
x 10
4
Amplitude
0 2 4 6 8 10 12
Time Index(Samples)
14 16 18
-0.25
-0.8
-0.2
-0.15
-0.1
-0.05
0
0.05
0.1
0.15
0.2
0.25
Amplitude
(b)
0 2 4 6 8 10 12
Time Index(Samples)
14 16 18
-1
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Amplitude
(c)
Implementation of the analysis subband Filter Bank
Input 32 audio
samples
Build Input
Sample Vector
x
Window Vector x by
coefficient vector c
(prototype filter)
Calculate Yi ,
i=0 to 63
Compute coefficients
of M
Calculate the 32 subband
samples by matrixing
PCM Audio In
Subband
Samples
Framing
: Coefficients of the prototype filter c(n) and h(n).
0 50 100 150 200 250 300 350 400 450 500
-0.04
-0.03
-0.02
0.02
0.03
0.04
c(n)
Sample Index (n) Sample Index (n)
0 50 100 150 200 250 300 350 400 450 500
-0.005
0
0.005
0.03
0.035
0.04
h(n)
Composite magnitude responses of all subbands.
0 0.1 0.2 0.3 0.4 0.5
∧
0.6 0.7 0.8 0.9 1
-140
20
0
-20
-40
-60
-80
-100
-120
Hi(∧)c
Sample input vector x
50 100 150 200 250 300 350 400 450 500
SampleIndex(n)
-1
-0.8Input,x(n)
-0.2
0
0.2
0.4
0.6
0.8
1
Impulse Response of the Window
Window,c(n) 0 50 100 150 200 250 300 350 400 450 500
SampleIndex(n)
-0.04
-0.03
-0.02
0.04
0.03
0.02
0.01
0
-0.01
Windowed output vector
0 50 100 150 200 250 300 350 400 450 500
SampleIndex(n)
-0.03
-0.01
-0.02
0
0.01
0.02
0.03
WindowedOutput,z(n)
Time domain and Frequency responses of the filter bank. Subbands 0,1 and 31
50 100 150 500200 250 300
Sample Index (n)
350 400 450
-0.01
-0.005
0
0.005
0.01
0.015
0.02
0.025
0.03
h0
c(n)
0 0.1 0.2 0.3 0.4 0.5
∧
0.6 0.7 0.8 0.9 1
-100
-80
-60
-40
-20
0
20
H0
c(∧)(dB)
-120
-0.03
0
0.02
-20
0.01
-40
50 100 150 200 250 300 350 400 450 500
-0.02
-0.01
0
0.03
h1
c(n)
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
-140
-100
-80
-60
20
Hc(∧)(dB)
1
50 100 150 200 250 300
Sample Index (n)
350 400 450 500
-0.03
-0.02
-0.01
0
0.01
0.02
0.03
hc(n)
31
0 0.1 0.2 0.3 0.4 0.5
∧
0.6 0.7 0.8 0.9 1
-100
-80
-60
-40
-20
0
20
Hc(∧)(dB)
31
Sample Index (n) ∧
Hybrid Filter Bank
Psychoacoustic Model II
Analysis SPL
computation
Spreading function and
excitation pattern
Tonality Index
estimation
Input Signal
Calculation of
masking threshold
for each partition
Estimation of JND
and SMR
Pre-echo detection
and window
switching
SMR
Idealized critical band filter bank.
0 0.5
x 10
1 1.5
Frequency (Hz)
2 2.5
4
Time-aligned input data, and after applying a Hanning window.
FFT magnitude of the windowed audio data
Unpredictability measure (cw),
Energy of threshold partitions (eb)
Weighted unpredictability of threshold partitions
Spreading functions centered at bands 4, 5, 6 and 7, respectively.
Spread energy (ecb),
Spread Unpredictability (ctb).
Spread unpredictability(ct b),
Plot of ct b/ecb
Normalized spread unpredictability
(cbb)
Tonality index (t bb).
SNR of the threshold partitions, and Masked thresholds of the threshold
partitions.
Approximate spectral curve for the threshold in quiet
Pre-echo example: uncoded castanets
Pre-echo example: Tracastanets
Window switching state machine.
Energy in scalefactor bands
Thresholds in scalefactor bands
Signal-to-mask ratio in scalefactor bands.
MDCT
Illustration of the hybrid filter bank.
Illustration of the windowsused in the MDCT filter bank:(a) long window,
Illustration of the windowsused in the MDCT filter bank:(b) Start window,
Illustration of the windowsused in the MDCT filter bank:(c) Stop window,
Illustration of the windowsused in the MDCT filter bank:(d) 3 Short window,
Illustration of a typical window switching.
0 10 20 30 40 50 60 70 80 90 100
0
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
Sample Index
Window
Alias reduction butterfly for the encoder.
+
Σ
+
+ Σ
-
cs
cs
ca
ca
Alias reduction operations for a granule of MDCT data.
8 butterflies
X0
X1
X2
18 samples
X15
X16
X17
X18
X19
X20
X555
X556
X558
X559
X560
X573
X574
X575
Bit Allocation, Quantization, and
Coding
Simultaneous Masking
SMRNMR
SNR
MASKING THRESHOLD
MINIMUM MASKING THRESHOLD
SoundPressureLevel(dB)
Frequency
CRITICAL NEIGHBORING
BAND BAND
m-1 bits
m bits
m+1 bits
Calculation of
Scalefactor
selection
information
Calculation of
maximum
number of
available bits
Reset of iteration
variables
All
spectral
values
zero?
Outer Loop
Calculation of
number of unused
bits
Adjustment of the
size of reservoir
Y
N
Implementation of the Outer Loop (Distortion Control)
Calculation of number of bits needed to encode
the scalefactors.
Binary search for quantizer step-size.Binary search for quantizer step-size.
Inner Loop
Calculation of distortion in each scalefactor band.
Save scaling factors of scalefactor bands.
Preemphasis
Amplification of the scalefactor bands that violate
the masking threshold.
All scalefactor bands amplified?
Amplification of all bands within upper limit?
N
At least one band exceeding allowed distortion?
Y
Y
Restore scaling factors
Y
N
N
The effect of the variables status and over in the outer loop execution
1 2
Iterations
3
0
5
10
15
20
25
status
over
The effect of the variables status and over in the outer loop execution
1 2 3 4 5 6
0
2
4
6
8
over
status
2
Iterations
Unquantized MDCT coefficients for a short block
0 100 200 300
Sample Index
400 500
0.2
0.15
0.1
0.05
0
-0.05
-0.1
-0.15
-0.2
-0.25
-0.3
Amplitude
MDCT coefficients (magnitude) quantized to meet target bit rate 128 kbps.
14
12
10
BIG
tude
8 VALUES
Ampli
6 QUADRUPLES
4 RUN-LENGTH ZEROS
2
0
0 100 200 300 400 500
Sample Index
0 100 200 300
Sample Index
400 500
0
2
4
6
8
14
12
10
Amplitude
BIG
VALUES
QUADRUPLES
RUN-LENGTH ZEROS
Illustration of main data organization and encoding scheme
part2_length
region0 region1 region2
bigvalues region count1 rzero
part3_length
part2_3_length
Scalefactor Huffman Code
part2_length
region0
xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx
region0 region1 region2
bigvalues region
region2
count1
0000000000000000
rzero
part3_length
part2_3_length
Scalefactor Huffman Code
Illustration of bit usage in the inner loop.
Iteration 1 Iteration 2
Big Values
Count1
rzeros
Bits used to code subregions
Total available bits
1659
1588
1474
Illustration of relationship between global_gain and the number of bits required
to encode a granule.
129 130
Global Gain
131
1400
1700
1650
1600
1550
1500
1450
#Bitsused
Header
Frame 1
Header
Frame 2
Header
Frame 3
Header
Frame 4
sync
sideinfo1
sync
sideinfo2
sync
sideinfo3
sync
sideinfo4
main data 1
main data 2
main data 3
main data 4
main data 4main data 3main data 2main data 1
Illustration of total available bits to encode data frames.
Available Bits
Reservoir Size
Mean Bits
Granule0
Granule0
Granule0
Granule0
Granule0
Granule0
Granule1
Granule1
Granule1
Granule1
Granule1
Granule1
Frame 0 Frame 1 Frame 2 Frame 3 Frame 4 Frame 5
Decoder
Block Diagram of MP3 decoder
Organization of scalefactors and Huffman coded data.
GRANULE 0 GRANULE 1
LEFT CHANNEL RIGHT CHANNEL
SCALEFACTORS HUFFMAN CODE
BITS
RIGHT CHANNEL LEFT CHANNEL
. . . . SCALEFACTORS HUFFMAN CODE
BITS
HEADER
(32)
CRC
(0,16)
SIDE INFORMATION
(136,256)
MAIN DATA ANCILLARY
BITS
CRC Error Checking
T212155
+
+ +
DATA BITS
T15 T14 T13 T1 T0
b0b1b2b13b15 b14
CRC check diagram.
Alias reduction butterfly for the decoder
+
Σ
-
+ Σ
+
cs
cs
ca
ca
36 samples
0…35
WINDOWED
OUTPUT FROM
IMDCT
0…17 18…35
SAVED FROM
PREVIOUS
GRANULE
18 samples
+
ADD FIRST HALF
18 samples
SAVE SECOND HALF
18 samples
RESULT
Polyphase implementation of the synthesis filter bank
31
63
V FIFO
16 V vector FIFO
(1024 samples)
0
IMDCT
0
V vector
U vector
511
D window
511
511
31
0
+ + + +
31
0
=
Reconstructed
samples
Subband
samples
W vector

Weitere ähnliche Inhalte

Ähnlich wie Shereef_MP3_decoder

Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...
Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...
Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...
Raj Kumar Thenua
 

Ähnlich wie Shereef_MP3_decoder (20)

DSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter DesignDSP_2018_FOEHU - Lec 06 - FIR Filter Design
DSP_2018_FOEHU - Lec 06 - FIR Filter Design
 
Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...
Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...
Simulation and hardware implementation of Adaptive algorithms on tms320 c6713...
 
Av02 2315en datasheet
Av02 2315en datasheetAv02 2315en datasheet
Av02 2315en datasheet
 
Dsp book ch15
Dsp book ch15Dsp book ch15
Dsp book ch15
 
Demonstrating Quantum Speed-Up with a Two-Transmon Quantum Processor Ph.D. d...
Demonstrating Quantum Speed-Up  with a Two-Transmon Quantum Processor Ph.D. d...Demonstrating Quantum Speed-Up  with a Two-Transmon Quantum Processor Ph.D. d...
Demonstrating Quantum Speed-Up with a Two-Transmon Quantum Processor Ph.D. d...
 
LexanHF1110R
LexanHF1110RLexanHF1110R
LexanHF1110R
 
LexanHF1110R
LexanHF1110RLexanHF1110R
LexanHF1110R
 
DSP.ppt
DSP.pptDSP.ppt
DSP.ppt
 
M4L1.ppt
M4L1.pptM4L1.ppt
M4L1.ppt
 
Image compression- JPEG Compression & its Modes
Image compression- JPEG Compression & its ModesImage compression- JPEG Compression & its Modes
Image compression- JPEG Compression & its Modes
 
3920 Assn_1
3920 Assn_13920 Assn_1
3920 Assn_1
 
Conferencia
ConferenciaConferencia
Conferencia
 
Conferencia
ConferenciaConferencia
Conferencia
 
Project presentatiom
Project presentatiomProject presentatiom
Project presentatiom
 
Multiuser detection new
Multiuser detection newMultiuser detection new
Multiuser detection new
 
Lumin ox optical oxygen sensor evaluation interface board lox-evb
Lumin ox optical oxygen sensor evaluation interface board   lox-evbLumin ox optical oxygen sensor evaluation interface board   lox-evb
Lumin ox optical oxygen sensor evaluation interface board lox-evb
 
Bashir_09192016
Bashir_09192016Bashir_09192016
Bashir_09192016
 
Ltn173 kt01 c01
Ltn173 kt01 c01Ltn173 kt01 c01
Ltn173 kt01 c01
 
Compact goniophotometer
Compact goniophotometerCompact goniophotometer
Compact goniophotometer
 
Compact goniophotometer
Compact goniophotometerCompact goniophotometer
Compact goniophotometer
 

Mehr von Shereef Shehata

Windows_Scaling_2X_Speedup
Windows_Scaling_2X_SpeedupWindows_Scaling_2X_Speedup
Windows_Scaling_2X_Speedup
Shereef Shehata
 
2D_block_scaling_Software
2D_block_scaling_Software2D_block_scaling_Software
2D_block_scaling_Software
Shereef Shehata
 
2D_BLIT_software_Blackness
2D_BLIT_software_Blackness2D_BLIT_software_Blackness
2D_BLIT_software_Blackness
Shereef Shehata
 
CIECAM02_Color_Management
CIECAM02_Color_ManagementCIECAM02_Color_Management
CIECAM02_Color_Management
Shereef Shehata
 
Temporal_video_noise_reduction
Temporal_video_noise_reductionTemporal_video_noise_reduction
Temporal_video_noise_reduction
Shereef Shehata
 
Shereef_Color_Processing
Shereef_Color_ProcessingShereef_Color_Processing
Shereef_Color_Processing
Shereef Shehata
 
The_Mismatch_Noise_Cancellation_Architecture
The_Mismatch_Noise_Cancellation_ArchitectureThe_Mismatch_Noise_Cancellation_Architecture
The_Mismatch_Noise_Cancellation_Architecture
Shereef Shehata
 
Architectural_Synthesis_for_DSP_Structured_Datapaths
Architectural_Synthesis_for_DSP_Structured_DatapathsArchitectural_Synthesis_for_DSP_Structured_Datapaths
Architectural_Synthesis_for_DSP_Structured_Datapaths
Shereef Shehata
 
High_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAs
High_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAsHigh_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAs
High_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAs
Shereef Shehata
 

Mehr von Shereef Shehata (19)

Windows_Scaling_2X_Speedup
Windows_Scaling_2X_SpeedupWindows_Scaling_2X_Speedup
Windows_Scaling_2X_Speedup
 
2D_block_scaling_Software
2D_block_scaling_Software2D_block_scaling_Software
2D_block_scaling_Software
 
2D_BLIT_software_Blackness
2D_BLIT_software_Blackness2D_BLIT_software_Blackness
2D_BLIT_software_Blackness
 
CIECAM02_Color_Management
CIECAM02_Color_ManagementCIECAM02_Color_Management
CIECAM02_Color_Management
 
Deblocking_Filter_v2
Deblocking_Filter_v2Deblocking_Filter_v2
Deblocking_Filter_v2
 
log_algorithm
log_algorithmlog_algorithm
log_algorithm
 
Temporal_video_noise_reduction
Temporal_video_noise_reductionTemporal_video_noise_reduction
Temporal_video_noise_reduction
 
Shereef_Color_Processing
Shereef_Color_ProcessingShereef_Color_Processing
Shereef_Color_Processing
 
Inertial_Sensors
Inertial_SensorsInertial_Sensors
Inertial_Sensors
 
magentometers
magentometersmagentometers
magentometers
 
Fusion_Class
Fusion_ClassFusion_Class
Fusion_Class
 
Gyroscope_sensors
Gyroscope_sensorsGyroscope_sensors
Gyroscope_sensors
 
2DCompsitionEngine
2DCompsitionEngine2DCompsitionEngine
2DCompsitionEngine
 
Block_Scaler_Control
Block_Scaler_ControlBlock_Scaler_Control
Block_Scaler_Control
 
2D_BitBlt_Scale
2D_BitBlt_Scale2D_BitBlt_Scale
2D_BitBlt_Scale
 
xvYCC_RGB
xvYCC_RGBxvYCC_RGB
xvYCC_RGB
 
The_Mismatch_Noise_Cancellation_Architecture
The_Mismatch_Noise_Cancellation_ArchitectureThe_Mismatch_Noise_Cancellation_Architecture
The_Mismatch_Noise_Cancellation_Architecture
 
Architectural_Synthesis_for_DSP_Structured_Datapaths
Architectural_Synthesis_for_DSP_Structured_DatapathsArchitectural_Synthesis_for_DSP_Structured_Datapaths
Architectural_Synthesis_for_DSP_Structured_Datapaths
 
High_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAs
High_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAsHigh_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAs
High_Level_Synthesis_of_DSP_Archiectures_Targeting_FPGAs
 

Shereef_MP3_decoder

  • 3. A generic block diagram of a perceptual audio encoder Masking Thresholds Time- Frequency Analysis Psychoacoustic Analysis Quantization and Encoding Bit-allocation Entropy (Lossless) coding Parameters MUX Side information Input Audio
  • 4. • The absolute threshold of hearing in a noiseless environment.
  • 5. Table 1.1: Band Edges of 26 Critical Bandwidth Auditory Fil- ters that Span the Audio Spectrum. Band No. Bandwidth(Hz) Band No. Bandwidth(Hz) 1 - 100 14 2000-2320 2 100-200 15 2320-2700 3 200-300 16 2700-3150 4 300-400 17 3150-3700 5 400-510 18 3700-4400 6 510-630 19 4400-5300 7 630-770 20 5300-6400 8 770-920 21 6400-7700 9 920-1080 22 7700-9500 10 1080-1270 23 9500-12000 11 1270-1480 24 12000-15500 12 1480-1720 25 15500-25000 13 1720-2000 26 25000-
  • 9. The ISO/MPEG-1 Layer III (MP3) encoder
  • 11. A uniform 32-band critically sampled analysis-synthesis filter bank. 32 + H0(z) H1(z) H2(z) H31(z) G0(z) G1(z) G2(z) G31(z) 32 32 32 32 32 32 32 s(n) sout(n) v0(n) y0(n) v0(n) v0(n) v0(n) y1(n) y2(n) y31(n) w0(n) w1(n) w2(n) w31(n)
  • 12. 0 100 200 300 Time Index (Samples) (a) 400 500 600 -4 3 2 1 0 -1 -2 -3 4 x 10 4 Amplitude 0 2 4 6 8 10 12 Time Index(Samples) 14 16 18 -0.25 -0.8 -0.2 -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 Amplitude (b) 0 2 4 6 8 10 12 Time Index(Samples) 14 16 18 -1 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 Amplitude (c)
  • 13. Implementation of the analysis subband Filter Bank Input 32 audio samples Build Input Sample Vector x Window Vector x by coefficient vector c (prototype filter) Calculate Yi , i=0 to 63 Compute coefficients of M Calculate the 32 subband samples by matrixing PCM Audio In Subband Samples Framing
  • 14. : Coefficients of the prototype filter c(n) and h(n). 0 50 100 150 200 250 300 350 400 450 500 -0.04 -0.03 -0.02 0.02 0.03 0.04 c(n) Sample Index (n) Sample Index (n) 0 50 100 150 200 250 300 350 400 450 500 -0.005 0 0.005 0.03 0.035 0.04 h(n)
  • 15. Composite magnitude responses of all subbands. 0 0.1 0.2 0.3 0.4 0.5 ∧ 0.6 0.7 0.8 0.9 1 -140 20 0 -20 -40 -60 -80 -100 -120 Hi(∧)c
  • 16. Sample input vector x 50 100 150 200 250 300 350 400 450 500 SampleIndex(n) -1 -0.8Input,x(n) -0.2 0 0.2 0.4 0.6 0.8 1
  • 17. Impulse Response of the Window Window,c(n) 0 50 100 150 200 250 300 350 400 450 500 SampleIndex(n) -0.04 -0.03 -0.02 0.04 0.03 0.02 0.01 0 -0.01
  • 18. Windowed output vector 0 50 100 150 200 250 300 350 400 450 500 SampleIndex(n) -0.03 -0.01 -0.02 0 0.01 0.02 0.03 WindowedOutput,z(n)
  • 19.
  • 20. Time domain and Frequency responses of the filter bank. Subbands 0,1 and 31 50 100 150 500200 250 300 Sample Index (n) 350 400 450 -0.01 -0.005 0 0.005 0.01 0.015 0.02 0.025 0.03 h0 c(n) 0 0.1 0.2 0.3 0.4 0.5 ∧ 0.6 0.7 0.8 0.9 1 -100 -80 -60 -40 -20 0 20 H0 c(∧)(dB) -120 -0.03 0 0.02 -20 0.01 -40 50 100 150 200 250 300 350 400 450 500 -0.02 -0.01 0 0.03 h1 c(n) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -140 -100 -80 -60 20 Hc(∧)(dB) 1 50 100 150 200 250 300 Sample Index (n) 350 400 450 500 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 hc(n) 31 0 0.1 0.2 0.3 0.4 0.5 ∧ 0.6 0.7 0.8 0.9 1 -100 -80 -60 -40 -20 0 20 Hc(∧)(dB) 31 Sample Index (n) ∧
  • 22.
  • 24. Analysis SPL computation Spreading function and excitation pattern Tonality Index estimation Input Signal Calculation of masking threshold for each partition Estimation of JND and SMR Pre-echo detection and window switching SMR
  • 25. Idealized critical band filter bank. 0 0.5 x 10 1 1.5 Frequency (Hz) 2 2.5 4
  • 26. Time-aligned input data, and after applying a Hanning window.
  • 27. FFT magnitude of the windowed audio data
  • 29. Energy of threshold partitions (eb)
  • 30. Weighted unpredictability of threshold partitions
  • 31. Spreading functions centered at bands 4, 5, 6 and 7, respectively.
  • 35. Plot of ct b/ecb
  • 38. SNR of the threshold partitions, and Masked thresholds of the threshold partitions.
  • 39. Approximate spectral curve for the threshold in quiet
  • 45. Signal-to-mask ratio in scalefactor bands.
  • 46. MDCT
  • 47. Illustration of the hybrid filter bank.
  • 48. Illustration of the windowsused in the MDCT filter bank:(a) long window,
  • 49. Illustration of the windowsused in the MDCT filter bank:(b) Start window,
  • 50. Illustration of the windowsused in the MDCT filter bank:(c) Stop window,
  • 51. Illustration of the windowsused in the MDCT filter bank:(d) 3 Short window,
  • 52. Illustration of a typical window switching. 0 10 20 30 40 50 60 70 80 90 100 0 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 Sample Index Window
  • 53. Alias reduction butterfly for the encoder. + Σ + + Σ - cs cs ca ca
  • 54. Alias reduction operations for a granule of MDCT data. 8 butterflies X0 X1 X2 18 samples X15 X16 X17 X18 X19 X20 X555 X556 X558 X559 X560 X573 X574 X575
  • 56. Simultaneous Masking SMRNMR SNR MASKING THRESHOLD MINIMUM MASKING THRESHOLD SoundPressureLevel(dB) Frequency CRITICAL NEIGHBORING BAND BAND m-1 bits m bits m+1 bits
  • 57. Calculation of Scalefactor selection information Calculation of maximum number of available bits Reset of iteration variables All spectral values zero? Outer Loop Calculation of number of unused bits Adjustment of the size of reservoir Y N
  • 58. Implementation of the Outer Loop (Distortion Control) Calculation of number of bits needed to encode the scalefactors. Binary search for quantizer step-size.Binary search for quantizer step-size. Inner Loop Calculation of distortion in each scalefactor band. Save scaling factors of scalefactor bands. Preemphasis Amplification of the scalefactor bands that violate the masking threshold. All scalefactor bands amplified? Amplification of all bands within upper limit? N At least one band exceeding allowed distortion? Y Y Restore scaling factors Y N N
  • 59.
  • 60. The effect of the variables status and over in the outer loop execution 1 2 Iterations 3 0 5 10 15 20 25 status over
  • 61. The effect of the variables status and over in the outer loop execution 1 2 3 4 5 6 0 2 4 6 8 over status 2 Iterations
  • 62. Unquantized MDCT coefficients for a short block 0 100 200 300 Sample Index 400 500 0.2 0.15 0.1 0.05 0 -0.05 -0.1 -0.15 -0.2 -0.25 -0.3 Amplitude
  • 63. MDCT coefficients (magnitude) quantized to meet target bit rate 128 kbps. 14 12 10 BIG tude 8 VALUES Ampli 6 QUADRUPLES 4 RUN-LENGTH ZEROS 2 0 0 100 200 300 400 500 Sample Index 0 100 200 300 Sample Index 400 500 0 2 4 6 8 14 12 10 Amplitude BIG VALUES QUADRUPLES RUN-LENGTH ZEROS
  • 64. Illustration of main data organization and encoding scheme part2_length region0 region1 region2 bigvalues region count1 rzero part3_length part2_3_length Scalefactor Huffman Code part2_length region0 xxxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxx region0 region1 region2 bigvalues region region2 count1 0000000000000000 rzero part3_length part2_3_length Scalefactor Huffman Code
  • 65. Illustration of bit usage in the inner loop. Iteration 1 Iteration 2 Big Values Count1 rzeros Bits used to code subregions Total available bits 1659 1588 1474
  • 66. Illustration of relationship between global_gain and the number of bits required to encode a granule. 129 130 Global Gain 131 1400 1700 1650 1600 1550 1500 1450 #Bitsused
  • 67. Header Frame 1 Header Frame 2 Header Frame 3 Header Frame 4 sync sideinfo1 sync sideinfo2 sync sideinfo3 sync sideinfo4 main data 1 main data 2 main data 3 main data 4 main data 4main data 3main data 2main data 1
  • 68. Illustration of total available bits to encode data frames. Available Bits Reservoir Size Mean Bits Granule0 Granule0 Granule0 Granule0 Granule0 Granule0 Granule1 Granule1 Granule1 Granule1 Granule1 Granule1 Frame 0 Frame 1 Frame 2 Frame 3 Frame 4 Frame 5
  • 70. Block Diagram of MP3 decoder
  • 71. Organization of scalefactors and Huffman coded data. GRANULE 0 GRANULE 1 LEFT CHANNEL RIGHT CHANNEL SCALEFACTORS HUFFMAN CODE BITS RIGHT CHANNEL LEFT CHANNEL . . . . SCALEFACTORS HUFFMAN CODE BITS HEADER (32) CRC (0,16) SIDE INFORMATION (136,256) MAIN DATA ANCILLARY BITS
  • 72. CRC Error Checking T212155 + + + DATA BITS T15 T14 T13 T1 T0 b0b1b2b13b15 b14 CRC check diagram.
  • 73. Alias reduction butterfly for the decoder + Σ - + Σ + cs cs ca ca
  • 74. 36 samples 0…35 WINDOWED OUTPUT FROM IMDCT 0…17 18…35 SAVED FROM PREVIOUS GRANULE 18 samples + ADD FIRST HALF 18 samples SAVE SECOND HALF 18 samples RESULT
  • 75. Polyphase implementation of the synthesis filter bank 31 63 V FIFO 16 V vector FIFO (1024 samples) 0 IMDCT 0 V vector U vector 511 D window 511 511 31 0 + + + + 31 0 = Reconstructed samples Subband samples W vector