Professional Documents
Culture Documents
17 - Chapter 4 PDF
17 - Chapter 4 PDF
Chapter 4
4.1 INTRODUCTION
speech signal.
memory requirements.
between the samples is lost and the scalar quantization itself destroys
50].
4.1. The two dimensional region shown in Fig 4.1 is called as the
are called as the encoding regions. The green dots represent the
66
Codebook with
Codeword’s
C
Ci
T
Let sk s 1 , s 2 ,......, s N be an „ N ‟ dimensional vector with real
real valued „N‟ dimensional input vector sk is matched with the real
codeword that best matches the input vector with lowest distortion is
taken and the input vector is replaced by it. The codebook consists of
the codebook and C i denote the ith codeword in a codebook. In Fig 4.2
this work the number of line spectral frequencies per frame is ten and
ensure filter stability after quantization. Another reason for not using
LPC coefficients are not used for quantization. The alternative to LPC
LSF vector after quantization. If the LSF samples in a vector are in the
1
H z (4.1)
A p z
where
p
A p z 1
K 1
K z K (4.2)
into two transfer functions having even and odd symmetry. This is
1
A p z H z Q p 1 z (4.5)
2 p 1
(4.4) is reduced to
H p 1 z
H ' z (4.6)
1 z
= A 0 z p A1 z
p 1
...... A p
and
Q p 1 z
Q ' z (4.7)
1 z
=B 0 z p B 1 z
p 1
...... B p
where
A 0 1 (4.8)
B 0 1 (4.9)
A k k p 1 k A k -1 (4.10)
70
B k k p 1 k - B k - 1 (4.11)
for k = 1 ,…….., p
The angular positions of the roots of H ' z and Q ' z gives us the
All the roots of H ' z and Q ' z must lie on the unit circle
The roots of equation (4.6) is obtained using the real root method [31]
the order „p‟ of equations (4.6) and (4.7) get reduces to „p/2‟. Then
and
p 1 1
p
B z 2 z 2 B z 2 z 2 ........ B
p p p
Q z z
' 2 (4.13)
0 1
p
2
71
As the roots of H ' z and Q ' z lie on the unit circle, they are
Z 1 Z 1
Let Z e j then cos and
2
jp p p - 2 1
H z 2 e
' 2 A 0 cos A 1 cos
........ A
2 2 p2
2
(4.14)
jp p p - 2 1
Q ' z 2 e 2 B 0 cos B 1 cos
........ B p
2 2 2 2
(4.15)
cos1 x i
LSF i (4.16)
2T
called Linde, Buzo and Gray (LBG) algorithm. The input to the LBG
split into two centroids or codewords using the splitting method. The
iterative LBG algorithm splits these two codeword‟s into four, four into
The flow chart of LBG algorithm is shown in Fig 4.3. The LBG
below:
initial codebook be „ C ‟.
73
Obtain the
training sequence
Find centroid
Compute D
Compute D1
No
D1 – D
Is
D
<
Yes
No
N 2b
Yes
Stop
Cn where
C n C (1 ) (4.17)
74
C n C (1 ) (4.18)
new codewords.
each of the codeword‟s Cn and Cn and let the difference be
„D‟.
and the codeword‟s Cn and Cn . The training vectors closer to
Cn falls in the region R1 and the training vectors closer to Cn
7. Let the training vectors falling in the region R1 be TV1 and the
8. Obtain the new centroid or mean for TV1 and TV2. Let the new
9. Replace the old centroids Cn and Cn by the new centroids
the new centroids CR1 and CR2 and let the difference be D 1 .
D1– D
11. Repeat steps 5 to 10 until .
D
greater than 2dB and less than 4dB and the percentage number of
having spectral distortion between 2 to 4dB and greater than 4dB are
f2 2
1
10 log 10 s i (f ) 10 log 10 s i (f ) df dB
SD i = ˆ (4.19)
f 2 f 1 f1
and quantized ith frame respectively. The frequency „f‟ is in Hz and the
equation (4.20)
1 N
N
SD = SD i (4.20)
i =1
than 2%.
frequency LSFs and on the LSFs with higher power spectrum. The
weights used are of two types. They are static or dynamic [54].
10 2
DW f ,fˆ Si Wi f i fˆi (4.21)
i 1
S 1.0 1 i 8
i
0.8 i9 (4.22)
0.4 i 10
78
r
W PS f (4.23)
i
set and using more number of bits for codebook generation. The goal
make the technique to use more number of training vectors and less
79
reduced. It has been observed that as the number of bits used for
S1 S2 S3 Sn
Vector Quantizer
Quantized output
given bit-rate and dimension. In LPC-10 the order of the filter chosen
80
full length i.e., vectors containing all the ten line spectral frequencies.
In Fig 4.4 S1, S2, S3……Sn are the input LSF vectors to be quantized
UVQ is that as vectors of full length are used, at higher bit-rates the
bit-rates is a difficult task, even though the training data contains less
2b 1 flops.
vector.
where
difficult task as vectors of full length are used for quantization without
are divided among the splits (parts). Due to splitting, the dimension of
are reduced. But the main disadvantage with this technique is that,
due to splitting the linear and non linear dependencies that exist
between the samples of a vector is lost and the shape of the quantizer
scalar quantizer.
84
S1 S2 S3 Sn
S11 S12 S13 S21 S22 S23 S31 S32 S33 Sn1 Sn2 Sn3
S11 S21 S31 Sn1 S12 S22 S32 Sn2 S13 S23 S33 Sn3
and so the LSF vector contain 10 samples and these 10 samples are
sp
n where n n . The number of independent quantizers is equal to
i i
i 1
the number of splits and the bits used for quantization are divided
among the splits. When b is the bits allocated to each split of the
i
sp
b b [54].
i
i 1
by equation (4.27)
sp bi
Complexity SVQ i 1
4n 2 (4.27)
i 1
86
where
equation (4.28)
sp b
Memory SVQ ni 2 i (4.28)
i 1
to the next stage and the bits used for quantization are divided among
4.6.
Training
Sequence
1st Stage
Training Sequence
LBG
Algorithm
1st Stage
Codebook
Vector
Quantizer
2nd Stage
Training Sequence
LBG
Algorithm
2nd Stage
Codebook
From Fig 4.6 it is observed that the codebook at the first stage is
first stage, likewise the codebook at the third stage is generated using
88
Encoder
+ +
Vector _ Vector _
+
Vector
+
s Quantizer 1 Quantizer 2 Quantizer 3
ŝ 1 e1 ê 1 e2 ê 2
I1 I2 I3
+ ê 1
ŝ 1 + +
ê 2
+
ŝ
and the quantized version of the input vector. The quantization error
obtain the quantized version of the error vector at the second stage
i.e., ê 2 and this process continues for the required number of stages.
Finally the decoder takes the indices Ii from each quantizer stage and
independent vector quantizer and the total bits available for vector
bj
4n2 1, where b j is the number of bits allocated to the jth stage.
bj
Quantizer is n2 .
bj p
Complexity MSVQ 4n2 1
(4.29)
j 1
where
by equation (4.30)
p b
Memory MSVQ n2 j (4.30)
j 1
stage.
to the quantizer are divided among the stages and splits of each stage.
at each stage & split are reduced which decreases the complexity and
Quantization techniques.
91
24 3 8,8,8
23 3 8,8,7
22 3 8,7,7
9 3 3,3,3
8 3 3,3,2
92
The allocation of the bits at each split of a stage is shown in Table 4.2.
8 3 2,3,3
7 3 2,2,3
6 3 2,2,2
3 3 1,1,1
2 3 0,1,1
From Tables 4.1 and 4.2 it is observed that the minimum number
of bits at each stage with three parts must be at least three. So with
bits.
three parts and three stages is shown in Fig 4.8. The block diagram is
similar to three stage Multistage Vector Quantizer except for the splits
treated as a separate vector quantizer and the vectors at each split are
quantized independently.
Split 1 + Split 1
+ Split 1
_ _
Split 2 + Split 2 + Split 2
s ŝ 1 e1 ê 1 e2
Split 3 Split 3 Split 3 ê 2
I1 I2 I3
ê 1 +
ŝ 1 + + ê 2
+
ŝ
p sp b
ji
Complexity 4n 2 ji 1 (4.31)
SMSVQ
j 1i 1
where
b is the number of bits allocated to the jth stage and ith split of a
ji
quantizer
p sp b
ji
Memory
SMSVQ n ji 2 (4.32)
j 1i 1
exploit the linear and non linear dependencies that exist between the
initially the Switch Vector Quantizer partitions the entire vector space
95
into voronoi regions and exploits the dependencies that exist across all
designed for each of the voronoi regions. As the Split Vector Quantizer
for the selection of a switch. The initial codebook is generated from the
in parallel.
training vectors used for the generation of initial codebook are divided
vectors that are nearer to a centroid in the initial codebook must form
LBG
Split VQ 1
LBG
Codebooks
LBG
1
LBG
Switch 2
Selection Split VQ 2
m LBG Codebooks
LBG
s Switch VQ
LBG Codebook
{Ci }im1
LBG
Fig 4.10. From Fig 4.10 it is observed that a Split Vector Quantizer is
Vector Quantizer using hard decision scheme the bits used for the
bits are used to design Switched Split Vector Quantizer, then the
number of bits allocated to the vector quantizers is B log m .
2
VQ
Split VQ 1
VQ
VQ
1
VQ
s Switch 2
Selection Split VQ 2
m VQ
VQ
{Ci }im1
Switch VQ
Codebook VQ
Split VQ m
VQ
VQ
and the quantized vector that gives minimum distortion with the input
98
decreases. The problem with SSVQ soft decision scheme is that using
by equation (4.33)
b
Complexity 4n2 m 1 (4.33)
SWITCH
b sp b
i i
Complexity 4n2 m 1 + 4n 2 -1 (4.34)
SSVQ HARD
i = 1
where
b
m 2 m is the number of switching directions
This is used to add the complexity and memory requirements of all the
b Pl sp b
ComplexitySSVQ SOFT 4n2 m 1 + 4n ki 2 ki -1 (4.35)
k 1 i = 1
where
quantizer
equation (4.36)
b
Memory n2 m (4.36)
SWITCH
b b sp b
Memory n2 m 2 m n 2 i (4.37)
i
SSVQ HARD i =1
b b Pl sp b
Memory n2 m 2 m n 2 ki (4.38)
ki
SSVQ SOFT k 1 i =1
101
This section deals with comparing the results of 3-part (split) SVQ,
bits). Frames having average spectral distortion greater than 1dB are
Percentage of
Bits / Complexity ROM
SD(dB) outliers
frame (Kflops/frame) (Floats)
2-4 dB >4dB
24(8+8+8) 0.29858287663694 0 0 10.23 2560
The bits allocated to each split of a 3-part SVQ are shown in the
brackets of the first column of Table 4.3. The number of splits taken is
particular split depends on the priority given to that split. Splits with
high frequency LSFs are given more priority. The order of priority
given to the splits is split 1 < split 2 < split 3. From Table 4.4 it can be
slightly increasing.
Percentage of
Bits / Complexity ROM
SD(dB) outliers
frame (kflops/frame) (Floats)
2-4 dB >4dB
24(8+8+8) 0.123725346044532 0 0 30.71 7680
the brackets of the first column of Table 4.5. The priority given to the
stages during the allocation of bits is stage 1 > stage 2 > stage 3.
Stages 2 and 3 are given less priority due to the quantization of errors.
It can be observed from Table 4.6 if the priority is not maintained the
Percentage of
Bits / Complexity ROM
SD(dB) outliers
frame (kflops/frame) (Floats)
2-4 dB >4dB
24(8+8+8) 0.176946577472654 0 0 0.807 204
of the bits to a particular stage and split depends on the priority given
to that stage and split. The bits allocated to a stage are divided among
part SSVQ using hard decision scheme. The number of bits allocated
number of switches
number of bits allocated to the switches is equal to log 2 .
the splits of a quantizer is similar to the allocation of bits for the splits
Table 4.9 Number of unstable frames for 3-part SVQ, 3-part 3-stage S-
MSVQ and 2-switch 3-part SSVQ using hard decision
scheme with no ordering constraint
No of unstable frames
Bits / frame
SVQ S-MSVQ SSVQ hard
24 0 1 0
23 0 1 6
22 0 1 6
21 0 1 6
20 0 1 6
Table 4.9 gives the number of unstable frames for 3-part SVQ, 3-
part 3-stage S-MSVQ and 2-switch 3-part SSVQ using hard decision
0.55
SVQ
0.5
0.45
Spectral Distortion (dB)
0.4
0.35
0.3
MSVQ SSVQ HARD
0.25 S-MSVQ
0.2
0.15
0.1
20 20.5 21 21.5 22 22.5 23 23.5 24
Number of Bits/ Frame
Fig 4.11 Spectral Distortion for SVQ, MSVQ, S-MSVQ and SSVQ hard
decision scheme
106
The Fig 4.11 gives a plot of the spectral distortion of 3-part Split
35
25
Complexity (kflops/frame)
20
SVQ
15
S-MSVQ
SSVQ HARD
10
0
8 10 12 14 16 18 20 22 24
Number of bits/ frame
8000
6000
Memory Requirements(floats)
MSVQ
5000
3000 SVQ
S-MSVQ
2000
1000
0
8 10 12 14 16 18 20 22 24
Number of bits/ frame
Fig 4.13 Memory requirements for SVQ, MSVQ, S-MSVQ and SSVQ
using hard decision scheme
0.4
0.2
Outliers
-0.2
-0.4
-0.6
-0.8
-1
20 20.5 21 21.5 22 22.5 23 23.5 24
Number of Bits/ Frame
Fig 4.14 gives a plot of the number of outlier frames lying between
outlier frames lying between 2 to 4 db must be less than 2%. But from
Fig 4.14 it can be observed that the number of outlier frames is zero.
So one can say the vector quantization is done in a good manner and
0.4
0.2
Outliers
-0.2
-0.4
-0.6
-0.8
-1
20 20.5 21 21.5 22 22.5 23 23.5 24
Number of Bits/ Frame
Fig 4.15 gives a plot of the number of outlier frames greater than 4
frames greater than 4 dB must zero. From Fig 4.15 it can be observed
Tables 4.3, 4.5, 4.7 and 4.8 shows the spectral distortion
to 20 bits/frame. From Tables 4.3, 4.5, 4.7 and 4.8 and from Figs
for MSVQ is due to the addition of the quantized error vectors at each
stage to the quantized input vector at the first stage and due to the
the bit-rate which can be observed for 2-switch 3-part Switched Split
111
Vector Quantizer using hard decision scheme of Table 4.9. If there are
4.8 CONCLUSION
Split Vector Quantizer using hard decision. The 3-part 3-stage Split-