Documente Academic
Documente Profesional
Documente Cultură
Multimedia Systems
Outline
What is multi-media?
Requirements and challenges for audio and video in
computer systems
CD devices and formats
Silbershatz, Chapter 20
Tanenbaum, Chapter 7
CS-502 Fall 2007
Multimedia Systems
Video on demand
Pause, fast forward, reverse, etc.
Handheld devices
iPod, MP-3 players; personal video; mobile phones,
CS-502 Fall 2007
Multimedia Systems
Continuous-media data
Data with specific rate requirements
CS-502 Fall 2007
Multimedia Systems
Multimedia Characteristics
Multimedia files can be very large.
Continuous media data may require very high data
rates.
Multimedia applications are usually sensitive to
timing delays during playback.
Multimedia Systems
Requirements
Smooth audio and video
Deterioration in quality jerky playback
Multimedia Systems
Processor Scheduling
Disk Scheduling
Network Streaming
CS-502 Fall 2007
Multimedia Systems
Modern
Fast system bus, CPU, devices
Video server
Disk farm and multiple streams
CS-502 Fall 2007
Multimedia Systems
CPU
memory bus
audio stream
Device
CD-ROM
drive
Sound
card
Multimedia Systems
Main
Memory
AGP Port
Level
2
cache
CPU
Bridge
PCI bus
Ethernet
SCSI
ISA
bridge
IDE
disk
Sound
card
Printer
ISA bus
Keyboard
Modem
Multimedia Systems
Monitor
USB
Mouse
CS-502 Fall 2007
Graphics
card
10
Digression
CD and DVD devices and files
Multimedia Systems
11
Audio CD
Molded polycarbonate; easy to manufacture
120 mm diameter with 15 mm hole
One single spiral track
Starts in center, spirals outward
22,188 revolutions, approx 5.6 kilometers long
Random access
Multimedia Systems
12
Read speed
1x ~ 153,000 bytes/sec
40x ~ 5.9 megabytes/sec
Multimedia Systems
13
Multimedia Systems
14
DVD devices
Similar in concept, different in details
More data, higher bandwidth
Track spacing:
Bit spacing:
Capacity:
0.834
vs.
0.4
vs.
4.7 Gbytes vs.
1.6
0.74
650 Mbytes
Multimedia Systems
15
Compression
An essential part of audio and video
representation as files
Multimedia Systems
16
Multimedia Systems
17
Multimedia Systems
18
VCR controls
Pause, fast forward, reverse
CS-502 Fall 2007
Multimedia Systems
19
Three standards
MPEG-1 352240 frames; < 1.5 mb/sec ( < VHS quality)
Layer 3 = MP3 Audio standard
Typical uses: video clips on internet; video for handhelds
Multimedia Systems
20
2. Down-sample I, Q channels
21
JPEG (continued)
Multimedia Systems
22
JPEG (continued)
Multimedia Systems
23
JPEG (continued)
4. Calculate Discrete Cosine Transform
(DCT) of each 88 block
Multimedia Systems
24
JPEG (concluded)
7. Store or transmit 88 quantization table
followed by list of compressed blocks
25
MPEG
JPEG-like encoding of each frame
Takes advantage of temporal locality
I.e., each frame usually shares similarities
with previous frame
encode and transmit only differences
Multimedia Systems
26
Multimedia Systems
27
MPEG organization
Three types of frames
I-frame: Intracoded or Independent.
Full JPEG-encoded frame
Occurs at intervals of a second or so
Also at start of every scene
I BBBPBBBPBBBPBBB I BBBPBBBP
CS-502 Fall 2007
Multimedia Systems
28
MPEG Characteristics
Non-uniform data rate!
Compression ratios of 50:1 80:1 are readily
obtainable
Asymmetric algorithm
Fast decode (like JPEG)
Encode requires image search and analysis to get high
quality differences
Multimedia Systems
29
Options:
Separate fast forward and fast reverse files
MPEG encoding of every nth frame
Often used in video-on-demand server
Multimedia Systems
30
All interleaved
Possibly in multiple files!
CS-502 Fall 2007
Multimedia Systems
31
Multimedia Systems
32
Questions?
(skip to reading assignment)
Multimedia Systems
33
Multimedia Systems
34
QoS Guarantees
Building a system to guarantee QoS effects
the following:
CPU processing
Scheduling and interrupt handling
File systems
Network protocols
Multimedia Systems
35
Multimedia Systems
36
Multimedia Systems
37
Multimedia Systems
38
Many variations
Many analytic methods for proving QoS
(Quality of Service)
Multimedia Systems
39
Multimedia Systems
40
Example
Periodic process i requires the CPU at specified intervals
(periods)
pi is the duration of the period
ti is the processing time
di is the deadline by when the process must be serviced
Often same as end of period
Multimedia Systems
41
Assume
i 1
ti
1
pi
1
pi
Multimedia Systems
42
Multimedia Systems
43
Example
p1 = 50 msec; t1 = 20 msec
p2 = 100 msec; t2 = 35 msec
Priority(p1) > Priority(p2)
Total compute load is 75 msec per every 100 msec.
Multimedia Systems
44
Example 2
p1 = 50 msec; t1 = 25 msec
p2 = 80 msec; t2 = 35 msec
Priority(p1) > Priority(p2)
Total compute load is ~ 94% of CPU.
Multimedia Systems
45
1
ti
m(2 m 1)
i 1 pi
Asymptotically approaches ln 2 as m
ln 2 = 0.6931
Multimedia Systems
46
Example 2 again
1
t1 t 2 25 35
0.9375 2 2 2 1 0.828
p1 p2 50 80
Multimedia Systems
47
Multimedia Systems
48
Multimedia Systems
49
Multimedia Systems
50
Multimedia Systems
51
Example 2 (again)
Priorities are assigned according to deadlines:
the earlier the deadline, the higher the priority;
the later the deadline, the lower the priority.
Multimedia Systems
52
Reading Assignments
Silbershatz, 19.119.5
Real-time systems & Real-time scheduling
Silbershat, Chapter 20
Multimedia systems
Multimedia Systems
53
Questions?
Multimedia Systems
54
Network Management
General methods for delivering content
from a server to a client across a network:
Broadcasting: server delivers content to all
clients, whether they want it or not.
Multicasting: server delivers content to group
of clients who indicate they wish to receive the
content.
Unicasting: server delivers content to a single
client.
CS-502 Fall 2007
Multimedia Systems
55
Multicasting
Typical webcast
Multicast tree set up through internet to reach customers
Customers can come and go
Unicast
Dedicated connection between server and client
Streaming version of familiar transport protocols
CS-502 Fall 2007
Multimedia Systems
56
Streaming
Delivery of Multimedia Data over Network
Two types of streaming:
Progressive download: client begins playback
of multimedia file during delivery.
File is ultimately stored on client computer
(Hopefully) download speed > playback speed
Multimedia Systems
57
58
Network Streaming
Traditional HTTP
Stateless
Server responds to each request independently
Multimedia Systems
59
Multimedia Systems
60
RTSP States
SETUP: server allocates resources for client
session.
PLAY: server delivers stream to a client
session.
PAUSE: server suspends delivery of a
stream.
TEARDOWN: server releases resources and
breaks down connection.
CS-502 Fall 2007
Multimedia Systems
61
Multimedia Systems
62
Bandwidth Negotiation
Client application provides feedback to
server to adjust bandwidth
E.g.,
Windows Media Player
RealPlayer
Quicktime
Multimedia Systems
63
Video Server
Multiple CPUs
Disk farm
1000s of disks
Multimedia Systems
64
Audio
Frame
CS-502 Fall 2007
Text
Frame
Multimedia Systems
65
Block organization
66
larger
smaller
Multimedia Systems
67
Multimedia Systems
68
Multimedia Systems
69
Conclusion
Multimedia computing is challenging
Possible with modern computers
Compression is essential, especially for video
Multimedia Systems
70
Reading Assignments
Silbershatz, 19.119.5
Real-time systems & Real-time scheduling
Silbershatz, Chapter 20
Multimedia systems
Multimedia Systems
71
Multimedia Systems
72
Digression on Transforms
Fouriers Theorem
Every continuous, periodic function can be
reduced to the sum of a series of sine waves
The Fourier transform is a representation of that
function in terms of the frequencies of those sine
waves
Original function can be recovered from its
Fourier transform
Fourier transforms occur frequently in nature!
CS-502 Fall 2007
Multimedia Systems
73
Multimedia Systems
74
Multimedia Systems
75
More on Nyquist
If arithmetic precision is not infinite, we get
quantization error during sampling
Recovered signal has quantization noise
i.e., a lossy transform
Multimedia Systems
76