Blog
Multimedia Systems Theory & Principles Past Paper 2015 – MS CS 3rd Term UOS (CS-5743)
University of Sargodha MS Computer Science 3rd term Multimedia Systems Theory & Principles (CS-5743) paper, 2015 exam (80 marks, 3 hours). The paper has been retyped, and solved answers are given below for all short questions and all six long questions, including digital images, colour science and CMYK, Huffman coding, MPEG-1 vs MPEG-2, SNR and SQNR.
Solved answers
Q1 – Short answers (8 × 2)
1. Multimedia components: Text, images/graphics, audio, video and animation, combined and usually made interactive (hyperlinks, user input).
2. Graphics and image data types: 1-bit (monochrome) images, 8-bit gray-level images, 8-bit colour images with a colour look-up table (palette), and 24-bit true-colour images (8 bits each for R, G, B); vector graphics store drawing commands (lines, shapes) instead of pixels. Common formats: GIF, JPEG, PNG, TIFF, BMP, EPS.
3. 8-bit gray-level image: Each pixel is stored in one byte, giving 256 shades of gray from 0 (black) to 255 (white). A 640 × 480 image needs 640 × 480 bytes ≈ 300 KB.
4. Multimedia authoring: Creating multimedia applications by combining and synchronising media elements and adding interactivity, using authoring tools such as Adobe Animate (Flash), Director, Authorware or HTML5 editors.
5. YIQ colour model: Used in NTSC analog TV. Y is luminance (brightness), I and Q are chrominance (colour). It separates brightness from colour so black-and-white TVs use only Y: Y = 0.299R + 0.587G + 0.114B.
6. Entropy: The average information content of a source: η = −Σ pi log2 pi bits per symbol. It is the lower bound on the average code length of any lossless code.
7. GIF format: Graphics Interchange Format (CompuServe 1987): up to 8 bits/pixel (256 colours from a palette), lossless LZW compression, supports transparency, interlacing and simple animation (GIF89a). Good for logos and drawings.
8. Variable-length coding: Assigning shorter codewords to frequent symbols and longer codewords to rare ones, so the average code length approaches the entropy; e.g. Shannon-Fano, Huffman and arithmetic coding. Codes must be prefix-free to be decodable.
Q2 – Multimedia: definition, history, future
Multimedia is the integration of several media – text, graphics, images, audio, video and animation – in a computer-controlled, usually interactive, environment where information is represented, stored, transmitted and processed digitally.
Brief history:
- 1945 – Vannevar Bush’s “Memex” idea of linked information; 1960s – Ted Nelson coins “hypertext” and Douglas Engelbart demonstrates the mouse and hypertext (1968).
- 1970s–80s – personal computers with graphics and sound; Apple Macintosh (1984) and HyperCard (1987); CD-ROM (1985) stores multimedia titles.
- 1990s – multimedia PCs, MPEG-1 (1992), MPEG-2 (1994) and JPEG standards; Tim Berners-Lee’s World Wide Web (1990) and the Mosaic browser (1993) bring hypermedia to everyone; DVD (1996).
- 2000s – broadband internet, MP3, Flash, YouTube (2005), smartphones (2007) and social media.
- 2010s – HD/4K streaming, HTML5 video, H.264/H.265, video conferencing, VR/AR.
Future importance: immersive VR/AR and 3-D media, 8K and 360° video, cloud gaming and streaming over 5G, AI-generated and personalised media, e-learning and telemedicine, smart-home and vehicle interfaces. Multimedia will remain central to education, entertainment, business communication and healthcare.
Q3 – Digital image
A digital image is a two-dimensional array f(x, y) of picture elements (pixels) obtained by sampling and quantising a continuous image; each pixel holds a number representing intensity or colour.
Data point of view in a multimedia environment:
- Resolution: width × height in pixels (e.g. 1920 × 1080) and spatial density (dpi).
- Bit depth / colour model: 1-bit, 8-bit gray, 8-bit palette (colour look-up table) or 24-bit RGB (16.7 million colours), plus an optional alpha channel for transparency; colour spaces RGB, CMYK, YCbCr.
- Size: width × height × bits per pixel / 8 bytes, e.g. 1024 × 768 × 24 / 8 = 2.36 MB uncompressed.
- Compression and file format: lossless (PNG, GIF, TIFF-LZW) or lossy (JPEG); a file header stores dimensions, bit depth, palette, compression method and metadata (EXIF).
- Raster vs vector: raster stores pixels; vector graphics store geometric primitives and scale without loss.
Authoring/editing tool: Adobe Photoshop (others: GIMP, Adobe Illustrator for vector images, Adobe Animate/Director for including images in presentations).
Q4 – Colour science and CMYK
Colour science: light is electromagnetic radiation; the visible part of the EM spectrum is about 400 nm (violet) to 700 nm (red). A light source has a spectral power distribution E(λ); an object reflects part of it according to its reflectance S(λ). The eye has three types of cones sensitive to short (blue), medium (green) and long (red) wavelengths, so any colour can be described by three numbers (trichromacy) – the basis for RGB displays, CIE XYZ, and gamma correction of devices.
CMYK model: a subtractive model used for printing. Inks Cyan, Magenta and Yellow absorb (subtract) red, green and blue respectively from white light reflected by paper: C = 1 − R, M = 1 − G, Y = 1 − B. Mixing all three should give black, but real inks give a muddy dark brown, so a separate black (K) ink is added (undercolour removal: K = min(C, M, Y); C = C − K, …).
Application in printing: colour separation – an RGB image is converted to four plates (C, M, Y, K) for offset printing; halftoning (dot patterns at different angles) produces intermediate shades; using K saves expensive coloured ink, gives sharp black text and better drying. Printers and designers use ICC colour profiles to map the RGB gamut to the smaller CMYK gamut.
Q5 – Compression and Huffman coding
Central idea of compression: represent information with fewer bits by removing redundancy – coding redundancy (variable-length codes), spatial/temporal redundancy (prediction, transforms, motion compensation) and perceptual redundancy (lossy quantisation). Compression ratio = original size / compressed size. Lossless methods (Huffman, LZW) restore the data exactly; lossy methods (JPEG, MPEG) trade some quality for much higher ratios.
Huffman coding (1952) is an optimal prefix-free variable-length code built bottom-up from symbol probabilities:
- List all symbols with their frequencies/probabilities as leaf nodes.
- Take the two nodes with the lowest probabilities and merge them into a new node whose probability is their sum.
- Repeat step 2 until one node (the root) remains.
- Assign 0 to one branch and 1 to the other at every node; the code of a symbol is the bit sequence on the path from root to its leaf.
Example: symbols A 0.4, B 0.2, C 0.2, D 0.1, E 0.1. Merge D + E = 0.2, then C + DE = 0.4, then B + CDE = 0.6, then A + rest = 1.0. Codes: A = 0, B = 10, C = 110, D = 1110, E = 1111. Average length = 0.4·1 + 0.2·2 + 0.2·3 + 0.1·4 + 0.1·4 = 2.2 bits/symbol, against an entropy of 2.12 bits and 3 bits for fixed-length coding. Decoding is unique because no code is a prefix of another; the code table must be sent with the data (or adaptive Huffman used).
Q6 – MPEG standards; MPEG-1 vs MPEG-2
MPEG (Moving Picture Experts Group, ISO/IEC) develops standards for compressed audio and video: MPEG-1 (1992, VCD and MP3 audio), MPEG-2 (1994, digital TV and DVD), MPEG-4 (1998, object-based coding, AVC/H.264 in Part 10, internet and mobile video), MPEG-7 (multimedia content description, metadata), MPEG-21 (multimedia framework) and later MPEG-H (HEVC/H.265). Video coding uses I, P and B frames, motion-compensated prediction, DCT on 8 × 8 blocks, quantisation and entropy coding.
| Feature | MPEG-1 | MPEG-2 |
|---|---|---|
| Target | Video CD, CD-ROM, ~1.5 Mbps | Broadcast digital TV, DVD, HDTV; 4–15 Mbps and more |
| Resolution | SIF 352 × 240 (NTSC) / 352 × 288 (PAL) | Up to 720 × 576 (SD) and 1920 × 1080 (HD) |
| Scanning | Progressive only | Supports interlaced video (field/frame prediction and DCT) |
| Profiles and levels | None | Profiles (Simple, Main, High…) and levels (Low, Main, High…) |
| Scalability | Not supported | SNR, spatial and temporal scalability |
| Audio | Layers I, II, III (MP3), stereo | Multichannel 5.1 audio, AAC |
| Streams | Program stream for error-free media | Program and transport streams for error-prone broadcast |
Q7 – Short notes
1. Sound wave: a longitudinal pressure wave travelling through a medium (air ≈ 343 m/s). It is described by frequency (pitch; humans hear about 20 Hz – 20 kHz), amplitude (loudness, measured in decibels) and waveform (timbre). To digitise it, it is sampled at least at twice the highest frequency (Nyquist rate, e.g. 44.1 kHz for CD) and quantised (16 bits).
2. Signal-to-Noise Ratio (SNR): the ratio of signal power to noise power, usually in decibels: SNR = 10 log10(V²signal/V²noise) = 20 log10(Vsignal/Vnoise) dB. A higher SNR means a cleaner signal; e.g. if signal voltage is 10 times the noise, SNR = 20 dB.
3. MIDI (Musical Instrument Digital Interface): a protocol (1983) for communication between electronic instruments, synthesisers and computers. It sends event messages (note on/off, pitch, velocity, program change, control change) on 16 channels instead of recorded sound, so MIDI files are very small; the sound depends on the synthesiser’s instruments (General MIDI defines 128 standard instruments).
4. Signal-to-Quantisation-Noise Ratio (SQNR): the ratio of signal power to the quantisation error introduced when samples are rounded to N bits. For N bits, SQNR ≈ 20 log10(2N) = 6.02 N dB (about 6.02 N + 1.76 dB for a full-scale sine wave). So each extra bit adds about 6 dB: 8-bit audio ≈ 48 dB, 16-bit CD audio ≈ 96 dB.
