End-to-End Data. Presentation Formatting. Difficulties. Outline Formatting Compression

Similar documents
Remote Procedure Call

CS 335 Graphics and Multimedia. Image Compression

IMAGE COMPRESSION. Image Compression. Why? Reducing transportation times Reducing file size. A two way event - compression and decompression

What is multimedia? Multimedia. Continuous media. Most common media types. Continuous media processing. Interactivity. What is multimedia?

Multimedia. What is multimedia? Media types. Interchange formats. + Text +Graphics +Audio +Image +Video. Petri Vuorimaa 1

15 Data Compression 2014/9/21. Objectives After studying this chapter, the student should be able to: 15-1 LOSSLESS COMPRESSION

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

Digital Image Representation Image Compression

Fundamentals of Video Compression. Video Compression

Compression Part 2 Lossy Image Compression (JPEG) Norm Zeck

Compression; Error detection & correction

Compression; Error detection & correction

Compression II: Images (JPEG)

Wireless Communication

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

7.5 Dictionary-based Coding

Image, video and audio coding concepts. Roadmap. Rationale. Stefan Alfredsson. (based on material by Johan Garcia)

Digital Video Processing

CMPT 365 Multimedia Systems. Media Compression - Image

Lecture 8 JPEG Compression (Part 3)

XDR External Data Representation. XDR as a case study XDR

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5.

Introduction to Computer Science (I1100) Data Storage

Video Compression An Introduction

ECE 417 Guest Lecture Video Compression in MPEG-1/2/4. Min-Hsuan Tsai Apr 02, 2013

Bits and Bit Patterns

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

Video Compression MPEG-4. Market s requirements for Video compression standard

Chapter 1. Data Storage Pearson Addison-Wesley. All rights reserved

Distributed Systems 8. Remote Procedure Calls

Data Compression. Media Signal Processing, Presentation 2. Presented By: Jahanzeb Farooq Michael Osadebey

Bi-Level Image Compression

VC 12/13 T16 Video Compression

Lecture 8 JPEG Compression (Part 3)

Audio and video compression

Multimedia Systems Image III (Image Compression, JPEG) Mahdi Amiri April 2011 Sharif University of Technology

7: Image Compression

CS 074 The Digital World. Digital Audio

JPEG. Wikipedia: Felis_silvestris_silvestris.jpg, Michael Gäbler CC BY 3.0

Image coding and compression

INF5063: Programming heterogeneous multi-core processors. September 17, 2010

JPEG Modes of Operation. Nimrod Peleg Dec. 2005

Professor Laurence S. Dooley. School of Computing and Communications Milton Keynes, UK

Repetition 1st lecture

External Data Representation (XDR)

Multimedia Networking ECE 599

Introduction ti to JPEG

Lossless Compression Algorithms

Interframe coding A video scene captured as a sequence of frames can be efficiently coded by estimating and compensating for motion between frames pri

Operating Systems. 18. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Spring /20/ Paul Krzyzanowski

IMAGE COMPRESSION TECHNIQUES

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio:

Georgios Tziritas Computer Science Department

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013

Chapter 4 Communication

Lecture Coding Theory. Source Coding. Image and Video Compression. Images: Wikipedia

JPEG. Table of Contents. Page 1 of 4

Source Coding Techniques

Engineering Swarm- Services CS

Video coding. Concepts and notations.

Chapter 1. Digital Data Representation and Communication. Part 2

Lecture 6 Review of Lossless Coding (II)

Video Codec Design Developing Image and Video Compression Systems

CSCI-1680 RPC and Data Representation. Rodrigo Fonseca

MARSHALLING IN DISTRIBUTED SYSTEMS: TWO APPROACHES

Week 14. Video Compression. Ref: Fundamentals of Multimedia

Data Representation and Networking

JPEG Joint Photographic Experts Group ISO/IEC JTC1/SC29/WG1 Still image compression standard Features

Unicode. Standard Alphanumeric Formats. Unicode Version 2.1 BCD ASCII EBCDIC

So, what is data compression, and why do we need it?

JPEG: An Image Compression System. Nimrod Peleg update: Nov. 2003

Robert Matthew Buckley. Nova Southeastern University. Dr. Laszlo. MCIS625 On Line. Module 2 Graphics File Format Essay

Computer and Machine Vision

ECE 499/599 Data Compression & Information Theory. Thinh Nguyen Oregon State University

Using animation to motivate motion

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

Data encoding. Lauri Võsandi

DCT Based, Lossy Still Image Compression

Compression and File Formats

Introduction to Video Encoding

CSCI-1680 RPC and Data Representation John Jannotti

Lecture 6: Compression II. This Week s Schedule

ESE532: System-on-a-Chip Architecture. Today. Message. Project. Expect. Why MPEG Encode? MPEG Encoding Project Motion Estimation DCT Entropy Encoding

Lossy compression. CSCI 470: Web Science Keith Vertanen

Lecture 19 Media Formats

Uscan. DICOM Conformance Statement

Jianhui Zhang, Ph.D., Associate Prof. College of Computer Science and Technology, Hangzhou Dianzi Univ.

JPEG 2000 compression

Lecture 3 Image and Video (MPEG) Coding

CS 417 9/18/17. Paul Krzyzanowski 1. Socket-based communication. Distributed Systems 03. Remote Procedure Calls. Sample SMTP Interaction

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY ACADEMIC YEAR / ODD SEMESTER QUESTION BANK

Fundamentals of Multimedia. Lecture 5 Lossless Data Compression Variable Length Coding

Lecture 5: Compression I. This Week s Schedule

Introduction to Compression. Norm Zeck

Distributed Systems. 03. Remote Procedure Calls. Paul Krzyzanowski. Rutgers University. Fall 2017

G64PMM - Lecture 3.2. Analogue vs Digital. Analogue Media. Graphics & Still Image Representation

MULTIMEDIA AND CODING

Ch. 4: Video Compression Multimedia Systems

Image Coding and Compression

Transcription:

End-to-End Data Outline Formatting Compression Spring 2009 CSE30264 1 Presentation Formatting Marshalling (encoding) application data into messages Unmarshalling (decoding) messages into application data Application Application data data Presentation Presentation encoding decoding Message Message Message Spring 2009 CSE30264 2 Difficulties Representation of base types floating point: IEEE 754 versus non-standard integer: big-endian versus little-endian (e.g., 34,677,374) (2) (17) (34) (126) Big-endian 00000010 0001 0001 001 000 10 0111111 0 (126) (34) (17) (2) Little-endian 0111111 0 001 000 10 0001 0001 0 0000 10 Low address High address Compiler layout of structures Spring 2009 CSE30264 3 1

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 Application data structure Argument marshaller Conversion Strategy canonical intermediate form receiver-makes-right (an N x N solution) Spring 2009 CSE30264 4 Taxonomy (cont) Tagged versus untagged data type = INT Stubs compiled interpreted len = 4 value = 417892 Call P Interface descriptor for procedure P P Arguments Specification Argument Client stub Code Stub compiler Code Server stub Marshalled arguments Marshalled arguments RPC RPC Message Spring 2009 CSE30264 5 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 Spring 2009 CSE30264 6 2

#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)); } Count Name 3 7 J O H N S O N List 3 497 8321 265 Spring 2009 CSE30264 7 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) type length type length value type length value value INT 4 4-byte integer Spring 2009 CSE30264 8 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 754 1 = VAX 2 = Cray 3 = IBM 0 4 8 16 24 31 IntegrRep CharRep FloatRep Extension 1 Extension 2 Spring 2009 CSE30264 9 3

Markup Languages HyperText Markup Language (HTML) Extensible Markup Language (XML) <?xml version= 1.0?> <employee> <name>spongebob Squarepants</name> <title>frycook</title> <id>0123456</id> <hiredate> <day>1</day> <month>may</month> <year>1999</year> </hiredate> </employee> Spring 2009 CSE30264 10 XML Schema <?xml version= 1.0?> <xs:schema xmlns=http://www.cs.princeton.edu/xmlschema targetnamespace=http://www.cs.princeton.edu xmlns=http://www.cs.princeton.edu elementformdefault= qualified > <xs:element name= employee > <xs:complextype> <xs:sequence> <xs:element name= name type= xs:string /> <xs:element name= title type= xs:string /> <xs:element name= id type= xs:string /> <xs:element name= hiredate > <xs:complextype> <xs:sequence> <xs:element name= day type= xs:integer /> Spring 2009 CSE30264 11 Compression Overview Encoding and Compression Huffman codes Lossless data received = data sent used for executables, text files, numeric data Lossy data received does not match data sent used for images, video, audio Spring 2009 CSE30264 12 4

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) 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) Spring 2009 CSE30264 13 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 ratio 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 can achieve 10-to-1 compression (less common) Spring 2009 CSE30264 14 Image Compression JPEG: Joint Photographic Expert Group (ISO/ITU) Lossy still-image compression Three phase process Source image JPEG compression DCT Quantization Encoding Compressed image process in 8x8 block chunks (macro-block) 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) Spring 2009 CSE30264 15 5

Quantization and Encoding Quantization Table Encoding Pattern 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 Spring 2009 CSE30264 16 MPEG Motion Picture Expert Group Lossy compression of video First approximation: JPEG on each frame Also remove inter-frame redundancy Spring 2009 CSE30264 17 MPEG (cont) Frame types I frames: intrapicture P frames: predicted picture B frames: bidirectional predicted picture Input stream Frame 1 Frame 2 Frame 3 Frame 4 Frame 5 Frame 6 Frame 7 MPEG compression Forward prediction Compressed I frame B frame B frame P frame B frame B frame I frame stream Bidirectional prediction Example sequence transmitted as I P B B I B B Spring 2009 CSE30264 18 6

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 Spring 2009 CSE30264 19 MP3 CD Quality 44.1 khz sampling rate 2 x 44.1 x 1000 x 16 = 1.41 Mbps 49/16 x 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 Spring 2009 CSE30264 20 7