1.39k likes | 1.61k Views
Chapter 8. Multimedia and Quality of Service. Chapter 8: Outline. 8.1 COMPRESSION 8.2 MULTIMEDIA DATA 8.3 MULTIMEDIA IN THE INTERNET 8.4 REAL-TIME INTERACTIVE PROTOCOLS 8.5 QUALITY OF SERVICE. Chapter 8: Objective.
E N D
Chapter 8 Multimedia and Quality of Service .
Chapter 8: Outline 8.1 COMPRESSION 8.2 MULTIMEDIA DATA 8.3 MULTIMEDIA IN THE INTERNET 8.4 REAL-TIME INTERACTIVE PROTOCOLS 8.5 QUALITY OF SERVICE
Chapter 8: Objective • We discuss the general idea behind compression. Although compression is not directly related to the subject of multimedia, multimedia transmission is not possible without first compressing the data. • We discuss the elements of multimedia: text, image, video, and audio. We show how these elements are represented, encoded, and compressed using the techniques discussed in the first section. • We separate multimedia in the Internet into three categories: streaming stored audio/video, streaming live audio/video, and real-time interactive audio/video. We briefly describe the features and characteristics of each and give some examples.
Chapter 8: Objective (continued) • We concentrate on the real-time interactive category. We introduce two protocols that are used in this category for signaling: SIP and H.323. These protocols are used in voice over IP (Internet telephony) and can be used for signaling protocols in future applications. We also discuss transport-layer protocols used for multimedia applications. • We discuss quality of service (QoS), which is more needed for multimedia communication than for communication using only text.
8-1 COMPRESSION In this section, we discuss compression, which plays a crucial role in multimedia communication due to the large volume of data exchanged. In compression, we reduce the volume of data to be exchanged. We can divide compression into two broad categories: lossless and lossy compression. We briefly discuss the common methods used in each category.
8.1.1 Lossless Compression In lossless compression, the integrity of the data is preserved because the compression and decompression algorithms are exact inverses of each other: no part of the data is lost in the process. Lossless compression methods are normally used when we cannot afford to lose any data. For example, we must not lose data when we compress a text file or an application program. Lossless compression is also applied as the last step in some lossy compression procedures to further reduce the size of the data.
8.1.1 (continued) • Run-length Coding • Dictionary Coding • Encoding • Decoding • Huffman Coding • Huffman Tree • Coding Table • Encoding and Decoding
8.1.1 (continued) • Arithmetic Coding • Encoding • Decoding • Static versus Dynamic Arithmetic Coding
Figure 8.1 : A version of run-length coding to compress binary patterns
Example 8.1 Let us show an example of LZW encoding using a text message in which the alphabet is made of two characters: A and B (Figure 8.2). The figure shows how the text "BAABABBBAABBBBAA" is encoded as 1002163670. Note that the buffer PreS holds the string from the previous iteration before it is updated.
Example 8.2 Let us show how the code in Example 8.1 can be decoded and the original message recovered (Figure 8.3). The box called PreC holds the codeword from the previous iteration, which is not needed in the pseudocode, but needed here to better show the process. Note that in this example there is only the special case in which the codeword is not in the dictionary. The new entry for the dictionary needs to be made from the string and the first character in the string. The output is also the same as the new entry.
Example 8.3 For the sake of simplicity, let us assume that our set of symbols is S = {A, B, ∗}, in which the asterisk is the terminating symbol. We assign probability of occurrence for each symbol as Figure 8.7 shows how we find the interval and the code related to the short message "BBAB*".
Example 8.4 Figure 8.8 shows how we use the decoding process to decode the message in Example 8.3. Note that the hand shows the position of the number in the corresponding interval.
8.1.2 Lossy Compression Lossless compression has limits on the amount of compression. However, in some situations, we can sacrifice some accuracy to increase compression rate. Although we cannot afford to loose information in text compression, we can afford it when we are compressing images, video, and audio. For example, human vision cannot detect some small distortions that can result from lossy compression of an image. In this section, we discuss a few ideas behind lossy compression.
8.1.2 (continued) • Predictive Coding • Delta Modulation • Adaptive DM (ADM) • Differential PCM (DPCM) • Adaptive DPCM (ADPCM) • Linear Predictive Coding • Transform Coding • Discrete Cosine Transform (DCT)
Figure 8.10 : Reconstruction of quantization of xn − xn−1 versus xn − yn−1
Figure 8.13 : Formulas for one-dimensional forward and inverse transformation
Example 8.5 Figure 8.14 shows the transformation matrix for N = 4. As the figure shows, the first row has four equal values, but the other rows have alternate positive and negative values. When each row is multiplied by the source data matrix, we expect that the positive and negative values result in values close to zero if the source data items are close to each other. This is what we expect from the transformation: to show that only some values in the source data are important and most values are redundant.
Figure 8.16 : Formulas for forward and inverse two-dimensional DCT
8-2 MULTIMEDIA DATA Today, multimedia data consists of text, images, video, and audio, although the definition is changing to include futuristic media types.
8.2.1 Text The Internet stores a large amount of text that can be downloaded and used. One often refers to plaintext, as a linear form, and hypertext, as a nonlinear form, of textual data. Text stored in the Internet uses a character set, such as Unicode, to represent symbols in the underlying language.
8.2.2 Image In multimedia parlance, an image (or a still image as it is often called) is the representation of a photograph, a fax page, or a frame in a moving picture. • Digital Image • Image Compression: JPEG • Transformation • Quantization • Encoding • Image Compression: GIF
Example 8.6 The following shows the time required to transmit an image of 1280 × 720 pixels using the transmission rate of 100 kbps.
Example 8.7 To show the idea of JPEG compression, we use a block of gray image in which the bit depth for each pixel is 20. We have used a Java program to transform, quantize, and reorder the values in zigzag sequence; we have shown the encoding (Figure 8.20).
Example 8.8 As the second example, we have a block that changes gradually; there is no sharp change between the values of neighboring pixels. We still get a lot of zero values, as shown in Figure 8.21.
8.2.3 Video Video is composed of multiple frames; each frame is one image. This means that a video file requires a high transmission rate. • Digitizing Video • Video Compression: MPEG • Spatial Compression • Temporal Compression
Example 8.9 Let us show the transmission rate for some video standards: