1 King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Information and Computer Science Department SWE 423: Multimedia Systems Fall 2006-2007 Final Exam, Tuesday January 23rd, 2007. Name: Possible Answers ID#: Instructions: 1. This exam consists of 9 pages, including this page, containing 4 questions. 2. You have to answer all 4 questions. 3. The exam is closed book and closed notes. Simple scientific calculators are allowed. Make sure you turn off your mobile phones and keep them on silent in your pockets. 4. The questions are not equally weighed. 5. The maximum number of points for this exam is 100. 6. You have exactly 120 minutes to finish the exam. 7. Make sure your answers are readable. 8. If there is no space on the front of the page, feel free to use the back of the page. Make sure you indicate this in order for me not to miss grading it. Question Number Maximum Points I 25 II 30 III 25 IV 20 Total 100 Points 2 Question I (25 points): Arithmetic Coding Consider the following alphabet = {a , b , c}, which is used to send 4-character messages. The probability of ‘a’ is 0.5 whereas the probability of ‘b’ and ‘c’ is 0.25 each. 1. (20 points) Use arithmetic coding to compress the message “baca” by finding the half open interval corresponding to the message. 2. (5 points) “The encoded representation of a message, in which arithmetic coding has been used, is not unique.” a. (3 points) Explain why the above statement is true? b. (2 points) Since that is the case, what should we look for in choosing between the many available encodings of a message? 1. Symbol 12 + 5 points b a c a Symbol a b c Interval [0.00 , 0.50) [0.50 , 0.75) [0.75 , 1.00) Low 0 0.5 0.5 0.59375 0.59375 High 1 0.75 0.625 0.625 0.609375 3 points Range 1 0.25 0.125 0.03125 2. a. Because one can use any fractional binary representation corresponding to any real number that belongs to the resulting half-open interval b. We should look for a real number that has a corresponding fractional binary representation with the least length (# of bits) 3 Question II (30 points): Predictive Coding With regard to predictive coding: 1. (7 points) Clearly explain how one can achieve compression using predictive coding. 2. (16 points) Consider the following predictor 1 fˆn f n 1 f n 2 2 e f fˆ n n n a. (10 points) Show exactly how to code the following sequence: 15 , 17 , 16 , 15 , 14 , 13 , 11 , 10 b. (6 points) With regard to your answer of part “a”, which sequence would yield better compression, the original sequence or the resulting predictive-coded sequence? Justify your answer. 3. (7 points) Explain clearly how lossy predictive coding is carried out, as opposed to lossless predictive coding. 1. Using predictive coding, the probability of certain values appearing becomes much higher than the original values. This is because most “differences” values lie in a much smaller range that that of the original values. This means that the entropy of the predictive coded values will be less than that of the original values. Hence, compression can be achieved. 2. a. n fn f^n en -1 15 0 1 15 15 15 0 2 17 15 2 3 16 16 0 4 15 16 -1 5 14 15 -1 6 13 14 -1 7 11 13 -2 8 10 12 -2 The above sequence is coded as follows: 15 , 2 , 0 , -1 , -1 , -1 , -1 , -2 , -2 b. The resulting predictive sequence. The reason is that the entropy of the predictive coded sequence is much less (-1 is repeated 4 times and -2 is repeated twice, whereas in the original sequence, one value (15) is repeated twice and the rest are unique. 3. In lossy predictive coding, error is quantized. Hence, when decoding the values, we may not get the original values and therefore the encoding is lossy. 4 Question III (25 points): JPEG, H.26x 1. (7 points) JPEG employs more than one type of coding for the coding and compression of images. Substantiate this claim through describing the steps involved in one specific JPEG mode for encoding images. 2. (18 points) The H.26x family of video codecs provides various encoding schemes for video data. a. (10 points) Describe inter-frame coding and intra-frame coding. b. (8 points) Assume having two video clips: The first one is from an action movie that contains a lot of action (e.g. accidents and explosions). The second video clip is from the evening news where an anchor person appears in the middle of the screen reading the news. i. (4 points) Which coding (inter-frame or intra-frame) would you choose for the action-movie video clip? Briefly justify your answer. ii. (4 points) Which coding (inter-frame or intra-frame) would you choose for the anchor-news video clip? Briefly justify your answer. 1. Lossy sequential DCT-based mode: a. Image Preparation: pixel values are standardized and the image is divided into blocks of 8x8 pixels b. Forward DCT-based Transformation takes place c. Quantization of all DCT Coefficients d. Huffman Coding Expanded lossy DCT-based mode e. Image Preparation: pixel values are standardized and the image is divided into blocks of 8x8 pixels f. Forward DCT-based Transformation takes place g. Quantization of all DCT Coefficients h. Arithmetic Coding 2. a. Intra-frame coding: Only considers data from the frame being coded. Each block of 8x8 pixels is transformed into 64 coefficients using DCT. Entropy encoding using variable-length code words is then performed. Inter-frame coding: Considers data from other frames. A prediction method is used to find the most similar macro block in the preceding frame. The motion vector is processed and entropy encoded using variable-length code words. b. i. Intra-frame coding. In action clips, blocks change drastically from frame to frame, making inter-frame coding not that effective. ii. Inter-frame coding. In news clips, there is not much motion, rendering inter-frame coding very effective. 5 Question IV (20 points): MPEG Choose the most suitable/correct answer for each statement below: 1. With regard to video coding techniques a. JPEG borrowed some of its techniques from MPEG-1 b. MPEG-1 borrowed some of its techniques from H.263 c. H.261 borrowed some of its techniques from MPEG-1 d. MPEG-1 borrowed some of its techniques from H.261 and JPEG 2. The MPEG-1 standard gives specification of a. video coding only b. audio coding only c. video coding, audio coding, and system definition d. video coding, audio coding, and animation coding. 3. The following type of frames are supported by MPEG-1 to provide fast-forward functionality a. B-frames b. D-frames c. I-frames d. P-frames 4. The following type of frames attain the highest compression ratio in MPEG-1 a. B-frames b. D-frames c. I-frames d. P-frames 5. The following type of frames is an anchor for supporting random access and is coded without using information about other frames a. B-frames b. D-frames c. I-frames d. P-frames 6. Among the main features of MPEG-2 over MPEG-1 is a. the introduction of MP3 audio b. support of very-low resolution video c. model-based image coding of human interaction with multimedia environments d. provision of scalable profile in which video is compressed at different qualities during coding 7. Among the main objectives of MPEG-4 is to provide a. the ability to revise content and support for random access to audio and video scenes b. a meta data standard to supplement content coded in other formats c. automatic content analysis and search capabilities d. video phone and video conferencing systems based on ISDN connections. 6 8. In MPEG-7 standard, a. the description format is fixed and the feature extraction methodologies are fixed b. the description format is fixed and the feature extraction methodologies are left unspecified c. the description format is left unspecified and the feature extraction methodologies are fixed d. both the description format and the feature extraction methodologies are left unspecified 9. The MPEG-21 standard a. aims to guarantee interoperability by focusing on how the elements of a multimedia application infrastructure should relate, integrate, and interact. b. aims to integrate elements from different MPEG standards into a single specification that is useful for specific but very widely-used applications. c. extends the MPEG-4 standard by defining new high-quality video codecs, audio codecs and system definitions. d. extends the MPEG-7 by providing a richer and more comprehensive set of description tools and systems. 10. The MPEG-A standard a. aims to guarantee interoperability by focusing on how the elements of a multimedia application infrastructure should relate, integrate, and interact. b. aims to integrate elements from different MPEG standards into a single specification that is useful for specific but very widely-used applications. c. extends the MPEG-4 standard by defining new high-quality video codecs, audio codecs and system definitions. d. extends the MPEG-7 by providing a richer and more comprehensive set of description tools and systems.