Lecture 5 Lossless Coding (II) Review

Total Page:16

File Type:pdf, Size:1020Kb

Lecture 5 Lossless Coding (II) Review Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Outline Lecture 5 Review Lossless Coding (II) Arithmetic Coding Dictionary Coding Run-Length Coding Lossless Image Coding May 20, 2009 Data Compression: Hall of Fame References 1 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Image and video encoding: A big picture Differential Coding Motion Estimation and Compensation A/D Conversion Context-Based Coding Color Space Conversion … Pre-Filtering Predictive Partitioning Coding Review … Input Image/Video Post- Pre- Lossy Lossless Processing Processing Coding Coding (Post-filtering) Quantization Entropy Coding Transform Coding Dictionary-Based Coding Model-Based Coding Run-Length Coding Encoded … … Image/Video 3 1 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding The ingredients of entropy coding FLC, VLC and V2FLC A random source (X, P) FLC = Fixed-length coding/code(s)/codeword(s) • Each symbol xi emitted from a random source (X, P) is encoded as an A statistical model (X, P’) as an estimation n-bit codeword, where |X|≤2n. of the random source VLC = Variable-length coding/code(s)/codeword(s) • Each symbol x emitted from a random source (X, P) is encoded as an An algorithm to optimize the coding i ni-bit codeword. performance (i.e., to minimize the average • FLC can be considered as a special case of VLC, where n1=…=n|X|. codeword length) V2FLC = Variable-to-fixed length coding/code(s)/codeword(s) • A symbol or a string of symbols is encoded as an n-bit codeword. • V2FLC can also be considered as a special case of VLC. At least one designer … 4 5 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Static coding vs. Dynamic/Adaptive coding A coding Static coding = The statistical model P’ is static, Shannon coding i.e., it does not change over time. Shannon-Fano coding Huffman coding Dynamic/Adaptive coding = The statistical model Arithmetic coding (Range coding) P’ is dynamically updated, i.e., it adapts itself to • Shannon-Fano-Elisa coding the context (i.e., changes over time). Universal coding • Exp-Golomb coding (H.264/MPEG-4 AVC, Dirac) • Dynamic/Adaptive coding ⊂ Context-based coding • Elias coding family , Levenshtein coding , … Hybrid coding = Static + Dynamic coding Non-universal coding • Truncated binary coding, unary coding, … • A codebook is maintained at the encoder side, and the • Golomb coding ⊃ Rice coding encoder dynamically chooses a code for a number of Tunstall coding ⊂ V2FLC David Salomon, Variable-length Codes symbols and inform the decoder about the choice. … for Data Compression, Springer, 2007 6 7 2 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shannon-Fano Code: An example Universal coding (code) X={A,B,C,D,E}, A code is called universal if L≤C1(H+C2) for all possible values of H, where C , C ≥1. P={0.35,0.2,0.19,0.13,0.13}, Y={0,1} 1 2 • You may see a different definition somewhere, but the basic idea remains the same – a universal code works like an optimal code, except there is a bound defined by a constant C . A Possible Code 1 0.35+0.2 0.19+0.13+0.13 A universal code is called asymptotically optimal if C →1 A, B C, D, E A 00 1 when H→∞. B 01 0.13+0.13 0.35 0.2 0.19 D, E C 10 A B C D 110 0.13 0.13 E 111 D E 8 9 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Coding positive/non-negative integers Golomb coding and rice coding Naive binary coding Golomb coding = Unary coding + Truncated • |X|=2k: k-bit binary representation of an integer. binary coding • An integer x is divided into two parts (quotient and Truncated binary coding remainder) according to a parameter M: q = x/M , b c • |X|=2k+b: X={0,1,…,2k+b-1} r=mod(x, M)=x-q*M. 0 0 0 k k k 2 b 1 b0 bk 1 2 b b0 bk 2 + b 1 1 1 ⇒ ··· − − ⇒ //////////////////////··· − − ⇒ ··· − ⇒ ··· • Golumb code = unary code of q + truncated binary k k+1 code of r. | {zUnary} code (Stone-age binary coding) | {z } • When M=1, Golomb coding = unary coding. • |X|=∞: X=Z+={1,2,…} • When M=2k, Golomb coding = Rice coding. f(x)=0 0 1or1 1 0 ··· ··· • Golomb code is the optimal code for the geometric x 1 x 1 − − distribution: Prob(x=i)=(1-p)i-1p, where 0<p<1. | {z } | {z } 10 11 3 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Exp-Golomb coding (Universal) Huffman code: An example Exp-Golomb coding ≠ Golomb coding X={1,2,3,4,5}, P=[0.4,0.2,0.2,0.1,0.1]. Exp-Golomb coding of order k=0 is used in p1+2+3+4+5=1 some video coding standards such as H.264. A Possible Code p =0.6 1 00 1+2 p3+4+5=0.4 The encoding process 2 01 • |X|=∞: X={0,1,2,…} 3 10 p =0.4 p =0.2 p =0.2 k 1 2 p =0.2 4+5 4 110 • Calculate q = x/ 2 +1 , and n q = log 2 q . 3 b c b c 5 111 • Exp-Golomb code = unary code of nq + nq LSBs of k k q + k-bit representation of r=mod(x,2 )=x-q*2 . p4=0.1 p5=0.1 12 13 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Huffman code: An optimal code Huffman code: Small X problem Relation between Huffman code and Shannon code: Problem H L L L <H+1 ≤ Huffman≤ Huffman-Fano≤ Shannon • When |X| is small, the coding performance is less A stronger result (Gallager, 1978) obvious. When p 0.5, L H+p <H+1 • max≥ Huffman≤ max • As a special case, when |X|=2, Huffman coding cannot When p <0.5, • max compress the data at all – no matter what the L ≤H+p +log (2(log e)/e)≈H+p +0.086<H+0.586 Huffman max 2 2 max probability is, each symbol has to be encoded as a Huffman’s rules of optimal codes imply that Huffman single bit. code is optimal. Solutions • When each pi is a negative power of 2, Huffman code reaches the entropy. • Solution 1: Work on Xn rather than X. • Solution 2: Dual tree coding = Huffman coding + Tunstall coding 14 15 4 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Huffman code: Variance problem Modified Huffman code Problem Problem • There are multiple choices of two smallest • If |X| is too large, the construction of the Huffman tree will be too long and the memory used for the tree will be too demanding. probabilities, if more than two nodes have the same probability during any step of the coding process. Solution • Divide X into two set X ={s |p(s )>2-v}, X ={s |p(s )≤2-v}. • Huffman codes with a larger variance may cause 1 i i 2 i i • Perform Huffman coding for the new set X =X ∪{X }. trouble for data transmissions via a CBR (constant bit 3 1 2 • Append f(X ) as the prefix of naive binary representation of all rate) channel – a larger buffer is needed. 2 symbols in X2. Solution • Shorter subtrees first. (A single node’s height is 0.) 16 17 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Huffman’s rules of making optimal codes Justify Huffman’s rules Source statistics: P=P0=[p1,…,pm], where p1≥…≥pm-1≥pm. Rule 1 If L >L , we can swap them to get a smaller average codeword Rule 1: L1≤…≤Lm-1=Lm. • i i+1 length (when Pi=Pi+1 it does not make sense, though). Rule 2: If L1≤…≤Lm-2<Lm-1=Lm, Lm-1 and Lm differs from • If Lm-1<Lm, then L1,…,Lm-1<Lm and the last bit of Lm is redundant. each other only for the last bit, i.e., f(xm-1)=b0 and Rule 2 f(xm)=b1, where b is a sequence of Lm-1 bits. • If they do not have the same parent node, then the last bits of both Rule 3: Each possible bit sequence of length Lm-1 must be codewords are redundant. either a codeword or the prefix of some codewords. Rule 3 Answers: Read Section 5.2.1 (pp. 122-123) of the following book – Yun Q. • If there is an unused bit sequence of length Lm-1, we can use it for Shi and Huifang Sun, Image and Video Compression for Multimedia Lm. Engineering, 2nd Edition, CRC Press, 2008 18 19 5 Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Shujun LI (李树钧): INF-10845-20091 Multimedia Coding Why do we need a new coding algorithm? Problems with Huffman coding • Each symbol in X is represented by at least one bit. • Coding for Xn: A Huffman tree with |X|n nodes needs to be constructed. The value of n cannot be too large. Arithmetic Coding • Encoding with a Huffman tree is quite easy, but decoding can be difficult especially when X is large.
Recommended publications
  • Source Coding: Part I of Fundamentals of Source and Video Coding
    Foundations and Trends R in sample Vol. 1, No 1 (2011) 1–217 c 2011 Thomas Wiegand and Heiko Schwarz DOI: xxxxxx Source Coding: Part I of Fundamentals of Source and Video Coding Thomas Wiegand1 and Heiko Schwarz2 1 Berlin Institute of Technology and Fraunhofer Institute for Telecommunica- tions — Heinrich Hertz Institute, Germany, [email protected] 2 Fraunhofer Institute for Telecommunications — Heinrich Hertz Institute, Germany, [email protected] Abstract Digital media technologies have become an integral part of the way we create, communicate, and consume information. At the core of these technologies are source coding methods that are described in this text. Based on the fundamentals of information and rate distortion theory, the most relevant techniques used in source coding algorithms are de- scribed: entropy coding, quantization as well as predictive and trans- form coding. The emphasis is put onto algorithms that are also used in video coding, which will be described in the other text of this two-part monograph. To our families Contents 1 Introduction 1 1.1 The Communication Problem 3 1.2 Scope and Overview of the Text 4 1.3 The Source Coding Principle 5 2 Random Processes 7 2.1 Probability 8 2.2 Random Variables 9 2.2.1 Continuous Random Variables 10 2.2.2 Discrete Random Variables 11 2.2.3 Expectation 13 2.3 Random Processes 14 2.3.1 Markov Processes 16 2.3.2 Gaussian Processes 18 2.3.3 Gauss-Markov Processes 18 2.4 Summary of Random Processes 19 i ii Contents 3 Lossless Source Coding 20 3.1 Classification
    [Show full text]
  • Error Correction Capacity of Unary Coding
    Error Correction Capacity of Unary Coding Pushpa Sree Potluri1 Abstract Unary coding has found applications in data compression, neural network training, and in explaining the production mechanism of birdsong. Unary coding is redundant; therefore it should have inherent error correction capacity. An expression for the error correction capability of unary coding for the correction of single errors has been derived in this paper. 1. Introduction The unary number system is the base-1 system. It is the simplest number system to represent natural numbers. The unary code of a number n is represented by n ones followed by a zero or by n zero bits followed by 1 bit [1]. Unary codes have found applications in data compression [2],[3], neural network training [4]-[11], and biology in the study of avian birdsong production [12]-14]. One can also claim that the additivity of physics is somewhat like the tallying of unary coding [15],[16]. Unary coding has also been seen as the precursor to the development of number systems [17]. Some representations of unary number system use n-1 ones followed by a zero or with the corresponding number of zeroes followed by a one. Here we use the mapping of the left column of Table 1. Table 1. An example of the unary code N Unary code Alternative code 0 0 0 1 10 01 2 110 001 3 1110 0001 4 11110 00001 5 111110 000001 6 1111110 0000001 7 11111110 00000001 8 111111110 000000001 9 1111111110 0000000001 10 11111111110 00000000001 The unary number system may also be seen as a space coding of numerical information where the location determines the value of the number.
    [Show full text]
  • Image Data Compression Introduction to Coding
    Image Data Compression Introduction to Coding © 2018-19 Alexey Pak, Lehrstuhl für Interaktive Echtzeitsysteme, Fakultät für Informatik, KIT 1 Review: data reduction steps (discretization / digitization) Continuous 2D siGnal Fully diGital siGnal (liGht intensity on sensor) gq (xa, yb,ti ) Discrete time siGnal (pixel voltaGe readinGs) g(xa, yb,ti ) g(x, y,t) Spatial discretization Temporal discretization and diGitization g(xa, yb,t) g(xa, yb,t) gq (xa, yb,t) Discrete value siGnal AnaloG siGnal Spatially discrete siGnal (e.G., # of electrons at each (liGht intensity at a pixel) (pixel-averaGed intensity) pixel of the CCD matrix) © 2018-19 Alexey Pak, Lehrstuhl für Interaktive Echtzeitsysteme, Fakultät für Informatik, KIT 2 Review: data reduction steps (discretization / digitization) Discretization of 1D continuous-time signals (sampling) • Important signal transformations: up- and down-sampling • Information-preserving down-sampling: rate determined based on signal bandwidth • Fourier space allows simple interpretation of the effects due to decimation and interpolation (techniques of up-/down-sampling) Scalar (one-dimensional) signal quantization of continuous-value signals • Quantizer types: uniform, simple non-uniform (with a dead zone, with a limited amplitude) • Advanced quantizers: PDF-optimized (Max-Lloyd algorithm), perception-optimized, SNR- optimized • Implementation: pre-processing with a compander function + simple quantization Vector (multi-dimensional) signal quantization • Terminology: quantization, reconstruction, codebook, distance metric, Voronoi regions, space partitioning • Relation to the general classification problem (from Machine Learning) • Linde-Buzo-Gray algorithm of constructing (sub-optimal) codebooks (aka k-means) © 2018-19 Alexey Pak, Lehrstuhl für Interaktive Echtzeitsysteme, Fakultät für Informatik, KIT 3 LGB vector quantization – 2D example [Linde, Buzo, Gray ‘80]: 1.
    [Show full text]
  • Soft Compression for Lossless Image Coding
    1 Soft Compression for Lossless Image Coding Gangtao Xin, and Pingyi Fan, Senior Member, IEEE Abstract—Soft compression is a lossless image compression method, which is committed to eliminating coding redundancy and spatial redundancy at the same time by adopting locations and shapes of codebook to encode an image from the perspective of information theory and statistical distribution. In this paper, we propose a new concept, compressible indicator function with regard to image, which gives a threshold about the average number of bits required to represent a location and can be used for revealing the performance of soft compression. We investigate and analyze soft compression for binary image, gray image and multi-component image by using specific algorithms and compressible indicator value. It is expected that the bandwidth and storage space needed when transmitting and storing the same kind of images can be greatly reduced by applying soft compression. Index Terms—Lossless image compression, information theory, statistical distributions, compressible indicator function, image set compression. F 1 INTRODUCTION HE purpose of image compression is to reduce the where H(X1;X2; :::; Xn) is the joint entropy of the symbol T number of bits required to represent an image as much series fXi; i = 1; 2; :::; ng. as possible under the condition that the fidelity of the It’s impossible to reach the entropy rate and everything reconstructed image to the original image is higher than a we can do is to make great efforts to get close to it. Soft com- required value. Image compression often includes two pro- pression [1] was recently proposed, which uses locations cesses, encoding and decoding.
    [Show full text]
  • Efficient Variable-To-Fixed Length Coding Algorithms for Text
    Efficient Variable-to-Fixed Length Coding Algorithms for Text Compression (テキスト圧縮に対する効率よい可変長-固定長符号化アルゴリズム) Satoshi Yoshida February, 2014 Abstract Data compression is a technique for reducing the storage space and the cost of trans- ferring a large amount of data, using redundancy hidden in the data. We focus on lossless compression for text data, that is, text compression, in this thesis. To reuse a huge amount of data stored in secondary storage, I/O speeds are bottlenecks. Such a communication-speed problem can be relieved if we transfer only compressed data through the communication channel and furthermore can perform every necessary pro- cesses, such as string search, on the compressed data itself without decompression. Therefore, a new criterion \ease of processing the compressed data" is required in the field of data compression. Development of compression algorithms is currently in the mainstream of data compression field but many of them are not adequate for that criterion. The algorithms employing variable length codewords succeeded to achieve an extremely good compression ratio, but the boundaries between codewords are not obvious without a special processing. Such an \unclear boundary problem" prevents us from direct accessing to the compressed data. On the contrary, Variable-to-Fixed-length coding, which is referred to as VF coding, is promising for our demand. VF coding is a coding scheme that segments an input text into a consecutive sequence of substrings (called phrases) and then assigns a fixed length codeword to each substring. Boundaries between codewords of VF coding are obvious because all of them have the same length. Therefore, we can realize \accessible data compression" by VF coding.
    [Show full text]
  • Generalized Golomb Codes and Adaptive Coding of Wavelet-Transformed Image Subbands
    IPN Progress Report 42-154 August 15, 2003 Generalized Golomb Codes and Adaptive Coding of Wavelet-Transformed Image Subbands A. Kiely1 and M. Klimesh1 We describe a class of prefix-free codes for the nonnegative integers. We apply a family of codes in this class to the problem of runlength coding, specifically as part of an adaptive algorithm for compressing quantized subbands of wavelet- transformed images. On test images, our adaptive coding algorithm is shown to give compression effectiveness comparable to the best performance achievable by an alternate algorithm that has been previously implemented. I. Generalized Golomb Codes A. Introduction Suppose we wish to use a variable-length binary code to encode integers that can take on any non- negative value. This problem arises, for example, in runlength coding—encoding the lengths of runs of a dominant output symbol from a discrete source. Encoding cannot be accomplished by simply looking up codewords from a table because the table would be infinite, and Huffman’s algorithm could not be used to construct the code anyway. Thus, one would like to use a simply described code that can be easily encoded and decoded. Although in practice there is generally a limit to the size of the integers that need to be encoded, a simple code for the nonnegative integers is often still the best choice. We now describe a class of variable-length binary codes for the nonnegative integers that contains several useful families of codes. Each code in this class is completely specified by an index function f from the nonnegative integers onto the nonnegative integers.
    [Show full text]
  • The Pillars of Lossless Compression Algorithms a Road Map and Genealogy Tree
    International Journal of Applied Engineering Research ISSN 0973-4562 Volume 13, Number 6 (2018) pp. 3296-3414 © Research India Publications. http://www.ripublication.com The Pillars of Lossless Compression Algorithms a Road Map and Genealogy Tree Evon Abu-Taieh, PhD Information System Technology Faculty, The University of Jordan, Aqaba, Jordan. Abstract tree is presented in the last section of the paper after presenting the 12 main compression algorithms each with a practical This paper presents the pillars of lossless compression example. algorithms, methods and techniques. The paper counted more than 40 compression algorithms. Although each algorithm is The paper first introduces Shannon–Fano code showing its an independent in its own right, still; these algorithms relation to Shannon (1948), Huffman coding (1952), FANO interrelate genealogically and chronologically. The paper then (1949), Run Length Encoding (1967), Peter's Version (1963), presents the genealogy tree suggested by researcher. The tree Enumerative Coding (1973), LIFO (1976), FiFO Pasco (1976), shows the interrelationships between the 40 algorithms. Also, Stream (1979), P-Based FIFO (1981). Two examples are to be the tree showed the chronological order the algorithms came to presented one for Shannon-Fano Code and the other is for life. The time relation shows the cooperation among the Arithmetic Coding. Next, Huffman code is to be presented scientific society and how the amended each other's work. The with simulation example and algorithm. The third is Lempel- paper presents the 12 pillars researched in this paper, and a Ziv-Welch (LZW) Algorithm which hatched more than 24 comparison table is to be developed.
    [Show full text]
  • New Approaches to Fine-Grain Scalable Audio Coding
    New Approaches to Fine-Grain Scalable Audio Coding Mahmood Movassagh Department of Electrical & Computer Engineering McGill University Montreal, Canada December 2015 Research Thesis submitted to McGill University in partial fulfillment of the requirements for the degree of PhD. c 2015 Mahmood Movassagh In memory of my mother whom I lost in the last year of my PhD studies To my father who has been the greatest support for my studies in my life Abstract Bit-rate scalability has been a useful feature in the multimedia communications. Without the need to re-encode the original signal, it allows for improving/decreasing the quality of a signal as more/less of a total bit stream becomes available. Using scalable coding, there is no need to store multiple versions of a signal encoded at different bit-rates. Scalable coding can also be used to provide users with different quality streaming when they have different constraints or when there is a varying channel; i.e., the receivers with lower channel capacities will be able to receive signals at lower bit-rates. It is especially useful in the client- server applications where the network nodes are able to drop some enhancement layer bits to satisfy link capacity constraints. In this dissertation, we provide three contributions to practical scalable audio coding systems. Our first contribution is the scalable audio coding using watermarking. The proposed scheme uses watermarking to embed some of the information of each layer into the previous layer. This approach leads to a saving in bitrate, so that it outperforms (in terms of rate-distortion) the common scalable audio coding based on the reconstruction error quantization (REQ) as used in MPEG-4 audio.
    [Show full text]
  • The Deep Learning Solutions on Lossless Compression Methods for Alleviating Data Load on Iot Nodes in Smart Cities
    sensors Article The Deep Learning Solutions on Lossless Compression Methods for Alleviating Data Load on IoT Nodes in Smart Cities Ammar Nasif *, Zulaiha Ali Othman and Nor Samsiah Sani Center for Artificial Intelligence Technology (CAIT), Faculty of Information Science & Technology, University Kebangsaan Malaysia, Bangi 43600, Malaysia; [email protected] (Z.A.O.); [email protected] (N.S.S.) * Correspondence: [email protected] Abstract: Networking is crucial for smart city projects nowadays, as it offers an environment where people and things are connected. This paper presents a chronology of factors on the development of smart cities, including IoT technologies as network infrastructure. Increasing IoT nodes leads to increasing data flow, which is a potential source of failure for IoT networks. The biggest challenge of IoT networks is that the IoT may have insufficient memory to handle all transaction data within the IoT network. We aim in this paper to propose a potential compression method for reducing IoT network data traffic. Therefore, we investigate various lossless compression algorithms, such as entropy or dictionary-based algorithms, and general compression methods to determine which algorithm or method adheres to the IoT specifications. Furthermore, this study conducts compression experiments using entropy (Huffman, Adaptive Huffman) and Dictionary (LZ77, LZ78) as well as five different types of datasets of the IoT data traffic. Though the above algorithms can alleviate the IoT data traffic, adaptive Huffman gave the best compression algorithm. Therefore, in this paper, Citation: Nasif, A.; Othman, Z.A.; we aim to propose a conceptual compression method for IoT data traffic by improving an adaptive Sani, N.S.
    [Show full text]
  • Critical Assessment of Advanced Coding Standards for Lossless Audio Compression
    TONNY HIDAYAT et al: A CRITICAL ASSESSMENT OF ADVANCED CODING STANDARDS FOR LOSSLESS .. A Critical Assessment of Advanced Coding Standards for Lossless Audio Compression Tonny Hidayat Mohd Hafiz Zakaria, Ahmad Naim Che Pee Department of Information Technology Faculty of Information and Communication Technology Universitas Amikom Yogyakarta Universiti Teknikal Malaysia Melaka Yogyakarta, Indonesia Melaka, Malaysia [email protected] [email protected], [email protected] Abstract - Image data, text, video, and audio data all require compression for storage issues and real-time access via computer networks. Audio data cannot use compression technique for generic data. The use of algorithms leads to poor sound quality, small compression ratios and algorithms are not designed for real-time access. Lossless audio compression has achieved observation as a research topic and business field of the importance of the need to store data with excellent condition and larger storage charges. This article will discuss and analyze the various lossless and standardized audio coding algorithms that concern about LPC definitely due to its reputation and resistance to compression that is audio. However, another expectation plans are likewise broke down for relative materials. Comprehension of LPC improvements, for example, LSP deterioration procedures is additionally examined in this paper. Keywords - component; Audio; Lossless; Compression; coding. I. INTRODUCTION Compression is to shrink / compress the size. Data compression is a technique to minimize the data so that files can be obtained with a size smaller than the original file size. Compression is needed to minimize the data storage (because the data size is smaller than the original), accelerate information transmission, and limit bandwidth prerequisites.
    [Show full text]
  • Answers to Exercises
    Answers to Exercises A bird does not sing because he has an answer, he sings because he has a song. —Chinese Proverb Intro.1: abstemious, abstentious, adventitious, annelidous, arsenious, arterious, face- tious, sacrilegious. Intro.2: When a software house has a popular product they tend to come up with new versions. A user can update an old version to a new one, and the update usually comes as a compressed file on a floppy disk. Over time the updates get bigger and, at a certain point, an update may not fit on a single floppy. This is why good compression is important in the case of software updates. The time it takes to compress and decompress the update is unimportant since these operations are typically done just once. Recently, software makers have taken to providing updates over the Internet, but even in such cases it is important to have small files because of the download times involved. 1.1: (1) ask a question, (2) absolutely necessary, (3) advance warning, (4) boiling hot, (5) climb up, (6) close scrutiny, (7) exactly the same, (8) free gift, (9) hot water heater, (10) my personal opinion, (11) newborn baby, (12) postponed until later, (13) unexpected surprise, (14) unsolved mysteries. 1.2: A reasonable way to use them is to code the five most-common strings in the text. Because irreversible text compression is a special-purpose method, the user may know what strings are common in any particular text to be compressed. The user may specify five such strings to the encoder, and they should also be written at the start of the output stream, for the decoder’s use.
    [Show full text]
  • Lec 05 Arithmetic Coding
    ECE 5578 Multimedia Communication Lec 05 Arithmetic Coding Zhu Li Dept of CSEE, UMKC web: http://l.web.umkc.edu/lizhu phone: x2346 Z. Li, Multimedia Communciation, 2018 p.1 Outline Lecture 04 ReCap Arithmetic Coding About Homework-1 and Lab Z. Li, Multimedia Communciation, 2018 p.2 JPEG Coding Block (8x8 pel) based coding DCT transform to find sparse * representation Quantization reflects human visual system Zig-Zag scan to convert 2D to 1D string Run-Level pairs to have even more = compact representation Hoffman Coding on Level Category Quant Table: Fixed on the Level with in the category Z. Li, Multimedia Communciation, 2018 p.3 Coding of AC Coefficients Zigzag scanning: Example 8 24 -2 0 0 0 0 0 -31 -4 6 -1 0 0 0 0 0 -12 -1 2 0 0 0 0 0 0 -2 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Example: zigzag scanning result 24 -31 0 -4 -2 0 6 -12 0 0 0 -1 -1 0 0 0 2 -2 0 0 0 0 0 -1 EOB (Run, level) representation: (0, 24), (0, -31), (1, -4), (0, -2), (1, 6), (0, -12), (3, -1), (0, -1), (3, 2), (0, -2), (5, -1), EOB Z. Li, Multimedia Communciation, 2018 p.4 Coding of AC Coefficients Run / Base Run / Base … Run / Base codeword Catg. codeword Catg. Codeword Cat. EOB 1010 - - … ZRL 1111 1111 001 0/1 00 1/1 1100 … 15/1 1111 1111 1111 0101 0/2 01 1/2 11011 … 15/2 1111 1111 1111 0110 0/3 100 1/3 1111001 … 15/3 1111 1111 1111 0111 0/4 1011 1/4 111110110 … 15/4 1111 1111 1111 1000 0/5 11010 1/5 11111110110 … 15/5 1111 1111 1111 1001 … … … … … … … ZRL: represent 16 zeros when number of zeros exceeds 15.
    [Show full text]