Construction of Reversible Variable Length Code for ...

0 downloads 0 Views 340KB Size Report
synchronization between the encoder and decoder in the wireless video telephony. RVLCs are accepted as a substitute to Huffman codes in rising video coding ...
Neetu Yadav et. al. / International Journal of Engineering Science and Technology Vol. 2(10), 2010, 5332-5336

Construction of Reversible Variable Length Code for Digital Image Processing NEETU YADAV Department of Electronics and Communication Engineering, Rajasthan Technical University, Kota, India.

K.C. ROY SBCET, Benad Road, Jaipur, Rajasthan

YOGESH KRISHAN SBCET, Benad Road, Jaipur, Rajasthan Abstract— Many image and video coding standard, such as JPEG, H.261, H.263, MPEG-1, MPEG-2 use variable length code (VLC) as their entropy coding scheme. However, VLCs have a big disadvantage when transmitting over a noisy channel, thus error in transmission occurs. Reversible variable lengths codes (RVLCs) are not only prefix codes but also suffix codes. RVLCs are used in MPEG-4, JPEG-2000, H.263+, and H.263++. Reversible variable length codes have been used to augment the error elastic capabilities of VLC.In this paper we propose an algorithm for construction of reversible variable length codes with good error correcting properties. Keywords— Variable Length codes, Image Processing, Reversible Variable Length Codes

I. INTRODUCTION Reversible variable Length Codes (RVLCs) were proposed for facilitating the bidirectional decoding of a source-encoded bit stream, which moderate the visual effects of transmission errors in case of losing synchronization between the encoder and decoder in the wireless video telephony. RVLCs are accepted as a substitute to Huffman codes in rising video coding standards such as H.261+, H.263++ and MPEG-4 to develop the consequent error resilience capability. Traditionally variable length codes (VLCs) have been used as entropy coding in many image coding standards like JPEG and video coding standards like H.261, H.263, Mpeg-1 and MPEG-2. An example of VLC is the Huffman code, which is well known to give the optimal code with minimum redundancy. However, in recent years new standards uses RVLC, because VLCs have the problem of error propagation. Even one single bit error will cause many following code words to be misinterpreted. This is a big problem in error prone environment. RVLC are not only prefix free codes but also suffix free codes. A code is called prefix free codes if no codeword is a prefix of any other code words. Same as, a code is called a suffix free code if no code word is a suffix of any other code words. Therefore, RVLCs can be decoded both in forward and backward directions. So as to provide error resilient transmission over a noisy channel. RVLCs can also be applied to speed up the searching of encoded data, because by using RVLC we can begin by searching the encoded data in the forward and backward direction at the same time. This can drastically reduce the search time and this kind of searching is impossible when we are using VLCs.There are two types of RVLCs, symmetrical and asymmetrical. Symmetrical RVLCs share the same coding table when decoding in forward direction and decoding in backward direction, because the code is symmetrical. In case of asymmetrical RVLC codes, two types of coding tables are necessary separate for forward direction and backward direction. For this reason symmetrical RVLCs are simpler then asymmetrical RVLCs. The memory requirement of symmetrical RVLC is less then asymmetrical RVLC.However; asymmetrical RVLCs always provide better efficiency than symmetrical RVLC because a more supple code selection is allowed. In this paper we concentrate on designing of Reversible VLC with good error correcting properties. The remaining paper is organised as follows Section 2 give detail use of RVLC in recent video coding standard. Section 3 explains the detail of our proposed algorithm. Experimental result is discussed in Section 4 .The conclusion and future work is discussed in section 5. II. USE OF RVLC IN RECENT VIDEO CODING STANDARD Variable length codes are widely for data compression in much different application. However, as with other data compression techniques, variable length codes are prone to channel error. A single bit error in the encoded bit stream may guide to a large number of decoding error. Many researches have been proposed to make variable length codes more vigorous in the presence of channel error at the cost of increasing slightly the average code word length. Some authors suggested the use of RVL codes to facilitate the location of error in the

ISSN: 0975-5462

5332

Neetu Yadav et. al. / International Journal of Engineering Science and Technology Vol. 2(10), 2010, 5332-5336 encoded message. They have both the prefix and suffix properties and can be immediately decoded in both forward and backward direction. One of the error resilience tools in MPEG-4 uses RVL codes rather than Huffman or Arithmetic codes to limit the number of bits in a video frame which are corrupted. The decoding procedure for RVL codes are discussed as follows. The RVL codes encoded RLL values i.e. Run, Level and Last are decoded between two resynchronization markers in the forward direction .RLL is a representation of a segment which are composed of some zeros followed by a non-zero coefficient of DCT coefficient in the video compression methods using DCT transformation.

Figure 1: Decoding Sequence of RVLC Data

The run value represents the number of successive zeros in a segment; the level value represents the magnitude of the non-zero coefficient following the run of zeros; and the last is a flag (one bit) that indicates whether the current non-zero coefficient is the last non-zero coefficient in the block. In decoding procedure if an error is detected, forward decoding is stopped and the next resynchronization marker is found. The same data block is then decoded in the backward direction from the next resynchronization marker as shown in figure (1). If an error has occurred in the data block when forward decoding is performed, the error is detected to the right of the authentic position of the error. Whereas in the case of backward decoding the error is detected to the left of the actual position of the error’s actual position. The data between the two detected error positions is discarded; whereas the rest of the data is correctly decoded. In table 1, the average code length of symmetrical RVLC C14 is shorter than C12 and C13, where C11 is a list of Huffman code, C12 is a symmetrical RVLC by Takishima et al.’s algorithm and C13 is a symmetrical RVLC generated by Tsai and Wu’s algorithm. Table 1: Huffman code and RVLCs

Symbol Probability A 0.33 B 0.3 C 0.18 D 0.1 E 0.09 Average Code Length

C11 0 1 11 100 101

L11 2 2 2 3 3 2.19

C12 0 11 10 101 110

L12 2 2 3 3 4 2.46

C13 0 11 10 101 110

L13 2 2 3 3 4 2.46

C14 1 0 10 110 1110

L14 1 2 3 4 5 2.32

III. PROPOSED ALGORITHM FOR SYMMETRICAL RVLC

ISSN: 0975-5462

5333

Neetu Yadav et. al. / International Journal of Engineering Science and Technology Vol. 2(10), 2010, 5332-5336 A codeword C with n bits is represented as C 1C 2C 3...Cn . A set S of code words patterns is formed by the combination of suffixes of C , i.e. n

S   CiCi  1...Cn ………… (1) i2

The maximum suffix length i.e.

Ls of symmetrical C is the maximum length of symmetrical code words in S

Ls  max  Length  Sj  …………….. (2) SjS

Where length ( Sj ) denotes the codeword length of Sj , if Sj is a symmetrical codeword. Length ( Sj ) is set to be zero if Sj is asymmetrical codeword. Let Vrev (i ) is the bit length vector of symmetrical RVLC, V (i) is the bit length vector components, total number of available candidate codeword is avail (i ) ; the proposed symmetrical RVLC’s construction algorithm can be concise as follows. Step 1: The bit length vector of the objective symmetrical RVLC i.e. V rev (i) is initialized with the help of bit length vector component n (i) of the starting VLC. Step 2: The total number of available candidate code words of a full binary tree at level I are calculated, these are denoted as avail (i ) and the maximum symmetrical suffix length for each candidate codeword are also calculated, then arrange these code words based on the increasing order of MSSLs. If Vrev (i )  avail (i ) ………… (3) Then Vrev (i ) is not changed. Otherwise, the remaining  nrev (i )  avail (i )  codeword are added to

nrev (i  1) so as to assign a symmetrical

codeword for the next stage, i.e.

Vrev (i  1)  Vrev (i  1)  Vrev(i )  avail (i ) …….. (4) Vrev(i )  avail (i ) ………………. (5) Assign the candidate code words as target code words in a sequential manner. Step 3: Step 2 is repeated until every codeword has been assigned with a symmetrical equivalent.

IV. EXPERIMENTAL RESULT The above proposed algorithm has been tested on the English alphabet. Table II shows an RVL code constructed for the 26 symbol English source compared to ones derived by Takishima [7], Huffman and Tsai &Wu [9]. As can be pragmatic, the average codeword length of our code is smaller than that of the other two. Simulation results are presented in figure (2). The symbol error rate is evaluated in terms of Levenshtein distance [15], which is defined as the minimal number of insertions, deletions or substitutions that transform one sequence in the other. Error measure computed on the base of Levenshtein distance account for the self synchronizing properties of VLC. The signal to noise ration is scaled with regard to the energy per source symbol.

Figure 2: Graph Showing Simulation result

ISSN: 0975-5462

5334

Neetu Yadav et. al. / International Journal of Engineering Science and Technology Vol. 2(10), 2010, 5332-5336

Table 2: VLCs for the English Alphabet: Huffman Code, The symmetrical RVLCs from Takishima’s, Tsai’s and symmetrical RVLC constructed using the proposed algorithm Symbol Probability Huffman Code HC Takishima’s TAC Tsai’s TSC Proposed (HC) Length RVLC (TAC) RVLC(TSC) Algorithm (PA) Length Length E 0.148 001 3 000 3 000 3 010

3

T

0.093

110

3

111

3

111

3

101

3

A

0.088

0000

4

0110

4

0101

4

0110

4

O

0.072

0100

4

1001

4

1010

4

1001

4

R

0.069

0110

4

00100

5

00100

5

0000

4

N

0.065

1000

4

11011

5

01101

5

1111

4

H

0.058

1010

4

01010

5

00100

5

01110

5

I

0.056

1110

4

10101

5

11011

5

10001

5 5

S

0.055

0101

4

01110

5

01110

5

00100

D

0.044

00010

5

10001

5

11001

5

11011

5

L

0.041

10110

5

001100

6

10011

5

011110

6

U

0.028

10010

5

110011

6

001110

6

100001

6

P

0.026

11110

5

010010

6

010001

6

001100

6

F

0.025

01111

5

101101

6

001100

6

110011

6

M

0.024

10111

5

011110

6

011110

6

0111110

7

C

0.021

11111

5

100001

6

100001

6

0111110

7

W

0.019

000111

6

0010100

7

1001001

7

0010100

7

G

0.015

011100

6

1101011

7

0011100

7

1101011

7

Y

0.015

100110

6

0011100

7

1100011

7

0011100

7

B

0.013

011101

6

1100011

7

0111110

7

1100011

7

V

0.012

100111

6

0100010

7

1000001

7

0001000

7

K

0.009

0001100

7

1011101

7

00111100

8

1110111

7

X

0.002

00011011

8

00111100

8

11000011

8

01111110

8

J

0.0008

000110101

9

001010100

9

100101001

9

011111110

9

Q

0.0008

0001101001

10

0010110100

10

0011101001

10

0111111110

10

Z

0.0005

0001101000

10

1101001011

10

1001011100

10

1000000001

10

Average Length

4.1632

4.7052

4.6762

4.6162

V. CONCLUSIONS & FUTURE WORK We studied the design of reversible symmetrical reversible variable length codes with good error correcting properties. The major involvement of the proposed work is that we develop proper and efficient codeword selection policies in the codeword construction stage. The proposed algorithm is independent of bit alignment pattern of given Huffman code: only the bit length vector of the Huffman codes the needed parameter. Temporarily, based on the proposed algorithm, we have constructed a new asymmetrical RVLCs with better coding efficiency that the one can adopted in MPEG-4; because MPEG-4 encoded video was corrupted by transmitting the corresponding bit stream over an AWGN channel modes. The design of more proficient or most advantageous selection policies and the derivation of the interconnected formulas about the maximum code lengths of asymmetrical and symmetrical RVLCs will be included in our future work. The practical persuade of RVLCs on the coding efficiency and the effect of error handling mechanism on the quality of resulted image and video will be our research topics too REFERENCES [1] [2]

PA Length

A. S. Fraenkel and S. T. Klein, “Bidirectional Huffman coding,” The Computer J., vol. 33, no. 4, 1990. C.-W. Tsai and J.-L. Wu, “A modified symmetrical reversible variable length code and its theoretical bounds,” IEEE Trans. Inform. Theory.

ISSN: 0975-5462

5335

Neetu Yadav et. al. / International Journal of Engineering Science and Technology Vol. 2(10), 2010, 5332-5336 [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17]

C. W. Tsai and J. L. Wu, “On constructing the Huffman-code based reversible variable length codes,” IEEE Trans. Communication., vol. 49, pp. 1506–1509, Sept. 2001. J.Wen and J. Villasenor, “Utilizing soft information in decoding of variable length codes,” in Proc. IEEE Data Compression Conf., 1999, pp.131–139. J. Wen and J. D. Villasenor, “A class of reversible variable length codes For robust image and video coding,” in Proc. IEEE Int. Conf. Image Processing, vol. 2, 1997, pp. 65–68. J.Wen and J. Villasenor, “Utilizing soft information in decoding of variable length codes,” in Proc. IEEE Data Compression Conf., 1999, pp.131–139. R. Bauer and J. Hagenauer, “On variable length codes for iterative source/channel-decoding,” in Proc. IEEE Data Compression Conf., 2001, pp. 273–282. S. Kaiser and M. Bystrom, “Soft decoding of variable length codes,” in Proc. IEEE Int. Conf. Communication., 2000, pp. 1203–1207. S. Lin and D. Costello, Error Control Coding: Fundamentals and Applications. Englewood Cliffs, NJ: Prentice Hall, 1983. T. Okuda, E. Tanaka, and T. Kasai, “A method for the correction of garbledwords based on the Levenshtein metric,” IEEE Trans. Computation., vol.C-25, pp. 172–178, Feb. 1976. T. M. Cover and J. A. Thomas, Elements of Information Theory. New York: Wiley, 1991. V. B. Balakirsky, “Joint source-channel coding with variable length codes,” in Proc. IEEE Int. Symposium. Inform. Theory, 1997, p. 419. Y. Takishima, M. Wada, and H. Murakami, “Reversible variable length Codes,” IEEE Trans. Communication., vol. 43, pp. 158–162, 1995. Z V. Buttigieg and P. G. Farrell, “A maximum likelihood decoding algorithm for variable-length error-correcting codes,” in 5th Bangor Symposium. On Communications, Bangor, U.K., 1993, pp. 56–59. “Video Coding for Low Bit Rate Communication,” ITU-T Recommendation H.263, 1998. International Organization for Standardization, Final Draft International Standard, ISO/IEC 14 496-2, Oct. 1998. “Reversible variable length codes for efficient and robust image and video coding,” in Data Compression Conf., 1998, pp. 471–480.

ISSN: 0975-5462

5336

Suggest Documents