Document not found! Please try again

Design of a hybrid quantizer with variable length code - PMF

0 downloads 0 Views 479KB Size Report
Hybrid quantizer with dead-zone is presented in Section 6 ... Instead of that, points (thresholds, levels) are denser where pdf of input signal has higher value and ...
Design of a hybrid quantizer with variable length code Zoran H. Peri´c, Milan R. Dinˇci´c

Marko D. Petkovi´c ∗

Faculty of Electrical Engineering

Faculty of Science and Mathematics

University of Niˇs

University of Niˇs

Aleksandra Medvedeva 14, 18000 Niˇs, Serbia

Viˇsegradska 33, 18000 Niˇs, Serbia

[email protected], [email protected]

[email protected]

Abstract In this paper a new model for compression of Laplacian source is given. This model consists of hybrid quantizer whose output levels are coded with Golomb-Rice code. Hybrid quantizer is combination of uniform and nonuniform quantizer, and it can be considered as generalized quantizer, whose special cases are uniform and nonuniform quantizers. We propose new generalized optimal compression function for companding quantizers. Hybrid quantizer has better performances (smaller bit-rate and complexity for the same quality) than both uniform and nonuniform quantizers, because it joins their good characteristics. Also, hybrid quantizer allows great flexibility, because there are many combinations of number of levels in uniform part and in nonuniform part, which give similar quality. Each of these combinations has different bit-rate and complexity, so we have freedom to choose combination which is the most appropriate for our application, in regard to quality, bitrate and complexity. We do not have such freedom of choice when we use uniform or nonuniform quantizers. Until now, it has been thought that uniform quantizer is the most appropriate to use with lossless code, but in this paper we show that combination of hybrid quantizer and lossless code gives better performances. As lossless code we use Golomb-Rice code because it is especially suitable for Laplacian source since it gives average bit-rate very close to the entropy and it is easier for implementation than Huffman code. Golomb-Rice code is used in many modern compression standards. Our model can be used for compression of all signals with Laplacian distribution. Key words: Hybrid quantizer, Uniform quantizer, Companding nonuniform quantizer, Golomb-Rice code, Lossy compression.

1

Introduction

Compression has a very important role in modern systems for data transmission and storage. There are two types of compression, lossy and lossless, but in all modern standards, combination of lossy and lossless compression is used [18]. In lossy compression, an irreversible error is made, which can be measured by distortion. Lossy compression can be achieved with good choice of ∗

M.D. Petkovi´c is supported by the research project 144011 of the Serbian Ministry of Science.

1

quantization method. Quantizers can be uniform and nonuniform [5]. Lossless compression allows decreasing of average bit-rate without losing information and can be achieved using an entropy coding [4]. There are many different types of entropy codes, examples are Huffman [2, 3, 21], arithmetic and Golomb-Rice. Golomb-Rice code is especially suitable for data with Laplacian distribution since it gives average bit-rate very close to the entropy and it is much simpler for implementation than Huffman code [9, 16, 17]. Hence Golomb-Rice code is used in many modern standards, such as JPEG-LS [20], MPEG-4 ALS (Audio Lossless Coding) [8], and CCSDS (Consultative Committee for Space Data Systems) recommendation for lossless data compression [1]. Also, Golomb-Rice code can be used for compression of test data [19]. In the paper [7] model with a uniform quantizer and Golomb-Rice code was analyzed. Also the model with nonuniform quantizer and Golomb-Rice code was mentioned in [7] but not analyzed. In this paper we analyze model with uniform quantizer and Golomb-Rice code and model with nonuniform quantizer and Golomb-Rice code. We give the closed-form expression for the Golomb-Rice bit-rate RGR . We show that RGR is very close to the entropy and, both for uniform and nonuniform quantizer. Also we go further and propose a hybrid model consisting of the hybrid quantizer and Golomb-Rice code. The main aim of this paper is design of hybrid quantizer whose output levels are coded with Golomb-Rice code. Hybrid quantizer is combination of uniform and nonuniform quantizer. Uniform quantizer covers interval around the point 0, called uniform region, whereas nonuniform quantizer covers outer region, called nonuniform region. This nonuniform quantizer differs from classic nonuniform quantizers because it does not cover range around 0. Hence we introduce generalized optimal compression function whose special case is classic optimal compression function. Very important parameter of hybrid quantizer is stepsize ∆ of uniform region. We propose three different methods for the optimization of the stepsize value. The first method is very simple, due to the fact that optimization of hybrid quantizer is replaced with optimization of uniform quantizer. Although simple, this method gives good results. In other two methods, optimization of hybrid quantizer is done and better results are obtained. In the second method we optimize ∆ to achieve some required value of SN R, whereas in the third method we optimize ∆ to achieve maximal SN R. In each of these three methods, optimization of Golomb-Rice bitrate RGR is done. Expression for RGR is given in closed form. The third method gives maximal SN R but it has higher RGR , whereas the second method gives SN R which is smaller than maximal, but it has smaller bit-rateRGR . Choice of method depends on requirements. Hybrid quantizer can be considered as a generalized quantizer whose special cases are uniform and nonuniform quantizer. Good characteristic of uniform quantizer is that small bitrate can be achieved in combination with a lossless code. Good characteristic of nonuniform quantizer is high value of SN R. Hybrid quantizer joins good characteristics of uniform and nonuniform quantizers and therefore it has better performances then both of them. By now it was thought that uniform quantizer is the most appropriate to use with lossless code. In this paper it is shown that combination of hybrid quantizer and lossless code gives better results. We compare hybrid quantizer with uniform and nonuniform quantizers in two ways. First, we design all three quantizers for the same SN R and then compare Golomb-Rice bit-rate RGR and complexity. After that we design these quantizers for the same RGR and then compare SN R and complexity. Hybrid quantizer gives for 0.14 bits/sample smaller RGR for the same SN R, or higher SN R for 0.8 dB for the same RGR , with smaller complexity, than uniform quantizer. Hybrid quantizer gives for 0.42 bits/sample smaller RGR for the same SN R, or higher SN R for 2 dB for the same RGR , than nonuniform quantizer. One very important characteristic of hybrid quantizer is flexibility. This means that we 2

can adjust number of levels in uniform and nonuniform region, N1 and N2 respectively, i.e. there are a lot of combinations (N1 , N2 ) which give required SN R. This is different from uniform or nonuniform quantizers where there is only one number of levels N which gives some required SN R. Combinations (N1 , N2 ) giving similar SN R have different bit-rate and complexity. Complexity depends on total number of levels N1 +N2 , but also depends on number of levels in nonuniform region N2 , since nonuniform quantizer is harder to implement. Also, existence of three methods for determination of parameter ∆ gives additional flexibility. We can choose combination (N1 , N2 ) which is the most appropriate for our requirements of SN R, bit-rate R and complexity. In many applications quantizers with dead-zone are used [10, 12]. Therefore, hybrid quantizer with dead-zone is also presented. Golomb-Rice code is applied. Optimization of dead-zone width is done. It is shown that dead-zone has small influence on performances. All above mentioned recommend our new model for implementation in compression of wide class of signals with Laplacian distribution. The idea of a hybrid quantizer was realized in [13, 14], but that hybrid quantizer was combination of two nonuniform quantizers – one realized with companding technique and one with Lloyd–Max’s algorithm. That combination of two nonuniform quantizers is suitable for codewords with fixed length. For variable-length codewords, hybrid quantizer with one uniform and one nonuniform quantizer is more appropriate. In [15], model with two nonuniform companding quantizers and very simple lossless coding was described. One of these nonuniform quantizers is used if all samples in a frame are less than a threshold and the second one is used if only one sample in the frame is larger than threshold. That model in [15] is very simple but it has worse performances than our new model. This paper is organized as follows. In Section 2 some basic theory of quantization and Golomb-Rice coding is given. Also, Golomb-Rice code is applied on uniform and nonuniform quantizer. In Section 3 hybrid model is described. Methods for determination parameters of hybrid model are described in Section 4. Comparison of hybrid quantizer with uniform and nonuniform quantizers is described in Section 5. Hybrid quantizer with dead-zone is presented in Section 6. Section 7 concludes the paper.

2 2.1

Quantization and Golomb-Rice code Quantization

A scalar quantizer with N levels is characterized by the set of real numbers t1 , t2 , . . . , tN −1 , called decision thresholds, satisfying −∞ = t0 < t1 < · · · < tN −1 < tN = +∞ and set of numbers y1 , . . . , yN , called representation levels, satisfying yj ∈ αj = [tj−1 , tj ), for j = 1, . . . , N . Sets α1 , α2 , . . . , αN form the partition of the set of real numbers R and are called quantization cells. The quantizer is defined as many-to-one mapping Q : R → {y1 , y2 , ..., yN } defined by Q(x) = yj where x ∈ αj . Cells α2 , . . . , αN −1 are called inner cells (or granular cells) while α1 and αN are called outer cells (or overload cells). In such way, cells α2 , . . . , αN −1 form granular while cells α1 and αN form an overload region. Assume that an input signal is characterized by continuous random variable X with probability density function (pdf) denoted by p(x). In the rest of the paper we assume that information source is Laplacian source with memoryless property and zero mean value. The pdf of Laplacian source is given by

3

√ |x| 2 1 p(x) = √ e− σ . 2σ

(1)

The variance of this zero-mean-value signal is equal to σ 2 . Without loosing of generality we can assume that σ = 1. Since p(x) is an even function, an optimal quantizer Q must satisfy ti = −tN −i and yi = −yN −i for arbitrary i = 1, . . . , N . Quantization process produces an irreversible error. Quantity of that error is expressed by distortion D. There are several ways to express signal distortion. One most commonly used is the mean-squared difference, i.e. 2

D = E(X − Q(x)) =

N Z X i=1

ti

(x − yi )2 p(x)dx.

(2)

ti−1

Distortion D consists of granular distortion Dg and overload distortion Dol , defined by Dg =

N −1 Z ti X i=1 t1

Z Dol =

(x − yi )2 p(x)dx,

ti−1

Z

(x − y1 )2 p(x)dx +

+∞

(3) (x − yN )2 p(x)dx.

tN −1

−∞

Obviously, it holds D = Dg + Dol , i.e. total distortion is equal to the sum of granular and overload distortion. The performance of a quantizer is often specified in terms of signal-to-noise ratio (SN R), which is directly obtained from the distortion D using the following relation µ 2¶ σ SN R [dB] = 10 · log10 . (4) D There are two types of quantizers, uniform and nonuniform. In uniform quantizer, decision thresholds ti and representation levels yi are placed on mutually equal distance ∆. Granular distortion for uniform quantizer is equal to R t N −1

Dg = (∆2 /12)Pgran ,

(5)

where Pgran = t 1 p (x) dx is probability that input signal takes value from the granular region. In nonuniform quantizer, decision thresholds (and also representation levels) are not equidistant. Instead of that, points (thresholds, levels) are denser where pdf of input signal has higher value and vice versa. In this way, nonuniform quantizer is adjusted to the input signal, which results in better performances. There are two methods for construction of nonuniform quantizer: iterative method (Lloyd-Max algorithm) and companding technique. Companding technique consists of the following steps: 1. compress the input signal x by applying the compressor function c(x); 2. apply the uniform quantizer Qu on the compressed signal c(x); 3. expand the quantized version of the compressed signal using an inverse compressor function c−1 (x).

4

There are different types of compression law, but maximal SNR is achieved using optimal compression law. There are several ways to define the compressor function for optimal compression law. Originally in [11] and also in [6], it is the function c : R → (−1, 1) defined by Z x p1/3 (x)dx c(x) = −1 + 2 Z −∞ (6) +∞ 1/3 p (x)dx −∞

For Laplacian pdf with σ = 1 expression (6) becomes  ³ √ ´  1 − exp − 2x , x ≥ 0, ³ √3 ´ c (x) =  −1 + exp 2x , x < 0. 3

(7)

This function is shown in Figure 1. Distortion for nonuniform quantizer for large number of points N (for any compression function c(x)) is defined by Bennett integral as µ ¶2 Z +∞ dc(x) 1 D= p (x) dx. (8) 3N 2 −∞ dx For optimal compression function given by (7), distortion becomes 2 D= 3N 2

µZ

+∞

¶3 1/3

p

(x)dx

.

(9)

0

Replacing the expression (1) for the pdf of Laplacian source with σ = 1 yields to D=

9 2N 2

(10)

c(x) 1

0.5

0

x

-0.5

-1

Figure 1: Optimal compression function

5

2.2

Golomb-Rice code

Output levels from quantizer can be considered as discrete source of symbols {y1 , y2 , ..., yN }. We can code these output levels using fixed-length codewords. Then, bit-rate is Rf ixed = dlog2 N e

[bits/sample]

(11)

where dxe is the first integer great or equal to x. More effective way to code these output levels is by using entropy code with variable-length codewords. Probability of symbol yi , denoted as Pi , is equal to the probability that input signal takes value from the segment αi = [ti−1 , ti ). Entropy of this source is defined as H =

N X

µ P

(i)

log2

i=1

1 P (i)

¶ [bits/sample]

(12)

and it is lower bound of bit-rate for lossless entropy code. In practice, the bit-rate of any lossless code is always higher than the entropy, but the aim is to come as close as possible to the entropy. To achieve this, symbols with large probability are coded with short codewords, and less-probable symbols are coded with longer codewords. There are many types of entropy codes, such as Huffman code, arithmetic code and Golomb-Rice code. For data with Laplacian distribution, Golomb-Rice code is very suitable since it has average bit-rate which is very close to the entropy. Also, Golomb-Rice code is much simpler and faster than Huffman code because it can be computed with a few logical operations. All these are the reasons why Golomb-Rice code is part of many modern compression standards. In order to explain Golomb-Rice code, we should first describe unary code. Unary code is very simple entropy code for coding nonnegative integers. In unary code, arbitrary nonnegative integer n is coded with n one’s followed with one zero, that is, codeword for n is: 11...1 | {z } 0. n

The Golomb-Rice code is parameterized prefix entropy code for coding nonnegative integers n. Parameterized code means that this code depends on parameter m, which is the power of two (m = 2k ) . Choosing appropriate value for parameter m we can adjust Golomb-Rice code to every value of integer n. The first step in constructing the Golomb-Rice code for nonnegative integer n is to compute the two quantities: q (quotient) and r (remainder) by q = n/m,

r = n − mq,

r ∈ (0, m − 1)

(13)

Every integer n is uniquely determined by q and r. The codeword for n is constructed in the following way: first q is coded using unary code (with (b1 + n/mc) bits), followed by the k-bits natural code for r. Therefore, the codeword for n has (1 + k + bn/mc) bits. Golomb-Rice code can be explained in another way: set of nonnegative integer is divided into groups of m integers, and an ordinal number is assigned to every group (numbers from 0 to m − 1 belong to group 0, from m to 2m − 1 belong to group 1, etc). For arbitrary integer n, quotient q is equal to the ordinal number of the group and reminder r represents position of n inside the group.

2.3

Application of Golomb-Rice code on uniform and nonuniform quantizer

In this subsection we apply Golomb-Rice code with parameter m = 2k on a uniform and a nonuniform quantizer. 6

First, uniform quantizer with N levels and stepsize ∆ is considered. To apply Golomb-Rice code, we divide N levels into S segments of m levels. Segments are denoted with 0, 1, ..., S − 1. Codewords for levels in j-th segment (0 ≤ j ≤ S − 1) have form 11...1 | {z } 0 xx...x | {z }, their length is j

lj = j + k + 1 bits

k

(14)

and xx...x | {z }, x ∈ {0, 1}, is natural fixed-length code for m levels in j-th segment. Probabilities k

of segments are

Z

(j+1)·m∆/2

Pj = 2

p(x)dx,

0 ≤ j ≤ S − 2,

jm∆/2 Z +∞

PS−1 = 2

p(x)dx. (S−1)m∆/2

For Laplacian distribution these probabilities become √

Pj = e−jm∆/ PS−1 = e

2



− e−(j+1)m∆/ 2 ,

√ −(S−1)m∆/ 2

0 ≤ j ≤ S − 2,

(15)

The average bit-rate for Golomb-Rice code, denoted with RGR , is RGR =

S−1 X

lj Pj

[bits/sample]

(16)

j=0

Changing (14) and (15) in (16), we obtain

RGR = k +1+

S−1 X i=1

√ √ −1 + exp((m − N )∆/ 2) √ exp(−im∆/ 2) = k + 1 − −1 + exp(m∆/ 2)

[bits/sample] (17)

In Table 1 we give numerical results for uniform quantizer QN unif with N levels, designed for N σ = 1, for different values of N . With ∆opt is denoted optimal step size of the quantizer which gives maximal SN R. Values for ∆N opt and for corresponding SN R are taken from [5, p. 127]. Golomb-Rice bit-rate, RGR , is calculated using (17) where ∆ = ∆N opt . In dependence on used combination (k, S) we obtain different values for RGR , for the same N . We can see from Table 1 that for every N there is optimal value for k such that RGR is minimal. These optimal values of k and corresponding minimal bit-rates RGR are bolded in Table 1. Dependence of average bit-rate RGR on parameter k is shown in Figure 2, for different values of parameter N . For the purpose of comparison, in Table 1 we also give entropy H given with (12), Huffman average bit-rate RHuf f which would be achieved if Huffman code was used instead of Golomb-Rice code and bit-rate Rf ixed , given with (11), which would be achieved if fixed-length natural code was used. H, RHuf f and Rf ixed do not depend on parameter k. We can see from Table 1 that Golomb-Rice bit-rate RGR is very close to the entropy H. Also, RGR is much smaller than Rf ixed . Now, we will apply Golomb-Rice code on nonuniform quantizer with optimal compression law c(x), given with (7). This can be done in the same way as for uniform quantizer, by dividing N levels into S segments of m levels. Borders between segments (in positive part of 7

N

∆N opt

SN R

32

0.2800

20.60

64

0.1657

25.36

128

0.0961

30.23

256

0.0549

35.14

(k, S) (1,16) (2,8) (3,4) (1,32) (2,16) (3,8) (4,4) (1,64) (2,32) (3,16) (4,8) (5,4) (1,128) (2,64) (3,32) (4,16) (5,8) (6,4)

RGR 4.04943 3.82312 4.2552 5.7829 4.67046 4.64262 5.18042 8.86719 6.20051 5.38393 5.50827 6.12802 14.3983 8.95833 6.74876 6.16284 6.40657 7.09114

H

RHuf f

Rf ixed

3.77931

3.8207

5.00

4.53642

4.5644

6.00

5.32213

5.3480

7.00

6.13125

6.1547

8.00

Table 1: Numerical results for uniform quantizer

9.5

9.0

8.0

N N

Golomb-Rice bit-rate

R

GR

=64 =128 N=256

1 2 3

8.5

7.5

7.0

3

6.5

6.0

2

5.5

5.0

1

4.5

4.0 1

2

3

4

5

6

k

Figure 2: Dependence of Golomb-Rice average bit-rate RGR on parameter k for different values of number of levels N for uniform quantizer

8

the real axis) are denoted with dj , 1 ≤ j ≤ S − 1. For border dj it is valid that c(dj ) = jm/N . Probabilities of segments are given with √ P0 = 1 − exp(− 2d1 ) √ √ (18) Pj = exp(− 2dj ) − exp(− 2dj+1 ), 1 ≤ j ≤ S − 2 √ PS−1 = exp(− 2dS−1 ) For Laplacian distribution expressions (18) become P0 = 1 − (1 − m/N )3 Pj = (1 − jm/N )3 − (1 − (j + 1)m/N )3 , PS−1 = (1 − (S − 1)m/N )3

1≤j ≤S−2

(19)

Lengths of codewords are given with (14). Golomb-Rice bit-rate RGR is given with RGR = PS−1 j=0 lj Pj . Using (14) and (19), we obtain RGR = k + 1 +

S−1 X

(1 − i/S)3 = k +

i=1

(m + N )2 4mN

[bits/sample]

(20)

In Table 2 we give SN R and RGR for this nonuniform quantizer for different values of N . RGR is given for different values of k. For every N there is optimal k such that RGR is minimal. These minimal Golomb-Rice bit-rates RGR are bolded. For purpose of comparison, we also give entropy H and Huffman bit-rate RHuf f . We can see that RGR is close to entropy H. From Table 1 and Table 2 we can see that Golomb-Rice bit-rate RGR is very close to Huffman bit-rate RHuf f , but Golomb-Rice code is much simpler and faster than Huffman code. Therefore, we can conclude that Golomb-Rice code is more appropriate than Huffman code for date with Laplacian distribution. Because of that, in the rest of this paper, only Golomb-Rice code will be considered. N

SN R

16 32 48 64 80 96 112 128

17.5503 23.5709 27.0927 29.5915 31.5297 33.1133 34.4522 35.6121

RGR (k = 2) 3.5625 4.53125 5.52083 6.51563 7.5125 8.51042 9.50893 10.5078

RGR (k = 3) 4.125 4.5625 5.04167 5.53125 6.025 6.52083 7.01786 7.51563

RGR (k = 4) 5.0 5.125 5.3333 5.5625 5.80 6.04167 6.28571 6.53125

RGR (k = 5) 6.0 6.0 6.0 6.125 6.216 6.3333 6.44315 6.5625

H

RHuf f

3.38788 4.37962 4.96304 5.37753 5.69921 5.96211 6.18442 6.37701

3.4297 4.4157 4.9935 5.4111 5.7227 5.9913 6.2187 6.4105

Table 2: Numerical results for nonuniform quantizer

3

A hybrid quantizer with Golomb-Rice code

In this section our new compression model is described. This model consists of a hybrid quantizer whose output levels are coded with Golomb-Rice code. The hybrid quantizer represents the union of a uniform and a nonuniform companding quantizer. Uniform quantizer is applied in the interval (−x1 , x1 ), called uniform region, whereas nonuniform quantizer is applied in the 9

interval (−∞, −x1 ) ∪ (x1 , +∞), called nonuniform region. Number of levels in uniform region is denoted with N1 and in nonuniform region with N2 . Stepsize for uniform region is denoted with ∆. Therefore, x1 = 0.5 × N1 × ∆

(21)

To apply Golomb-Rice code with parameter m = 2k , we divide the uniform region into S = N1 /m segments denoted with 0,1,. . . ,S − 1. Each segment contains m points: m/2 points in positive part and m/2 points in negative part of real axis. Segment j, 0 ≤ j ≤ S − 1, covers the part of the real axis (− (j + 1) m∆/2, −jm∆/2) ∪ (jm∆/2, (j + 1) m∆/2). The width of each segment is wseg = m∆, half of that in positive part and other half in negative part of real axis. Codewords for the points in segment j, 0 ≤ j ≤ S − 1, have the form 11...1 | {z } 0 xx...x | {z } j

k

where xx...x | {z } is natural fixed-length code of the level inside j-th segment. All codewords in one k

segment have the same length which is given with (14). Division of the real axis on uniform and nonuniform region and division of the uniform region into segments are depicted in Figure 3.

Figure 3: Division of the real axis on uniform and nonuniform region and division of the uniform region into segments In the nonuniform region we use nonuniform companding quantizer with generalized optimal compression function cgen (x) : (−∞, −x1 )∪(x1 , +∞) → (−1, 1). For Laplacian pdf with σ = 1, cgen is given by:  ´ ³ √  1 − exp − 2 (x − x1 ) , x ≥ x1 ´ ³ √3 (22) cgen (x) =  −1 + exp 2 (x + x1 ) , x ≤ −x 1 3 Graph of the function cgen (x) is shown on the Figure 4. For the special case x1 = 0 expression (22) becomes (7), i.e. cgen (x) becomes c (x). Codewords for points in nonuniform region have form 11...1 | {z } , where xx...x | {z } 0 xx...x | {z } is the natural S

d log2 N2 e

fixed-length code. All these codewords have the same length of

lnonunif = S + 1 + dlog2 N2 e bits.

d log2 N2 e

(23)

The probability that input sample take a value from the segment j is Z (j+1)m∆/2 Pj = 2 p (x)dx, 0 ≤ j ≤ S − 1. jm∆/2

The probability that input sample take a value from the nonuniform region is Pnonunif = R +∞ 2 x 1 p (x) dx. Golomb-Rice average bit-rate, RGR , for hybrid model is 10

c

(x)

gen

1

0.5

-x

1

0

x

x

1

- 0.5

-1

Figure 4: Generalized optimal compressor function for the nonuniform quantizer

RGR =

S−1 X

lj Pj + lnonunif Pnonunif

[bits/sample]

(24)

j=0

For Laplacian distribution we can calculate that Pj = e−jm∆/

√ 2



− e−(j+1)m∆/

and



Pnonunif = e−x1

2

2

0≤j ≤S−1 √

= e−N1 ∆/ 2 .

Changing these expressions in (24) and using (14) and (23), we obtain for Laplacian distribution that RGR = k + 1 +

S−1 X

√ 2

e−im∆/



+ e−N1 ∆/

2

(dlog2 N2 e − k + 1)

[bits/sample]

(25)

i=1

We can see from (25) that RGR decreases when ∆ increases. We can further simplify (25) as √

√ 1 − e−(S−1)m∆/ 2 √ RGR = k + 1 − + e−N1 ∆/ 2 (dlog2 N2 e − k + 1) [bits/sample]. (26) 1 − em∆/ 2 R +x Moreover Punif = −x 11 p (x) dx represents the probability that input sample belongs to the √ uniform region. For Laplacian distribution we can calculate that Punif = 1 − e−x 1 2 . Distortion for the uniform region can be calculated using expression (5) as √ ´ ∆2 ³ ∆2 −x 1 2 × Punif = 1−e Dunif = (27) 12 12 Distortion for the nonuniform quantizer can be calculated from (8) if we use cgen (x) instead of c (x). We obtain next expression

11

Dnonunif =

³ √ ´ 9 exp − 2x1 2N22

(28)

This expression is generalization of (10). For x1 = 0 relation (28) becomes (10). Using (27), (28) and (21) we obtain the following expression for the total distortion D = Dunif + Dnonunif =

√ ´ ∆2 ³ 9 −N1 ∆/√2 1 − e−N1 ∆/ 2 + e 12 2N22

(29)

Hence, SN R is given by

SN R [dB] = 10 · log10

1 = −10 · log10 D

µ

¶ √ ´ 9 −N1 ∆/√2 ∆2 ³ −N1 ∆/ 2 1−e + e 12 2N22

(30)

Hybrid quantizer is completely determined with four parameters: N1 , N2 , ∆ and k. Other parameters, such as m, S and x1 , can be calculated from them. Methods for calculating these four parameters will be explained in the Section 4. Decoder. We suppose that synchronization was done, i.e. decoder knows where first codeword begins. Decoder also knows values of parameters S, N2 and m = 2k . Decoder counts 1’s in first codeword before first 0, and this number of 1’s is denoted with g. If g < S then this codeword represents level in the g-th segment of the uniform region. Following k bits behind first 0 represents fixed-length natural code of level inside g-th segment. If g = S then level belongs to nonuniform region and dlog2 N2 e bits behind first 0 represent fixed-length natural code of level inside nonuniform region. If level belongs to nonuniform region, after decoding it must pass through the expander with function c−1 gen . After decoding first codeword, decoder continues in the same way to decode next codewords.

4

Determination of parameters of the hybrid model and numerical results

In this section we describe methods for determination of parameters N1 , N2 , ∆ and k. Also, we will give some numerical results. With SN R∗ is denoted required value of SN R for some application. If Nunif and Nnonunif are numbers of levels which are needed to achieve SN R∗ using only uniform or only nonuniform quantizer, respectively, then N1 and N2 should satisfy condition Nnonunif ≤ N1 + N2 ≤ Nunif

(31)

Values for Nunif and Nnonunif can be found in Table 1 and Table 2. For example, if we want to satisfy G.711 standard, then SN R∗ should be little above 34dB, and using Table 1 and Table 2, condition (31) becomes 112 ≤ N1 + N2 ≤ 256

(32)

Condition (31) gives upper and lower limits for N1 and N2 , but leaves freedom in determination of these parameters. There are many combinations (N1 , N2 ) which satisfy condition (31). Each of these combinations gives different SN R and Golomb-Rice bit-rate RGR . Also, 12

complexity of these combinations are different, whereby complexity depends on total number of levels N1 + N2 , but also depends on number of levels in nonuniform region N2 , since nonuniform quantizer is more complex than uniform. Therefore, hybrid model is very flexible because it gives many possible combinations (N1 , N2 ) and we can choose combination which is the most appropriate for our application, regarding to SN R, bit-rate and complexity. Suppose that we have already determined parameters N1 and N2 , using (31). Now, we should find other two parameters, ∆ and k, and we will describe three methods to find them. We will use expressions (29), (30) and (26), and we can see that SN R andD depend only on ∆ whereas RGR depends on ∆ and k, i.e. RGR (∆, k). Method 1. As we said before, Nunif is number of levels of uniform quantizer Qunif which is N needed to achieve required SN R, denoted with SN R∗ . With ∆optunif is denoted optimal stepsize N for Qunif which gives maximal SN R. Values for ∆optunif for different values of Nunif and for σ = 1 are given in Table 1, whereby N = Nunif . Now, stepsize ∆ of the uniform region of N hybrid quantizer is chosen to be equal to optimal stepsize ∆optunif of uniform quantizer Qunif , i.e. N

∆ = ∆optunif

(33)

N

Hence, we use ∆optunif for all possible combinations(N1 , N2 ) although N1 +N2 can be less than Nunif . This is because hybrid quantizer has better performances than uniform quantizer Qunif and it can achieve the same quality with smaller number of levels. We can say that hybrid quantizer is obtained from uniform quantizer Qunif by keeping the part of Qunif in interval (−x1 , x1 ) and using nonuniform quantizer in the rest of the x-axis. Since ∆ is determined by (33), Golomb-Rice bit-rate RGR becomes function only of k, i.e. RGR (∆, k) ≡ RGR (k). We find k by minimizing RGR (k), i.e. by solving equation ∂RGR (k) =0 ∂k

(34)

√ √ √ − 2 − 2 exp(∆ · 20.5+k ) + exp(∆ · 2−0.5+k )(2 2 + 2k ∆ ln 2) = 0

(35)

Using (26), equation (34) becomes

Solution of equation (35) is denoted with k ∗ and it is optimal value for k. But, since k must me integer and N1 must be dividable with 2k , then k is given with ª © k = max L | L ∈ N, L ≤ [k ∗ ], N1 is divisible by 2L

(36)

where [k ∗ ] is the nearest integer of k ∗ and N is set of positive integers. Since N1 and N2 do not appear in equation (35), and since ∆ is constant for all combinations (N1 , N2 ), k ∗ also will be the same for all combinations (N1 , N2 ). This means that it is not necessary to solve equation (35) for every (N1 , N2 ), but we should solve it just one and solution will be valid for all (N1 , N2 ). So, this method is very simple because we optimize ∆ for uniform and not for hybrid quantizer, which is easier and also it has already been done in literature [5]. Also, since ∆ and k ∗ are the same for all (N1 , N2 ), optimization of ∆ and k ∗ should be done only once, not for every (N1 , N2 ). Although this method is simple, it gives good results. For some (N1 , N2 ) which satisfy condition (32), SN R and RGR are given in Table 3. For all cases we obtain, using (36), that k = 4. We also give entropy H for the purpose of comparison. 13

N1 64 64 80 96 96 96 112 112 128 128 128 144 144 160 160 176 192 192 208 224 240

N2 64 128 64 32 64 128 32 64 32 64 128 32 64 16 32 32 32 64 32 16 16

N1 + N2 128 192 144 128 160 224 144 176 160 192 256 176 208 176 192 208 224 256 240 240 256

SN R 34.9239 35.9666 35.38905 34.54812 35.6612 35.99060 35.1604 35.8148 35.529 35.8997 35.99754 35.7407 35.94598 35.4373 35.8589 35.9238 35.95905 35.99188 35.97812 35.95053 35.97352

RGR 6.2313 6.3147 6.19898 6.15753 6.1816 6.20568 6.1539 6.1723 6.1603 6.1672 6.17420 6.1608 6.16455 6.1591 6.1611 6.1612 6.16133 6.16190 6.16137 6.16122 6.16131

H 6.0674 6.1507 6.09639 6.08797 6.1120 6.13605 6.1075 6.1204 6.1179 6.1249 6.13182 6.1236 6.12730 6.1246 6.1266 6.1282 6.12909 6.12967 6.12956 6.12965 6.12986

Table 3: Method 1 - Numerical results for different values of N1 and N2 Method 2. If SN R∗ is required value of SN R for some application, then we find ∆ by solving equation SN R(∆) = SN R∗

(37)

where SN R(∆) is given by (30). Then, we should change obtained value for ∆ in expression (26) for RGR (∆, k), and we should find k by minimizing RGR (k), as a solution of (35), and using (36). So, this method optimize ∆ to achieve required SN R and optimize k to achieve minimal Golomb-Rice bit-rate. With this method we have different ∆ and k ∗ for every combination (N1 , N2 )and therefore, for every (N1 , N2 ), we have to solve equations (36) and (34). In Table 4 we give numerical results for the case SN R∗ = 34dB. Method 3. The aim of this method is to maximize SN R(∆), i.e. to minimize distortion D(∆) for given values of N1 and N2 . Therefore, we find ∆ as solution of equation ∂D(∆) =0 (38) ∂∆ where D(∆) is given with (29). Then, obtained ∆ is changed in (26) and k is obtained by minimizing RGR (k), from equation (35) and using (36). Numerical results for some combinations (N1 , N2 ), which satisfy (32), are given in Table 5. Dependence of Golomb-Rice bit-rate RGR on step size ∆ for N1 = 128 and N2 = 64, and for different values of parameter k is given in Figure 5. Dependence of RGR on ∆ for other values of N1 and N2 is similar. For different ∆ we should use different values of k to achieve minimal RGR . We can see that RGR decreases with ∆. Dependence of SN R on ∆ for N1 = 128 and N2 = 32 is given in Figure 6. For other values of N1 and N2 , dependence is similar. Straight line represents constant SN R of 34dB. Point 1 corresponds to maximal SN R and that point is obtained using method 3. Point 2 is obtained 14

N1 64 80 96 96 112 128 144 144 160 176 192 192 224

N2 64 64 64 32 32 32 32 16 16 16 16 8 8

N1 + N2 128 144 160 128 144 160 176 160 176 192 208 200 232

S 4 5 6 6 7 8 9 9 10 11 12 12 14

∆ 0.0657705 0.0677593 0.0685295 0.0645888 0.067425 0.0684024 0.0688024 0.0675651 0.0684699 0.0688333 0.0689902 0.0685656 0.0690092

RGR 5.96113 5.89222 5.8647 5.92973 5.87448 5.85633 5.84903 5.87039 5.85446 5.84818 5.84549 5.85294 5.8452

H 5.8445 5.8170 5.8063 5.8769 5.8268 5.8101 5.8034 5.8283 5.8106 5.8036 5.8005 5.8093 5.8003

Table 4: Method 2 - Numerical results for SN R∗ = 34dB N1 96 128 128 160 160 160 176 192 192 192 192 224 224 224 240

N2 64 64 32 64 32 16 16 64 32 16 8 32 16 8 8

N1 + N2 160 192 160 224 192 176 192 256 224 208 200 256 240 232 248

k 5 5 4 5 5 4 4 5 5 4 4 5 5 4 4

S 3 4 8 5 5 10 11 6 6 12 12 7 7 14 15

∆ 0.0365904 0.0320399 0.0439347 0.0286087 0.0383501 0.0485834 0.0454709 0.0259227 0.0341697 0.0427772 0.0516284 0.0309071 0.0383376 0.0459628 0.0436151

SN R 37.1239 38.4988 36.1935 39.638 37.488 35.7191 36.3267 40.6108 38.5749 36.8857 35.4448 39.5124 37.8854 36.4902 36.9609

RGR 6.79471 6.94261 6.5427 7.09449 6.71436 6.35929 6.48134 7.24594 6.84889 6.6016 6.25837 6.98032 6.72019 6.46448 6.56594

H 6.6037 6.8227 6.4126 7.0037 6.6179 6.2944 6.3913 7.1581 6.7904 6.4806 6.2153 6.9394 6.6405 6.3836 6.4595

Table 5: Numerical results for Method 3

12

bit-rate

11

Golomb-Rice bit-rate

RGR

bit-rate 10

bit-rate

RGR RGR RGR

for for for

minimal bit-rate

9

k k k RGR =3 =4 =5

8

7

6

5

4 0.000

0.025

0.050

0.075

0.100

0.125

0.150

0.175

0.200

Figure 5: Dependence of Golomb-Rice bit-rate RGR on ∆, for different values of k 15

with method 2 for required SN R of 34dB. Method 2 gives SN R which is smaller than maximal SN R, but bigger ∆ is achieved which causes smaller Golomb-Rice bit-rate RGR . On the other side, method 3 gives maximal SN R but ∆ is smaller which causes higher RGR . So, if maximal SN R is necessary we should use method 3. But, if maximal SN R is not necessary, we should use method 2 which causes smaller Golomb-Rice bit-rate. We should say that using method 2 we can obtain two points: point 2 and point 3 in Figure 6. These two points have the same SN R but point 2 has bigger ∆ which causes smaller RGR . Therefore, between these two points we should always choose point 2. 38 point 1 (obtained with method 3):

37 36

=0.04393,

point 3: is not used

SNR

=36.1935, R

=6.5427

GR

point 2 (obtained with method 2):

35

=0.0684,

SNR

=34, R

=5.85633

GR

34 33

SNR

[dB]

32 31 30 29 28 27

SNR

26 25

( )

34dB

24 23 22 0.000

0.025

0.050

0.075

0.100

0.125

0.150

Figure 6: Dependence of SN R on ∆

5

Comparison of hybrid quantizer with uniform and nonuniform quantizer

In this section, we will compare hybrid quantizer with uniform and nonuniform quantizer. For all quantizers Golomb-Rice code is used. From Table 1 we can see that uniform quantizer with N = 256 levels has SN R = 35.14 dB and Golomb-Rice bit-rate RGR = 6.16284 bits/sample. From Table 2 we can see that nonuniform quantizer with N = 128 levels has SN R = 35.6121 dB and Golomb-Rice bit-rate RGR = 6.53125 bits/sample.

5.1

Case with the same SN R

For the purpose of comparison, we design hybrid quantizer which has the same SN R as above mentioned uniform and nonuniform quantizers, using method 2. Numerical results for hybrid quantizer with SN R = 35.14 dB are given in Table 6. We can see that hybrid quantizer can achieve the same SN R as uniform quantizer, but with smaller number of levels and with smaller Golomb-Rice bit-rate RGR . For example, for (N1 , N2 ) = (160, 32), we obtain for 0.138 bits/sample smaller Golomb-Rice bit-rate RGR than with uniform quantizer with N = 256 levels. Also, complexity is smaller because total number of levels is smaller for 25%. Numerical results for hybrid quantizer with SN R = 35.6121 dB are given in Table 7. We can see that hybrid quantizer has smaller Golomb-Rice bit-rate RGR than nonuniform quantizer, 16

N1 112 112 128 128 144 160 176 176 192 192 192 208 224 224 240 240

N2 64 32 64 32 32 32 32 16 32 16 8 16 16 8 16 8

N1 + N2 176 144 192 160 176 192 208 192 224 208 200 224 240 232 256 248

S 7 7 8 8 9 10 11 11 12 12 12 13 14 14 15 15

∆ 0.0599251 0.0551954 0.0602791 0.0585497 0.059678 0.0601668 0.0605937 0.0595768 0.0605068 0.0601272 0.0578708 0.0603782 0.0604985 0.060106 0.0605576 0.0603697

RGR 6.03947 6.15114 6.02689 6.06411 6.03685 6.02532 6.01998 6.03873 6.0174 6.02599 6.08071 6.02026 6.01753 6.02663 6.01619 6.02052

H 5.9984 6.1003 5.9927 6.0290 6.0060 5.9962 5.9917 6.0106 5.9895 5.9982 6.0527 5.9926 5.9899 5.9992 5.9886 5.9930

Table 6: Numerical results for hybrid quantizer for SN R = 35.14 dB for the same SN R. Also, hybrid quantizer has smaller complexity because number of levels N2 in nonuniform region of hybrid quantizer is much smaller than number of levels of nonuniform quantizer N = 128. For example, for (N1 , N2 ) = (160, 32) we obtain for 0.42 bits/sample smaller Golomb-Rice bit-rate RGR than with nonuniform quantizer with N = 128 levels. Complexity is approximately the same, because total number of levels is higher, but number of levels in nonuniform region N2 is much smaller. N1 80 96 112 128 128 144 160 160 176 176 192 208 208 224 224 240 240

N2 64 64 64 64 32 32 32 16 32 16 16 16 8 16 8 16 8

N1 + N2 144 160 176 192 160 176 192 176 208 192 208 224 216 240 232 256 248

S 5 6 7 8 8 9 10 10 11 11 12 13 13 14 14 15 15

∆ 0.0525661 0.0553064 0.0564003 0.0569054 0.0540579 0.0559395 0.0566993 0.0522972 0.0570532 0.0555894 0.0565676 0.0569944 0.055178 0.0571991 0.0564423 0.0573015 0.0569425

RGR 6.27007 6.16987 6.13009 6.11171 6.18433 6.13202 6.11181 6.2358 6.10256 6.14096 6.11498 6.10394 6.15292 6.0987 6.11857 6.0961 6.10542

H 6.1511 6.1021 6.0830 6.0743 6.1391 6.0973 6.0808 6.1926 6.0732 6.1054 6.0857 6.0755 6.1217 6.0706 6.0897 6.0682 6.0772

Table 7: Numerical results for hybrid quantizer for SN R = 35.6121 dB

5.2

Case with the same Golomb-Rice bit-rate RGR

Another way to compare hybrid quantizer with uniform and with nonuniform quantizer is design of hybrid quantizer witch has the same Golomb-Rice bit-rate RGR as uniform and 17

nonuniform quantizers. SN R for hybrid quantizers with RGR = 6.16284 bits/sample and RGR = 6.53125 bits/sample are given in Table 8. For combination (N1 , N2 ) = (160, 32) which was considered above, we obtain higher SN R for 0.73 dB than uniform and for 1.56 dB than nonuniform quantizer. For (N1 , N2 ) = (160, 64), which is slightly more complex, SN R gain is even higher : 0.83 dB in comparison with uniform and 2.06 dB in comparison with nonuniform quantizer. N1

N2

N1 + N2

112 128 128 144 144 160 160 176 176 176 192 192 192 208 208 224 224 224 240 240

64 64 32 64 32 64 32 64 32 16 64 32 16 32 16 32 16 8 16 8

176 192 160 208 176 224 192 240 208 192 256 224 208 240 224 256 240 232 256 248

SN R (for RGR = 6.16284) 35.774 35.885 35.544 35.393 35.747 35.971 35.866 35.988 35.931 35.700 35.995 35.966 35.839 35.989 35.915 35.996 35.958 35.808 35.981 35.900

SN R (for RGR = 6.53125) 37.127 37.394 36.193 37.563 36.777 37.668 37.171 37.734 37.423 36.312 37.776 37.583 36.858 37.684 37.222 37.743 37.456 36.454 37.604 36.952

Table 8: SN R for hybrid quantizer with the same RGR as uniform and nonuniform quantizer

6

Hybrid quantizer with dead-zone

In this section hybrid quantizer with dead-zone is described. It consists of three parts: 1. dead-zone of width δ in interval (−δ/2, δ/2); 2. uniform part in range (−x1 , −δ/2) ∪ (δ/2, x1 ), where x1 = δ/2 + N1 ∆/2,

(39)

and N1 is number of intervals in uniform part and ∆ is width of those intervals. 3. nonuniform part in interval (−∞, −x1 ) ∪ (x1 , +∞), with N2 levels and with generalized compression function given with (22), where x1 is given by (39). Total number of levels is N1 + N2 + 1. With m = 2k is denoted parameter of GolombRice code. To apply Golomb-Rice code, interval (−x1 , x1 ) is divided into S = N1 /m segments denoted with 0, 1, ..., S − 1. Segment 0 covers interval (− (δ/2 + m∆/2) , (δ/2 + m∆/2)) 18

and it consists of m + 1 levels (m uniform levels and dead-zone), which is presented in Figure 7. Segment j, j = 1, ..., S − 1 covers range (−δ/2 − (j + 1)m∆/2, −δ/2 − jm∆/2) ∪ (δ/2 + jm∆/2, δ/2 + (j + 1)m∆/2) and it consists of m uniform levels.

Figure 7: Segment 0 with dead-zone Probabilities of segments j = 0, ..., S − 1 and of nonuniform region, for Laplacian distribution, are: Z

δ/2+m∆/2

p(x)dx = 1 − e

P0 = 2 Z

√ − δ+m∆ 2

,

0 δ/2+(j+1)m∆/2

√ − δ+jm∆

p(x)dx = e

Pj = 2 δ/2+jm∆/2 Z +∞

Pnonunif = 2

p(x)dx = e



δ+N1 ∆ √ 2

2



−e

δ+(j+1)m∆ √ 2

,

j = 1, ..., S − 1,

(40)

.

x1

Levels in segment j, j = 1, ..., S − 1 are coded with codewords of length lj , given with (14), which form is 11...1 | {z } 0 xx...x | {z }, where xx...x | {z } is natural fixed-length code of the level inside j-th j

k

k

segment. Levels in nonuniform region are coded with codewords of length lnonunif given with (23), which form is 11...1 | {z } 0 xx...x | {z } , where xx...x | {z } is the natural fixed-length code. This is very S

d log2 N2 e

d log2 N2 e

similar with model described in section 3, depicted in figure 3. Only difference is coding of levels in segment 0, which consists of odd number of levels since it contains dead-zone. Therefore, natural fixed-length code is not optimal to code levels inside segment 0. Because of that, we use Huffman code for levels in segment 0. Probabilities of levels inside segment 0, for Laplacian distribution, are: Z P0dead−zone

=2 Z k P0 =

δ/2

p(x)dx = 1 − e

− √δ

2

0 δ/2+k∆

³ √ ´ 1 − δ+2k∆ √ 2 p(x)dx = e −1 + e 2∆ , 2 δ/2+(k−1)∆

(41) k = 1, ..., m/2.

Probabilities for negative levels inside segment 0 are the same as probabilities of appropriate positive levels. To apply Huffman code in segment 0, we should use conditional probabilities for levels in segment 0. Sum of those conditional probabilities is 1, and they can be obtained by normalization, i.e. by dividing probabilities given in (41) with probability of segment 0, P0 , given with (40). With l0 is denoted average length of Huffman codewords in segment 0. Average bit-rate is given with

19

RGR = l0 P0 +

S−1 X

lj Pj + lnonunif Pnonunif

[bits/sample]

(42)

j=1

Changing (40), (14) and (23) in (42), expression for average bit-rate becomes ³ √ i √ h √ ´ −(S−1)m∆/ 2 RGR = l0 1 − e−(δ+m∆)/ 2 + e−(δ+m∆)/ 2 k + 1 + 1−e1−e−m∆/√2 √

+e−(δ+N1 ∆)/

2

(dlog2 N2 e − k + 1)

[bits/sample]

(43)

By Dd , Du and Dn are denoted distortions in dead-zone, in uniform part and in nonuniform part, respectively. Values Dd and Du are calculated using the following expressions Z

δ/2

Dd = 2 Du = 2

x2 p(x)dx

0 N1 /2 Z δ/2+i∆ X i=1

(44) 2

(x − δ/2 − (i − 1)∆) p(x)dx

δ/2+(i−1)∆

Value Dn is calculated using (28), where x1 is given with (39). For Laplacian source, expressions (44) become ´ √ 1 − √δ ³ Dd = 1 − e 2 4 + 2 2δ + δ 2 4 2 ∆ ³ N1 ∆ ´ ∆ − δ+N √1 √ 2 e −1 + e 2 Du = 12 Total distortion is sum of those three distortions, i.e.: D = Dd + Du + Dn

(45)

(46)

Signal-to-noise ratio (SNR) is SN R[dB] = 10 log10 (1/D). We apply two methods to find parameters ∆ and δ. In method 1, ∆ and δ are optimized simultaneously, solving system of equations: ∂D = 0, ∂∆

∂D = 0. ∂δ

Obtained optimal values for ∆ and δ are given in Table 9 for different combinations (N1 , N2 ). SN R, optimal k, RGR and entropyH are also calculated in Table 9. Using method 1 we obtain that optimal δ is about 0.7∆. For some applications higher value for δ is needed. Therefore, in method 2, value δ = 2∆ is taken. Using this condition, we find optimal value for ∆ by solving ∂D = 0. Numerical values for method 2 are given in Table 10. ∂∆ Comparing Tables 9 and 10 we can conclude that changing of parameter δ slightly affects performances. Comparing Tables 9 and 5 (where performances for maximal SNR with and without dead-zone are given), we can conclude that influence of dead-zone on performances is negligible.

20

N1 96 128 128 160 160 160 176 192 192 192 192 224 224 224 240

N2 64 64 32 64 32 16 16 64 32 16 8 32 16 8 8

∆ 0.0365904 0.0320393 0.0439347 0.0286087 0.0383501 0.0485834 0.0454709 0.0259227 0.0341697 0.0427772 0.0516284 0.0309071 0.0383376 0.0459628 0.0436151

δ 0.0278506 0.0237734 0.0309994 0.0208512 0.0267072 0.0327397 0.0305276 0.0186418 0.023566 0.028625 0.0337903 0.0211549 0.025513 0.0299586 0.0283782

SN R 37.1809 38.5474 36.257 39.6806 37.5427 35.7861 36.3892 40.649 38.6231 36.9443 35.5139 39.5557 37.9376 36.5515 37.0189

k 5 5 4 5 5 4 4 5 5 4 4 5 5 4 4

RGR 6.8012 6.9490 6.5474 7.0998 6.7220 6.3683 6.4886 7.2501 6.8573 6.6072 6.2699 6.9876 6.7283 6.4729 6.5729

H 6.6135 6.8313 6.4243 7.0113 6.6282 6.3077 6.4038 7.1650 6.7997 6.4924 6.2298 6.9478 6.6511 6.3966 6.4718

Table 9: Numerical values for method 1

N1 96 128 128 160 160 160 176 192 192 192 192 224 224 224 240

N2 64 64 32 64 32 16 16 64 32 16 8 32 16 8 8

∆ 0.0343939 0.0304638 0.0416302 0.0274143 0.0366569 0.0463861 0.0435658 0.0249809 0.032865 0.0411072 0.0495984 0.0298663 0.0370194 0.0443705 0.0421884

SN R 36.8902 38.2663 35.8291 39.4117 37.1459 35.2521 35.8785 40.3925 38.2535 36.4546 34.9016 39.2096 37.4846 35.9895 36.4788

k 5 5 4 5 5 4 4 5 5 4 4 5 5 4 4

RGR 6.8200 6.9658 6.5692 7.1158 6.7177 6.3641 6.4850 7.2655 6.8538 6.6040 6.2484 6.9857 6.7128 6.4535 6.5543

H 6.6254 6.8400 6.4251 7.0178 6.6271 6.2949 6.3911 7.1697 6.7973 6.4797 6.2045 6.9446 6.6385 6.3730 6.4490

Table 10: Numerical values for method 2

21

7

Conclusion

In this paper a new model for compression was presented. This model consists of hybrid quantzer (combination of uniform and companding nonuniform quantizer) and Golomb-Rice coder on the output. Since nonuniform quantizer does not cover range around 0, we introduced new generalized optimal compression function. We first described hybrid model and gave expressions for bit-rate and SN R in closed form. After that we gave three methods for determination of its parameters. We compared hybrid quantizer with uniform and nonuniform quantizer in two ways: for the same SN R and for the same bit-rate. It was shown that hybrid quantizer provided performances improvement in comparison to only uniform quantizer (0.83 dB greater SN R for the same bit-rate or for 0.14 bits/sample smaller bit-rate for the same SN R) or only nonuniform quantizer (smaller bit-rate for 0.42 bits/sample for the same SN R or higher SN R for 2 dB for the same bit-rate). Hybrid quantizer allows great flexibility which means that we can choose different values for the number of levels in the uniform and nonuniform region, so we can find the combination which is the most appropriate for our purposes. Hybrid quantizer with dead-zone was also analyzed and optimization of dead-zone width was done. All mentioned above are the reasons why our hybrid model can be used in many applications for signals with Laplacian distribution.

References [1] Consultative Committee for Space Data Systems (CCSDS), Lossless Data Compression, Blue Book, Issue 1, 1997. [2] Elabdalla, A. R., Irshid, M.: An efficient bitwise Huffman coding technique based on source mapping, Computer and Electrical Engineering, 27, 2001, 265-272. [3] Fredriksson, K., Tarhio, J.: Efficient String Matching in Huffman Compressed Texts, Fundamenta Informaticae, 63(1), 2004, 1-16. [4] Hankerson, D., Harris, G. A., Johnson, P. D. Jr., Introduction to information theory and data compression, Second edition, CHAPMAN & HALL/CRC, 2004. [5] Jayant, N. S., Noll, P.: Digital Coding of Waveforms, Prentice-Hall, 1984. [6] Judell, N., Scharf, L.: A simple derivation of Lloyd’s classical result for the optimum scalar quantizer, IEEE Transactions on Information Theory, 32, 1986, 326-328. [7] Leon-Salas, D. W., Balkir, S., Sayood, K., Hoffman, W. M.: An Analog-to-Digital Converter with Golomb-Rice Output Codes, IEEE Transactions on Circuits and Systems-II: Express Briefs, 53, 2006, 278-282. [8] Liebchen, T., Reznik, Y.: MPEG-4 ALS: an Emerging Standard for Lossless Audio Coding, in: Proceeding of the Data Compression Conference (DCC), IEEE Computer Society, 2004, 439-448. [9] Malvar, H.: Adaptive Run-Length/Golomb-Rice Encoding of Quantized Generalized Gaussian Sources with Unknown Statistics, in: Proceeding of the Data Compression Conference (DCC), IEEE Computer Society, 2006, 23-32.

22

[10] Marcellin, W. M., Lepley, A. M., Bilgin, A., Flohr, J. T., Chinen, T. T., Kasner, H. J.: An overview of quantization in JPEG 2000, Signal Processing: Image Communication, 17, 2002, 7384. [11] Na, S.: On the Support of Fixed-Rate Minimum Mean-Squared Error Scalar Quantizers for Laplacian Source, IEEE Transactions on Information Theory, 50, 2004, 937-944. [12] Oger, M., Ragot, S., Antonini, M.: Model-based deadzone optimization for stack-run audio coding with uniform scalar quantization, in: Proceeding of ICASSP, Las Vegas, 2008, 4761-4764. [13] Peri´c, Z., Nikoli´c, J., Pokrajac, D.: Optimal designing scalar quantizers using a hybrid quantization method for the Laplacian source, in: Proceeding of the 4th WSEAS International Conference on Electromagnetics, Wireless and Optical Communications, 2006, 156-162. [14] Peri´c, Z., Nikoli´c, J., Pokrajac, D.: Hybrid Scalar Quantizer for the Laplacian Source, WSEAS Transactions on Communications, 6, 2007, 60-65. [15] Peri´c, Z., Petkovi´c, M., Dinci´c, M.: Simple Compression Algorithm for Memoryless Laplacian Source Based on the Optimal Companding Technique, Informatica, 20(1), 2009, 99-114. [16] Rice, R. F., Yeh, P. S., Miller, W. H.: Algorithms for high speed universal noiseless coding module, in: Proceeding of the AIAA Computing in Aerospace Conference, San Diego, 1993. [17] Salomon, D.: Variable-length Codes for Data Compression, Springer, 2007. [18] Sayood, K.: Introduction to Data Compression, Third edition, Elsevier Inc., 2006. [19] Tsai, P. C., Wang, S. J., Lin, C. H., Yeh, T. H.: Test Data Compression for Minimum Test Application Time, Journal of Information Science and Engineering, 23, 2007, 1901-1909. [20] Weinberger, M., Seroussi, G., Sapiro, G.: The LOCO-I lossless image compression algorithm: Principles and standardization into JPEG-LS, IEEE Trans. Image Processing, 9, August 2000, 1309-1324. [21] Zolghadr-E-Asli, A., Alipour, S.: An effective method for still image compression /decompression for transmission on PSTN lines based on modifications of Huffman coding, Computer and Electrical Engineering, 30, 2004, 129-145.

23

Suggest Documents