Golomb Coding Implementation in FPGA

Similar documents
TEST DATA COMPRESSION BASED ON GOLOMB CODING AND TWO-VALUE GOLOMB CODING

A Reconfigured Twisted Ring Counter Using Tristate Coding For Test Data Compression

Research Article Does an Arithmetic Coding Followed by Run-length Coding Enhance the Compression Ratio?

THREE DESCRIPTIONS OF SCALAR QUANTIZATION SYSTEM FOR EFFICIENT DATA TRANSMISSION

Data Encryption on FPGA using Huffman Coding

HARDWARE IMPLEMENTATION OF LOSSLESS LZMA DATA COMPRESSION ALGORITHM

IMAGE COMPRESSION TECHNIQUES

Efficient VLSI Huffman encoder implementation and its application in high rate serial data encoding

Test Data Compression Using Variable Prefix Run Length (VPRL) Code

Design and Implementation of a Data Compression Scheme: A Partial Matching Approach

FPGA Implementation of High Performance Entropy Encoder for H.264 Video CODEC

Lossless Compression Algorithms

How Effective are Compression Codes for Reducing Test Data Volume?

A Image Comparative Study using DCT, Fast Fourier, Wavelet Transforms and Huffman Algorithm

High-Performance VLSI Architecture of H.264/AVC CAVLD by Parallel Run_before Estimation Algorithm *

THE H.264 ADVANCED VIDEO COMPRESSION STANDARD

Comparison of EBCOT Technique Using HAAR Wavelet and Hadamard Transform

Analysis of Parallelization Effects on Textual Data Compression

IJSRD - International Journal for Scientific Research & Development Vol. 3, Issue 10, 2015 ISSN (online):

CHAPTER 3 METHODOLOGY. 3.1 Analysis of the Conventional High Speed 8-bits x 8-bits Wallace Tree Multiplier

A New Configuration of Adaptive Arithmetic Model for Video Coding with 3D SPIHT

Building Data Path for the Custom Instruction. Yong ZHU *

A COMPRESSION TECHNIQUES IN DIGITAL IMAGE PROCESSING - REVIEW

STUDY AND IMPLEMENTATION OF VIDEO COMPRESSION STANDARDS (H.264/AVC, DIRAC)

ITU-T T.851. ITU-T T.81 (JPEG-1)-based still-image coding using an alternative arithmetic coder SERIES T: TERMINALS FOR TELEMATIC SERVICES

Design of a High Speed CAVLC Encoder and Decoder with Parallel Data Path

EFFICIENT DEISGN OF LOW AREA BASED H.264 COMPRESSOR AND DECOMPRESSOR WITH H.264 INTEGER TRANSFORM

Design and Implementation of Lossless Data Compression Coprocessor using FPGA

Design and Implementation of FPGA- based Systolic Array for LZ Data Compression

ASIC Implementation and FPGA Validation of IMA ADPCM Encoder and Decoder Cores using Verilog HDL

Embedded Descendent-Only Zerotree Wavelet Coding for Image Compression

Multi-level Design Methodology using SystemC and VHDL for JPEG Encoder

ALMA TECHNOLOGIES VIDEO ENCODING & IMAGE COMPRESSION PRODUCTS CATALOG. Copyright 2012 ALMA TECHNOLOGIES S.A. All rights reserved.

CS 335 Graphics and Multimedia. Image Compression

RTL DESIGN OF EFFICIENT MODIFIED RUN- LENGTH ENCODING ARCHITECTURES USING VERILOG HDL

ENTROPY ENCODERS: HUFFMAN CODING AND ARITHMETIC CODING 1

Integrated Circuit ORB (ICO) White Paper V1.1

Data Compression Scheme of Dynamic Huffman Code for Different Languages

FPGA Implementation of Huffman Encoder and Decoder for High Performance Data Transmission

International Journal of Emerging Technology and Advanced Engineering Website: (ISSN , Volume 2, Issue 4, April 2012)

A Comparative Study of Lossless Compression Algorithm on Text Data

Context based optimal shape coding

Shri Vishnu Engineering College for Women, India

FPGA based High Performance CAVLC Implementation for H.264 Video Coding

Section III. Transport and Communication

Optimized architectures of CABAC codec for IA-32-, DSP- and FPGAbased

Highly Secure Invertible Data Embedding Scheme Using Histogram Shifting Method

Textual Data Compression Speedup by Parallelization

H.264/AVC BASED NEAR LOSSLESS INTRA CODEC USING LINE-BASED PREDICTION AND MODIFIED CABAC. Jung-Ah Choi, Jin Heo, and Yo-Sung Ho

An HEVC Fractional Interpolation Hardware Using Memory Based Constant Multiplication

Deduction and Logic Implementation of the Fractal Scan Algorithm

Multimedia Decoder Using the Nios II Processor

Advanced Video Coding: The new H.264 video compression standard

Multimedia Networking ECE 599

A Novel Image Compression Technique using Simple Arithmetic Addition

Cluster based Mixed Coding Schemes for Inverted File Index Compression

A New Compression Method Strictly for English Textual Data

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

Reversible Data Hiding VIA Optimal Code for Image

Motion Estimation. Original. enhancement layers. Motion Compensation. Baselayer. Scan-Specific Entropy Coding. Prediction Error.

IMAGE PROCESSING USING DISCRETE WAVELET TRANSFORM

Fast Decision of Block size, Prediction Mode and Intra Block for H.264 Intra Prediction EE Gaurav Hansda

Smart Bus Arbiter for QoS control in H.264 decoders

Video Coding Using Spatially Varying Transform

Federal University of Pelotas UFPel Group of Architectures and Integrated Circuits Pelotas Brasil

Stereo Image Compression

Wireless Communication

FRACTAL IMAGE COMPRESSION OF GRAYSCALE AND RGB IMAGES USING DCT WITH QUADTREE DECOMPOSITION AND HUFFMAN CODING. Moheb R. Girgis and Mohammed M.

A 4-way parallel CAVLC design for H.264/AVC 4 Kx2 K 60 fps encoder

FPGA IMPLEMENTATION OF BIT PLANE ENTROPY ENCODER FOR 3 D DWT BASED VIDEO COMPRESSION

QUANTIZER DESIGN FOR EXPLOITING COMMON INFORMATION IN LAYERED CODING. Mehdi Salehifar, Tejaswi Nanjundaswamy, and Kenneth Rose

Implementation and Analysis of Efficient Lossless Image Compression Algorithm

H.264 / AVC (Advanced Video Coding)

Test Data Compression Using a Hybrid of Bitmask Dictionary and 2 n Pattern Runlength Coding Methods

Viterbi Decoder Block Decoding - Trellis Termination and Tail Biting Authors: Bill Wilkie and Beth Cowie

New Approach for Affine Combination of A New Architecture of RISC cum CISC Processor

Optimal Alphabet Partitioning for Semi-Adaptive Coding

Low-Power Video Codec Design

Alphabet Partitioning Techniques for Semi-Adaptive Huffman Coding of Large Alphabets

A COMPARISON OF CABAC THROUGHPUT FOR HEVC/H.265 VS. AVC/H.264. Massachusetts Institute of Technology Texas Instruments

arxiv: v2 [cs.it] 15 Jan 2011

DATA HIDING IN PDF FILES AND APPLICATIONS BY IMPERCEIVABLE MODIFICATIONS OF PDF OBJECT PARAMETERS

Embedded Rate Scalable Wavelet-Based Image Coding Algorithm with RPSWS

Real-time and smooth scalable video streaming system with bitstream extractor intellectual property implementation

An Effective Neighborhood Initial-Playback Based Caching Scheme for Video on Demand over Mobile Ad Hoc Network

Optimizing run-length algorithm using octonary repetition tree

JBEAM: Coding Lines and Curves via Digital Beamlets

Modified SPIHT Image Coder For Wireless Communication

Matrix Manipulation Using High Computing Field Programmable Gate Arrays

A LOW-COMPLEXITY AND LOSSLESS REFERENCE FRAME ENCODER ALGORITHM FOR VIDEO CODING

A MULTI ALPHABET ARITHMETIC CODING HARDWARE IMPLEMENTATION FOR SMALL FPGA DEVICES

Lab 4: Register File and Memory 50 points Instructor: Yifeng Zhu Due: One week

Enhanced Hybrid Compound Image Compression Algorithm Combining Block and Layer-based Segmentation

Wavelet Based Image Compression Using ROI SPIHT Coding

Image Compression for Mobile Devices using Prediction and Direct Coding Approach

H.264 / AVC Context Adaptive Binary Arithmetic Coding (CABAC)

LOSSLESS DATA COMPRESSION AND DECOMPRESSION ALGORITHM AND ITS HARDWARE ARCHITECTURE

A Simple Lossless Compression Heuristic for Grey Scale Images

IMAGE PROCESSING (RRY025) LECTURE 13 IMAGE COMPRESSION - I

Performance Comparison between DWT-based and DCT-based Encoders

Transcription:

Faculty of Electrical Engineering Universiti Teknologi Malaysia VOL., NO. 2, 28, 36-4 ELEKTRIKA http://fke.utm.my/elektrika Golomb Coding Implementation in FPGA G. H. H ng, M. F. M. Salleh and Z. A. Halim School of Electrical and Electronic Engineering, Universiti Sains Malaysia, Seri Ampangan, 43 Nibong Tebal, Pulau Pinang, Malaysia. * Corresponding author: fadzlisalleh@eng.usm.my (M. F. M. Salleh), Tel: 64-599658, Fax: 64-59423 Abstract: Golomb coding for data compression is a well known technique due to its lower complexity. Thus, it has become one of the favourite choices for lossless data compression technique in many applications especially in mobile multimedia communication. In this paper, the development of Golomb Coding compression and decompression algorithms in the Field Programmable Gate Array (FPGA) is presented. The coding scheme development in FPGA utilises the Verilog HDL. In order to prove its validity, the developed algorithm is simulated using the ALTERA Quartus II software. Keywords: Field Programmable Gate Array (FPGA), golomb coding, lossless coding.. INTRODUCTION The rapid widespread growth of digital technologies such as digital television, internet access, video and video calls have increased the demand for high storage and transmission capacity in order to fit the growing needs []. This has called upon for the need of efficient data compression techniques, where the original data is compressed into a smaller data size. This process also reduces the transmission bandwidth needed for data transfer. There have been extensive research efforts in this field since the last 4 years. A review of those research activities can be found in [2]. Golomb coding [3] is one of the lossless data compression techniques. It is capable of compressing larger sized data into a smaller sized data while still allowing the original data to be reconstructed back after decompression. Besides, there is other high performance lossless compression algorithm such as arithmetic coding [4] etc. However, this algorithm involves higher design complexity and computational load. Another class of compression technique is lossy compression. In lossy data compression, the reconstructed data loses some of the information, results a lower quality data. Golomb coding has been used in the latest H.264 video standard [5] as part of its entropy coding. The hardware implementation of H.264 video codec baseline profile is presented in [6]. This includes the hardware implementation of the Exp-Golomb coding for its entropy coding. Other Golomb coding applications includes the use in system-on-chip (SoC) test-data compression system as presented in [7]. In [8] Jung and Chong also use Golomb coding for SoC test data compression, where the new algorithm developed can reduce the scan-in power and test data volume. In this paper, the development of Golomb coding algorithms for data compression and decompression and their implementation in Field Programmable Gate Array (FPGA) is presented. In order to have simplicity in development and testing, the Golomb coding parameter m is set to 4. The algorithm is developed using the ALTERA Quartus II software [9]. The remainder of the paper is organised as follows. Section 2 presents the details of Golomb Coding and the basic compression and decompression method. Section 3 presents the modified version of the Golomb coding compression and decompression methods in practical FPGA implementation. Section 4 presents the simulation results of the algorithms generated in order to prove their validity. Lastly, Section 5 concludes the paper. 2. BACKGROUND This section covers the details regarding Golomb Coding basic background information. In Golomb Coding, the group size, m, defines the code structure. Thus, choosing the m parameter decides variable length code structure which will have direct impact on the compression efficiency [3]. Once the parameter m is decided, a table which maps the runs of zeros until the code is ended with a one is created. Determination of the run length is shown as in Figure. A run length of multiples of m are grouped into A k and given the same prefix, which is (k ) number of ones followed by a zero. A tail is given for each members of the group, which is the binary representation of zero until (m ). The codeword is then produced by combining the prefix and the tail. An example of the table is in Figure 2. Data set Subset Runlength 6 3 5 2 Figure. Determination of run-length Using Figure 2, binary strings can be divided into subsets of binary strings and replacing the subsets with the equivalent codeword as shown in Figure 3. 36

G.H. H NG, M.F.M. SALLEH, Z.A. HALIM / ELEKTRIKA, (2), 28, 36-4 Group Run-length Group prefix Tail Codeword A 2 3 4 A2 5 6 7 8 A3 9 Figure 2. Golomb coding example with parameter m = 4 Data set Subset Encoded Figure 3. Golomb coding example with parameter m = 4 Begin Resettailcount Increase tail count False tail = 4? True Generate Generate Generate tail Figure 4. Golomb encoder algorithm (parameter m = 4) The Golomb encoder model can be described in the flow chart as shown in Figure 4. The tail count is controlled by the number of s in the input data. If s are read, then the tail count will be increased proportionally until it reaches the m parameter where a will be generated as its output data. If the input data is, the algorithm will generate a which acts as the divider between the prefix and the tail, and output the current tail count as the tail of the encoded string. The algorithm will then reset the tail count and waits for the next input data. The Golomb decoder model can be described in the flow chart as in Figure 5. The system will firstly detect the value of the prefix, if it is a, the system will generate 4 s and wait for the next value. If a is detected, the system will acknowledge that the end of prefix has been met and detects the value of the first tail bit. If the value of the first tail bit is, the system will generate another 2 s, otherwise, wait for the next tail bit. If the last tail bit is, another extra will be generated and followed by a which marks the end of a subgroup of the original data. The system will then return to the status of waiting for the next subgroup prefix data. Begin Generate 4 s Generate 2 s Generate Generate Figure 5. Golomb decoder algorithm (parameter m = 4) 3. FPGA IMPLEMENTATION The Golomb encoder algorithm shown in Figure 4 is not yet a complete design for hardware implementation. Few modifications must be made in order to allow the algorithm to function properly. The encoded binary data will not necessarily be in multiples of bytes, thus padding bits must be placed to make the encoded binary data to be in multiples of 8. Other than that, the previous design of the algorithm was made with the assumption of that the input data string will be terminated with a but however in reality, this will not always be the case because the input data string may also be terminated with a. In order to overcome this problem, the algorithm must be capable of detecting the end of data and if the last bit is a, then additional must be added in order to complete the encoding process. However this will also cause another problem of original data being modified due to the additional added, and the decoding process will not work properly, resulting in different set of data being reproduced after the decoding process. In order to solve this matter, header bytes will be added in the beginning of the encoded data which will give the information of the original file size, thus allowing the decoding process to be done correctly by terminating the decoding process after the data size of the original file size was during decoding process. The modified Golomb encoder algorithm is shown in Figure 6. 37

G.H. H NG, M.F.M. SALLEH, Z.A. HALIM / ELEKTRIKA, (2), 28, 36-4 Reset data = output = State 3 output = tail[] State Output = original file data = tail ++ if (tail = 4), output = State 2 Total encode bytes not State 5 Finish encode with extra if needed Pad byte with Total encode bytes Total encode bytes byte of the encoded data may be padded with s, thus will give wrong decoding output. However, this had been solved by introducing original file length header into the encoded data as in discussed previously. By knowing the original file size before encoding, the decoder will decode the encoded data until the encoded data reaches the original file size and terminate the decoding process. The modified Golomb decoder algorithm is as shown in Figure 7. Reset Original file size not State 3 State 4 If data =, output = 2 If data = State Read original file size State 2 Data = Output = 4 s End Original file size State 4 output = tail[] End Figure 6. Golomb encoder algorithm on FPGA with parameter m = 4 After the system has been reset, the system will move into State, generating the original file size as its output, and move into State 2 where the system will wait for input. If the system detects that the total encoded bytes is already, the system will proceed to State 5. If the data input is, the tail count will increase and return back to State 2. If the tail count reaches the value 4, the system will generate an output of. On the other hand, if the data input is, the system will generate an output of which is the separator between the prefix and the tail and move on to State 3. At State 3, the system will generate the first tail bit and continued by second tail bit at State 4. If the total encoded byte is met, the system will move to State 5, otherwise, back to State 2 where the system will wait for the next input data. At State 5, if the system detects that there is a need to finish the encode with an extra due to the input binary string did not terminate with a, then extra encoding will be done with the extra added and then pad the last byte of data with if the encoded data is not in bytes (multiples of 8). The system will then stop handling any process until a Reset signal is given. The Golomb decoder algorithm shown in Figure 5 is not yet a complete design for hardware implementation, like its Golomb Encoder algorithm counterpart. The last State 5 If data =, output = State 6 Output = Figure 7. Golomb decoder algorithm on FPGA with parameter m = 4 After the system reset, the system will move into State unconditionally where the system will retrieve the original file size from the encoded data and store it in memory before proceeding to State 2. State 2 will always check whether the total decoded data size has already met the target of the original file size or not. If the target is met, the process will terminate and the system will be idle until Reset signal is given. If the target is not met, the system will move to State 3 where the system will wait for incoming data. If the data received is a, the system will generate 4 s and return back to State 3. If a is received, the system will acknowledge that the marker between prefix and tail has already been met and proceed to tail decoding process. For the first tail bit at State 4, if the is received, the system will generate 2 s as the output and move to State 5 where the system will decode the second tail bit. If a is received, the system will generate as the output and move to State 6 where the system will generate a to mark the end of a subgroup. The system will then return back to State 2 to check whether the total decoded size has already the original file size or not and the process cycle continues. 38

G.H. H NG, M.F.M. SALLEH, Z.A. HALIM / ELEKTRIKA, (2), 28, 36-4 4. RESULTS In this section, the designed Golomb encoder and decoder algorithms implementation on FPGA are simulated and verified for their validity. Firstly, the implementation of Golomb encoder shown in Figure 6 was simulated using ALTERA Quartus II software with bytes sample data, x, x, x, xa, x5, x88, x, x, xab and x. The simulated result is shown in Figure 8. Extra four bytes of data size header were added. From the observation of the simulation diagram of Figure 8, input data signal of data_in will only be accepted by the system if data_in_enable signal is asserted HIGH. Data will only be accepted when the system is not busy, in other words, the signal busy is asserted LOW. This is to avoid the system from being flooded with data when the system is not ready for the next data. Output data signal of data_out is only valid when the data_out_enable signal is asserted as HIGH. The output data of data_out are colour marked in multiple of 8 bits for the ease of observation. The expected output is shown in Figure 9 and the expected output is compared with the simulated output. It is shown that the simulated conforms to expected output, thus showing the design is valid. Note that the last subset of the input is encoded with an extra to complete the encoding process and the last byte of the output in Figure 9 is padded with s as shown in Figure 8 where the last output byte is padded with extra five s to complete a byte. The output result generated by the Golomb encoder which are xed, xc, xa3, xe, xb8, x24, x87, x were than being used as the input of the Golomb decoder to determine whether the original test data will be managed to be obtained back after the decoding process. The simulated result is shown in Figure. The first four bytes of the input data is the original file size header bytes. From the observation of the simulation diagram of Figure, like the Golomb encoder algorithm, input data signal of data_in will only be accepted by the system if data_in_enable signal is asserted HIGH. Data will only be accepted when the system is not busy, in other words, the signal busy is asserted LOW. This is to avoid the system from being flooded with data when the system is not ready for the next data. Output data signal of data_out is only valid when the data_out_enable signal is asserted as HIGH. The output data of data_out are colour marked in multiple of 8 bits for the ease of observation. The simulation output of the Golomb Decoder shows that the system managed to regenerate the original data set using the encoded data. The data size regenerated matches the total size of the original data set of bytes as shown in Figure. 5. CONCLUSION Through simulation of the Golomb Coding, it can be concluded that the algorithm of Golomb Coding on FPGA had been successfully developed. This had been proven by comparing the results generated using simulation of the Golomb Encoder with the expected results which showed both of the results were identical. The use of encoded data as the input data for Golomb Decoder managed to generate back the original data proved that the Golomb Decoder System was also successfully developed. Hence, the whole system of Golomb Coding was completed. ACKNOWLEDGMENT The authors are grateful to the Universiti Sains Malaysia for funding this work via short term grant. REFERENCES [] M. Ghanbari, Video Coding an Introduction to Standard Codecs. London: The Institution of Electrical Engineering, UK, 23. [2] T. Sikora, Trends and perspectives in image and video coding, Proceedings of IEEE, vol. 93, no., pp. 6-7, Jan 25. [3] S. W. Golomb, Run Length Encodings, IEEE Transactions on Information Theory, vol. 2, pp. 399-4, 966. [4] I. H. Witten, R. M. Neal, and J. G. Cleary, "Arithmetic Coding for Data Compression" CACM Journal, vol. 3, no. 6, pp.52 54, June 987. [5] J. Ostermann, J. Bormans, et al, Video coding with H.264/AVC: Tools, Performance, and Complexity, IEEE Circuits and System Magazine, Vol. 4, No., pp. 7-28, First Quarter 24. [6] T. Silva, et. al., FPGA based design of CAVLC and Exp-Golomb coders for H.264/AVC baseline entropy coding, Proc 3rd IEEE Southern Conference on Programmable Logic, pp. 6-66, Feb 27. [7] A. Chandra and K. Chakrabarty, System on-a-chip test data compression and decompression architectures based on Golomb codes, IEEE Trans. Computer-Aided Design, vol. 2, pp.355-368, Mar. 2. [8] J. M. Jung, and J. W. Chong, Efficient test data compression and low power scan testing in SoCs, ETRI Journal, vol. 25, no. 5, pp. 32-327, Oct 23. [9] Quartus II development software literature, available at http://www.altera.com/literature/lit-qts.jsp. 39

G.H. H NG, M.F.M. SALLEH, Z.A. HALIM / ELEKTRIKA, (2), 28, 36-4 Figure 8. Simulated waveform of Golomb encoder Input Input Subset Expected Output () Output Figure 9. Expected output of simulation Figure. Simulation waveform of Golomb decoder 4