1 / 60

Chapter 7 End-to-End Data

Chapter 7 End-to-End Data. Ohanes Dadian , Danny Luong , Yu Lu. Contents. 7.1 Presentation Formatting 7.1.1 Taxonomy 7.1.2 Examples 7.1.3 Markup Languages 7.2 Multimedia Data 7.2.1 Lossless Compression Techniques 7.2.2 Image Representation and Compression 7.2.3 Video Compression

elsie
Download Presentation

Chapter 7 End-to-End Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 7 End-to-End Data OhanesDadian, Danny Luong, Yu Lu

  2. Contents 7.1 Presentation Formatting 7.1.1 Taxonomy 7.1.2 Examples 7.1.3 Markup Languages 7.2 Multimedia Data 7.2.1 Lossless Compression Techniques 7.2.2 Image Representation and Compression 7.2.3 Video Compression 7.2.4 Audio Compression

  3. Definition • Data • What is it? • Importance • Presentation Format • Agreement • An important aspect • Data manipulation function • Encoding • Argument marshalling • Decoding • Argument unmarshalling

  4. 7.1 Presentation Formatting

  5. Challenges of Presentation Formatting • Different representation in Floating-Point Numbers • IEEE standard 754 format • Nonstandard format • Different registers sizes • 16-bit register • 32-bit register • 64-bit register • Different representation in Integers • Big-Endian • Little-Endian

  6. 7.1.1 Taxonomy • Data Types • Conversion Strategy • Tags • Stubs

  7. Data Types • Lowest Level - Base Types • Integers • Floating-point numbers • Characters • Medium Level – Flat Types • Structures • Arrays • Highest Level – Complex Types • Those types that are built using pointers

  8. Data Types

  9. Conversion Strategy • Canonical intermediate Form • Sender: internal representation  external representation • Receiver: external representation  internal representation • Receiver-Makes-Right • Sender : Do not convert, send its internal representation directly • receiver : Any representation  internal representation • Combined

  10. Conversion Strategy Debate • Canonical intermediate Form vs. Receiver-Makes-Right

  11. 7.2.1 Lossless Compression Techniques • Data Compression • What is it? • Bandwidth vs Throughput • When to compress? • Data Compression Categories • Lossy vs Lossless • Lossless Compression Techniques • Run Length Encoding • Differential Pulse Code Modulation • Dictionary-Based Methods

  12. Tags • Tagged Data • A tag = additional information • Help the receiver decoding data • Untagged Data • How does the receiver know how to decode? • Think any object-oriented language as an example

  13. Stubs • On the Client Side • Marshal the arguments into a message • On the Server Side • Converts the message back into variables

  14. Stubs

  15. 7.1.2 Examples • External Data Representation (XDR) • Supports the entire C-type System without function pointers • defines canonical intermediate form • Does not use tags • Uses compiled stubs

  16. 7.1.2 Examples • Abstract Syntax notation One (ASN.1) • Supports the C-type system without function pointers • Defines canonical intermediate form • Uses type tags • Uses either interpreted or compiled stubs • Representation • <tag , length , value>

  17. 7.1.2 Examples • Network Data Representation (NDR) • Supports the C-type system • Defines receiver-makes-right • Uses tags • Generates the necessary stubs • Representation

  18. 7.1.3 Markup Languages(XML) • Extensible Markup Language – XML • What is xml? • Can be sent as data over internet • Can be configuration file used in frameworks • XML Schema Document – XSD • Defines XML • Namespace • Solve name clashes • URI – Uniform Resource Identifier (detail in Chapter 9) • xmlns: emp = “http://www.example.com/employee” • <emp: title> head Bottle Washer </emp:title>

  19. XML--Example

  20. XSD--Example

  21. Data Compression • Data Compression: Less data for the same message, increase throughput • Bandwidth vs Throughput • Bandwidth – Physical • Throughput – Logical • When to compress? • Time Cost

  22. Data Compression Categories • Two different categories • Lossy • Lossless • Pros and Cons of each technique • Compression ratio • Exact reconstruction Lossless Lossy

  23. 7.2.1 Lossless Compression Techniques • Data Compression • What is it? • Bandwidth vs Throughput • When to compress? • Data Compression Categories • Lossy vs Lossless • Lossless Compression Techniques • Run Length Encoding • Differential Pulse Code Modulation • Dictionary-Based Methods

  24. Data Compression • Data Compression: Less data for the same message, increase throughput • Bandwidth vs Throughput • Bandwidth – Physical • Throughput – Logical • When to compress? • Time Cost

  25. Data Compression Categories • Two different categories • Lossy • Lossless • Pros and Cons of each technique • Compression ratio • Exact reconstruction Lossless Lossy

  26. Lossless Compression Techniques • Run Length Encoding • Differential Pulse Code Modulation • Dictionary-Based Method

  27. Run Length Encoding (RLE) • One of the simplest method of data compression • A lossless compression method • Consecutive data elements saved as one element and a count • Simplified Example AAAAAAAAAABBBBBOOOOOOOOO 10A5B9O • Real world deals with binary instead • Most useful on data that contains repeated elements

  28. Differential Pulse Code Modulation (DPCM) • Another simple lossless compression algorithm • Output a reference symbol • Output the difference between new symbol and the reference • Example • AAABBCDDDD • A0001123333 • Work better on digital images

  29. Dictionary-Based Method • The last lossless compression algorithm we discuss • The idea is to build a dictionary (common phrases) • Replace common phrases with index • Dictionary constructed during compression sent along with the code • A lot of research on how to build an efficient dictionary

  30. 7.2.2 Image Representation and Compression • Focus on GIF & JPEG • Differences between GIF and JPEG • JPEG Compression Phases • DCT Phase • Quantization Phase • Encoding Phase

  31. Difference between GIF and JPEG • Graphic Interchange Format (GIF) • RGB color space • 8 bits each dimension = 24 bits total • Instead of sending 24 bits, reduce to 8 bits first • 28 = 256 color • Picture has more than 256 colors, change it and cut it down • Good compression ratio, but low quality

  32. Difference between GIF and JPEG • Joint Photographic Experts Group (JPEG) • Most widely used • More suited to photographic images • Transforming RGB color to YUV color space (lossless) • Y component represent brightness (luminance) • UV components represent color (chrominance) • Human eyes have separate receptors for brightness and color • By separating brightness and color, we can perform compression separately • Human eyes are less sensitive to color, so we can compress UV component more aggressively (lossy)

  33. GIF Compression Phases • No phases • One single step • Lossless • Each color is represented by 24 bits • Reduce it down to 8 bits • Only 256 color possible • More than 256 color, merge to closest color • Usage • Sharp-edged images (logos)

  34. JPEG Compression Phases • 3 different phases • DCT (lossless) • Quantization (lossy) • Encoding

  35. JPEG Compression Phases • Discrete Cosine Transform (DCT) Phase • Closely related to the Fast Fourier Transform (FFT) • 8x8 matrix of pixel value => matrix of frequency coefficients • Help Filter out least important pattern • Lossless • Formula

  36. JPEG Compression Phases • Quantization Phase • DCT phases only transform the data into something easier to recognize • Quantization Phase drops the insignificant bits of the frequency Coefficients • Truncate information => Lossy • Dropping the insignificant bits of the frequency coefficients

  37. JPEG Compression Phases • Encoding Phase • Final phase • Encodes the quantized frequency coefficients in a compact form • Coefficients are processed in zigzag sequence • Further compression can be applied e.g. Run Length Encoding

  38. 7.2.3 Video Compression • What is a video? • A succession of frames, or images. • Frames can be compressed using DCT • Like JPEG • Compression should take into consideration the redundancy between frames. • Two successive frames likely have a lot of the same information, depending on the moving object.

  39. MPEG • The MPEG format provides standards for multimedia compression. • Includes compression, decompression, processing and coded-representation. • MPEG 1, MPEG 2, MPEG 4 • Named after the group that invented it. • Moving Picture Experts Group • Established in 1988 and included experts from ISO and IEC.

  40. How MPEG Works

  41. Frame Types • MPEG compresses frames into three types. • I frames, P frames and B frames. • I frames • Self-dependent. • P frames • Specifies difference from the previous I frame. • B frames • Interpolation between the previous and subsequent I or P frames.

  42. Frame Types, contd.

  43. Frame Types, contd.

  44. Frame Types, contd.

  45. Effectiveness and Performance • MPEG video can be compressed with up to a 90:1 ratio. • Encoding/Decoding can be performed on software and hardware. • Hardware being the most prominent for encoding. • Software being the most prominent for decoding.

  46. 7.2.4 Transmitting MPEG over a Network • MPEG defines video stream. • Does not dictate how stream is stored. • Complex but modular. • Three variations. • MPEG 1, MPEG 2 and MPEG 4. • Focus on Main Profile MPEG 2 stream. • Used by DVD. • Nested Structure

  47. MPEG Format

  48. Transmitting MPEG over a Network, contd. • Allows for trading picture quality for bandwidth. • Need to packetize stream. • Not an issue with TCP. • For UDP, streams are broken at selected points. • Macroblock boundaries. • Application Level Framing. • Need to deal with packet loss. • Mark frames with drop probability. • Need to deal with application latency constraints.

  49. MPEG Video Compression Algorithm

  50. 7.2.4 Audio Compression • MPEG provides audio compression standard. • MPEG I/2 Layer III (MP3). • Example: • CD quality audio at 44.1 KHz sampling rate requires 1.41 Mbps bitrate. • 4.32 Mbps with synchronization and error correction overhead. • Some compression is in needed for network transfer. • MP3 compression solves this issue.

More Related