11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.

Slides:



Advertisements
Similar presentations
T.Sharon-A.Frank 1 Multimedia Compression Basics.
Advertisements

15 Data Compression Foundations of Computer Science ã Cengage Learning.
Data Compression CS 147 Minh Nguyen.
Chapter 7 End-to-End Data Ohanes Dadian, Danny Luong, Yu Lu.
Spring 2002CS 4611 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
Spring Remote Procedure Call (5.3) Outline Protocol Stack Presentation Formatting.
1 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
Chapter 7 End-to-End Data
School of Computing Science Simon Fraser University
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
Computer Organization Computer Architecture, Data Representation, Information Theory i206 Fall 2010 John Chuang Some slides adapted from Marti Hearst,
Computer Science 335 Data Compression.
CSc 461/561 CSc 461/561 Multimedia Systems 0. Introduction.
End-to-End Data Outline Presentation Formatting Data Compression.
CMPT 365 Multimedia Systems
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
CS430 © 2006 Ray S. Babcock Lossy Compression Examples JPEG MPEG JPEG MPEG.
Why Compress? To reduce the volume of data to be transmitted (text, fax, images) To reduce the bandwidth required for transmission and to reduce storage.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Image and Video Compression
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Chapter 2 Source Coding (part 2)
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 8 – JPEG Compression (Part 3) Klara Nahrstedt Spring 2012.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 7 End-to-End Data Copyright © 2010, Elsevier Inc. All rights Reserved.
MPEG: (Moving Pictures Expert Group) A Video Compression Standard for Multimedia Applications Seo Yeong Geon Dept. of Computer Science in GNU.
MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.
1 Computer Networks: A Systems Approach, 5e Larry L. Peterson and Bruce S. Davie Chapter 7 End-to-End Data Copyright © 2010, Elsevier Inc. All rights Reserved.
Klara Nahrstedt Spring 2011
D ATA C OMMUNICATIONS Compression Techniques. D ATA C OMPRESSION Whether data, fax, video, audio, etc., compression can work wonders Compression can be.
1 Lecture 17 – March 21, 2002 Content-delivery services. Multimedia services Reminder  next week individual meetings and project status report are due.
JPEG. The JPEG Standard JPEG is an image compression standard which was accepted as an international standard in  Developed by the Joint Photographic.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
CIS679: Multimedia Basics r Multimedia data type r Basic compression techniques.
Chapter 7 – End-to-End Data Two main topics Presentation formatting Compression We will go over the main issues in presentation formatting, but not much.
22-Oct-15CPSC558: Advanced Computer Networks Chapter 7 End-to-End Data –Data Manipulating Functions (Affecting Throughputs) How to encode the message into.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
1 Classification of Compression Methods. 2 Data Compression  A means of reducing the size of blocks of data by removing  Unused material: e.g.) silence.
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
Spring 2006CS 3321 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
Spring 2001CS Multimedia, QoS Multimedia (7.2, 9.3) Compression RTP Realtime Applications Integrated Services Differentiated Services Quality.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
 Last Class  Finish Chapter 6  This Class  Chapter 7.
Introduction to Computer Networks
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 22 – April 1, 2010.
1 Multimedia Outline Compression RTP Scheduling. 2 Compression Overview Encoding and Compression –Huffman codes Lossless –data received = data sent –used.
Spring 2000CS 4611 Remote Procedure Call Outline Protocol Stack Presentation Formatting.
1 COM Chapter 7 End-To-End Data 3 What Do We Do With The Data? From the network’s perspective, applications send messages to one another and these.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM M ULTIMEDIA OF D ATA C OMPRESSION Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny.
Submitted To-: Submitted By-: Mrs.Sushma Rani (HOD) Aashish Kr. Goyal (IT-7th) Deepak Soni (IT-8 th )
JPEG Compression What is JPEG? Motivation
CS644 Advanced Topics in Networking
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Data Compression.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
7. End-to-end data Rocky K. C. Chang Department of Computing
UNIT IV.
The University of Adelaide, School of Computer Science
University of Houston Remote Procedure Call Datacom II Lecture 6
Judith Molka-Danielsen, Oct. 02, 2000
The University of Adelaide, School of Computer Science
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Chapter 8 – Compression Aims: Outline the objectives of compression.
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

11 CS716 Advanced Computer Networks By Dr. Amir Qayyum

2 Lecture No. 39

3 Presentation Formatting Outline Presentation Formatting Data compression

4 Presentation Formatting Application Data Presentation Encoding Presentation Decoding Message ■ ■ ■ Application Data

5 Presentation Formatting Data types we consider –Integers –Floats –Strings –Arrays –Structs Types of data we do not consider –Images –Video –Multimedia documents

6 Difficulties Representation of base types –Floating point: IEEE 754 versus non-standard –Integer: big-endian vs little-endian (e.g., 34,677,374) Compiler layout of structures (126)(34)(17)(2) Big-endian Little-endian (2)(17)(34)(126) Low address High address

7 Taxonomy Data types –Base types (e.g. ints, floats), must convert –Flat types (e.g. structures, arrays), must pack –Complex types (e.g. pointers), must linearize Argument marshaller Application data structure

8 Taxonomy Conversion Strategy –Canonical intermediate form –Receiver-makes-right (an N x N solution)

9 Taxonomy (cont) Tagged versus untagged data

10 Taxonomy (cont) Stubs –Compiled –Interpreted Call P Client stub RPC Arguments Marshalled arguments Interface descriptor for procedure P Stub compiler Message Specification P Server stub RPC Arguments Marshalled arguments Code

11 eXternal Data Representation (XDR) Defined by Sun for use with SunRPC C type system (without function pointers) Canonical intermediate form Untagged (except array length) Compiled stubs

12 #define MAXNAME 256; #define MAXLIST 100; struct item { int count; char name[MAXNAME]; int list[MAXLIST]; }; bool_t xdr_item(XDR *xdrs, struct item *ptr) { return(xdr_int(xdrs, &ptr->count) && xdr_string(xdrs, &ptr->name, MAXNAME) && xdr_array(xdrs, &ptr->list, &ptr->count, MAXLIST, sizeof(int), xdr_int)); } CountName JO37HNSON List Example Code (XDR)

13 Abstract Syntax Notation One (ASN-1) An ISO standard Essentially the C type system Canonical intermediate form Tagged Compiled or interpreted stubs BER: Basic Encoding Rules (tag, length, value) value type lengthvaluelengthtypevaluelength INT44-byte integer

14 ASN.1 BER Representation

15 Network Data Representation (NDR) Defined by DCE Essentially the C type system Receiver-makes-right (architecture tag) Individual data items untagged Compiled stubs from IDL 4-byte architecture tag –IntegerRep 0 = big-endian 1 = little-endian –CharRep 0 = ASCII 1 = EBCDIC –FloatRep 0 = IEEE = VAX 2 = Cray 3 = IBM IntegrRep FloatRepCharRepExtension 1Extension 2

16 Data Compression Outline –Compression

17 Compression Overview Encoding and Compression –Huffman codes Lossless –Data received = data sent –Used for executables, text files, numeric data Lossy –Data received is not equal to data sent –Used for images, video, audio

18 Lossless Algorithms Run Length Encoding (RLE) –Example: AAABBCDDDD encoding as 3A2B1C4D –Good for scanned text (8-to-1 compression ratio) –Can increase size for data with variation (e.g. some images)

19 Lossless Algorithms Differential Pulse Code Modulation (DPCM) –Example AAABBCDDDD encoding as A –Change reference symbol if delta becomes too large –Works better than RLE for many digital images (1.5-to-1)

20 Dictionary-Based Methods Build dictionary of common terms –Variable length strings Transmit index into dictionary for each term Lempel-Ziv (LZ) is the best-known example Commonly achieve 2-to-1 ration on text 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 ( x 3)

21 Image Compression JPEG: Joint Photographic Expert Group (ISO/ITU) Lossy still-image compression Three phase process –Process in 8x8 block chunks (macro-block) –Grayscale: each pixel is three values (YUV) –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) Source image JPEG compression DCT QuantizationEncoding Compressed image

22 Quantization and Encoding Quantization Table Encoding Pattern

23 MPEG Motion Picture Expert Group Lossy compression of video First approximation: JPEG on each frame Also remove inter-frame redundancy

24 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 1Frame 2Frame 3Frame 4Frame 5Frame 6Frame 7 I frameB frame P frameB frame I frame MPEG compression Forward prediction Bidirectional prediction Compressed stream Input stream

25 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 5 x

26 Frame as Collection of Macroblocks

27 MP3 CD Quality –44.1 kHz sampling rate –2 × 44.1 × 1000 × 16 = 1.41 Mbps –49/16 × 1.41 Mbps = 4.32 Mbps Strategy –Split into some number of frequency bands –Divide each subband into a sequence of blocks –Encode each block using DCT + Quantization + Huffman –Trick: how many bits assigned to each subband

28 RTP Application-Level Framing Data Packets –Sequence number –Timestamp (app defines “tick”) Control Packets (send periodically) –Loss rate (fraction of packets received since last report) –Measured jitter

29 Transmitting MPEG Adapt the encoding –Resolution –Frame rate –Quantization table –GOP mix Packetization Dealing with loss GOP-induced latency

30 Figure 7.15 SeqHdrGroup of picturesSeqHdrGroup of picturesSeqEndCode GOPHdrPicture SlicePictureHdrSlice Macroblock SliceHdrMacroblock MBHdrBlock(0)Block(1)Block(2)Block(3)Block(4)Block(5) ■ ■ ■

31 Layered Video Layered encoding –e.g. wavelet encoded Receiver Layered Multicast (RLM) –Transmit each layer to a different group address –Receivers subscribe to the groups they can “afford” –Probe to learn if you can afford next higher group/layer Smart Packet Dropper (multicast or unicast) –Select layers to send/drop based on observed congestion –Observe directly or use RTP feedback

32 Real-Time Scheduling Priority Earliest Deadline First (EDF) Rate Monotonic (RM) Proportional Share –With feedback –With adjustments for deadlines