spring 2001cs 5851 14. multimedia, qos multimedia (7.2, 9.3) compression rtp realtime applications...

23
Spring 2001 CS 585 1 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality of Service (6.5)

Upload: horace-rich

Post on 04-Jan-2016

231 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 1

14. Multimedia, QoS

Multimedia (7.2, 9.3)CompressionRTP

Realtime Applications

Integrated Services

Differentiated Services

Quality of Service (6.5)

Page 2: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 2

Compression Overview

• Encoding and Compression– Huffman codes

• Lossless – data received = data sent

– used for executables, text files, numeric data

• Lossy– data received does not != data sent

– used for images, video, audio

Page 3: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 3

Lossless Algorithms

• Run Length Encoding (RLE)– example: AAABBCDDDD encoding as 3A2B1C4D

– good for scanned text (8-to-1 compression ratio possible,fax)

– can increase size for data with variation (e.g., some images)

• Differential Pulse Code Modulation (DPCM)– example AAABBCDDDD encoding as A0001123333

– change reference symbol if delta becomes too large

– works better than RLE for many digital images (1.5-to-1)

Page 4: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 4

Dictionary-Based Methods

• Build dictionary of common terms (LZ algorithm)– variable length strings

• Transmit index into dictionary for each term– Compression 11*7=77bits 4978th of 25000 world

dictionay(15bits)

• Static dictionary vs tailored dictionary• Variation of LZ used to compress GIF images

– first reduce 24-bit color to 8-bit color – treat common sequence of pixels as terms in dictionary– not uncommon to achieve 10-to-1 compression (x3)

Page 5: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 5

Image Compression • JPEG: Joint Photographic Expert Group (ISO/ITU)• Lossy still-image compression • Three phase process

– process in 8x8 block chunks (macroblock)– grayscale: each pixel is given by a 8 bit value– DCT: transforms signal from spatial domain into and

equivalent signal in the frequency domain (loss-less)– apply a quantization to the results (lossy) – RLE-like encoding (loss-less)

Sourceimage

JPEG compression

DCT Quantization EncodingCompressed

image

Page 6: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 6

Discrete Cosine Transform(DCT)

• 8*8 matrix spatial domain 8*8 matrix frequency domain

• DC coefficient located at (0,0) indicates average value of 64 pixels

• AC coefficients (rest), variations

Page 7: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 7

Quantization and Encoding• Quantization Table

3 5 7 9 11 13 15 17

5 7 9 11 13 15 17 19

7 9 11 13 15 17 19 21

9 11 13 15 17 19 21 23

11 13 15 17 19 21 23 25

13 15 17 19 21 23 25 27

15 17 19 21 23 25 27 29

17 19 21 23 25 27 29 31

• Encoding Pattern

Page 8: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 8

MPEG

• Motion Picture Experts Group• Lossy compression of video • First approximation: JPEG on each frame• Also remove inter-frame redundancy

Page 9: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 9

MPEG (cont)• Frame types

– I frames: intrapicture – P frames: predicted picture– B frames: bidirectional predicted picture

• Example sequence transmitted as I P B B I B B

Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 Frame 7

I frame B frame B frame P frame B frame B frame I frame

MPEGcompression

Forwardprediction

Bidirectionalprediction

Compressedstream

Inputstream

Page 10: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 10

MPEG (cont)• B and P frames

– coordinate for the macroblock in the frame

– motion vector relative to previous reference frame (B, P)

– motion vector relative to subsequent reference frame (B)

– delta for each pixel in the macro block

• Effectiveness– typically 90-to-1

– as high as 150-to-1

– 30-to-1 for I frames

– P and B frames get another 3 to 5x

Page 11: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 11

RTP (9.3)Real-time Transport Protocol

• Application-Level Framing• Data Packets

– sequence number– timestamp (app defines “tick”)

• Smooth out jitter and synchronization of multiple streams

• Control Packets (send periodically, RTCP)– loss rate (fraction of packets received since last report)– measured jitter

Page 12: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 12

Quality of Service (6.5)

Realtime Applications

Integrated Services

Differentiated Services

Page 13: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 13

Realtime Applications• Require “deliver on time” assurances

– must come from inside the network

• Example application (audio)– sample voice once every 125us

– each sample has a playback time

– packets experience variable delay in network

– add constant factor to playback time: playback point

Microphone

Speaker

Sampler,A D

converter

Buffer,D A

Page 14: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 14

Playback BufferS

eque

nce

num

ber

Packetgeneration

Networkdelay

Buffer

Playback

Time

Packetarrival

Page 15: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 15

Example Distribution of Delays

1

2

3

Pa

cke

ts (

%)

90% 97% 98% 99%

150 20010050

Delay (milliseconds)

Page 16: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 16

TaxonomyApplications

Real time

Tolerant

Adaptive Nonadaptive

Delay-adaptive

Rate-adaptive

Intolerant

Rate-adaptive Nonadaptive

Interactive Interactivebulk

Asynchronous

Elastic

Page 17: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 17

Integrated Services

• Service Classes– guaranteed

– controlled-load

• Mechanisms– signaling protocol

– admission control

– policing

– packet scheduling

Page 18: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 18

Flowspec• Rspec: describes service requested from network

– controlled-load: none– guaranteed: delay target

• Tspec: describes flow’s traffic characteristics (leaky bucket)– average bandwidth + burstiness: token bucket filter– token rate r– bucket depth B– must have a token to send a byte– must have n tokens to send n bytes– start with no tokens– accumulate tokens at rate of r per second– can accumulate no more than B tokens

Page 19: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 19

Per-Router Mechanisms

• Admission Control– decide if a new flow can be supported– answer depends on service class– not the same as policing

• Packet Processing– classification: associate each packet with the

appropriate reservation– scheduling: manage queues so each packet receives the

requested service

Page 20: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 20

Reservation Protocol• Proposed Internet standard: RSVP• Consistent with robustness of today’s connectionless model• Uses soft state (refresh periodically)• Designed to support multicast• Receiver-oriented• Two messages: PATH and RESV

– Source transmits PATH messages every 30 seconds– Destination responds with RESV message

• In case of Multicast– Merge requirements in case of multicast– Can specify number of speakers

Page 21: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 21

RSVP Example

R

R

R

R

R

Sender 1

Sender 2

PATH

PATH

RESV(merged)

RESV

RESV

Receiver B

Receiver A

Page 22: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 22

RSVP versus ATM (Q.2931)• RSVP

– receiver generates reservation– soft state (refresh/timeout)– separate from route establishment– QoS can change dynamically– receiver heterogeneity

• ATM (Asynchronous Transfer Mode)– sender generates connection request– hard state (explicit delete)– concurrent with route establishment– QoS is static for life of connection– uniform QoS to all receivers

Page 23: Spring 2001CS 5851 14. Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality

Spring 2001 CS 585 23

Differentiated Services• Problem with IntServ: scalability

– Per flow state information

• Idea: support two classes of packets– premium– best-effort P(drop)

1.0

MaxP

Min in MaxinMaxoutMinout

AvgLen

• Mechanisms– packets: ‘in’ and ‘out’ bit– edge routers: tag packets– core routers: RIO (RED

with In and Out)