T.Sharon-A.Frank 1 Multimedia Compression Basics.

Slides:



Advertisements
Similar presentations
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Advertisements

Data Compression CS 147 Minh Nguyen.
Chapter 7 End-to-End Data
SWE 423: Multimedia Systems
School of Computing Science Simon Fraser University
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
SWE 423: Multimedia Systems
SWE 423: Multimedia Systems Chapter 7: Data Compression (1)
CSCI 3 Chapter 1.8 Data Compression. Chapter 1.8 Data Compression  For the purpose of storing or transferring data, it is often helpful to reduce the.
Spatial and Temporal Data Mining
Computer Science 335 Data Compression.
Data Compression Basics
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Department of Computer Engineering University of California at Santa Cruz Data Compression (2) Hai Tao.
2007Theo Schouten1 Compression "lossless" : f[x,y]  { g[x,y] = Decompress ( Compress ( f[x,y] ) | “lossy” : quality measures e 2 rms = 1/MN  ( g[x,y]
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.
Data dan Teknologi Multimedia Sesi 08 Nofriyadi Nurdam.
©Brooks/Cole, 2003 Chapter 15 Data Compression. ©Brooks/Cole, 2003 Realize the need for data compression. Differentiate between lossless and lossy compression.
Image Compression - JPEG. Video Compression MPEG –Audio compression Lossy / perceptually lossless / lossless 3 layers Models based on speech generation.
Trevor McCasland Arch Kelley.  Goal: reduce the size of stored files and data while retaining all necessary perceptual information  Used to create an.
Lecture 10 Data Compression.
Chapter 2 Source Coding (part 2)
Compression is the reduction in size of data in order to save space or transmission time. And its used just about everywhere. All the images you get on.
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.
 Coding efficiency/Compression ratio:  The loss of information or distortion measure:
LECTURE Copyright  1998, Texas Instruments Incorporated All Rights Reserved Encoding of Waveforms Encoding of Waveforms to Compress Information.
Video Basics. Agenda Digital Video Compressing Video Audio Video Encoding in tools.
MULTIMEDIA TECHNOLOGY SMM 3001 DATA COMPRESSION. In this chapter The basic principles for compressing data The basic principles for compressing data Data.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2011.
Multimedia Specification Design and Production 2012 / Semester 1 / L3 Lecturer: Dr. Nikos Gazepidis
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.
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.
Digital Image Processing Image Compression
Outline Kinds of Coding Need for Compression Basic Types Taxonomy Performance Metrics.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
Advances in digital image compression techniques Guojun Lu, Computer Communications, Vol. 16, No. 4, Apr, 1993, pp
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 6 – Basics of Compression (Part 1) Klara Nahrstedt Spring 2011.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
JPEG.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 11 COMPRESSION.
Multi-media Data compression
CS Spring 2012 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2012.
Page 1KUT Graduate Course Data Compression Jun-Ki Min.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
MPEG CODING PROCESS. Contents  What is MPEG Encoding?  Why MPEG Encoding?  Types of frames in MPEG 1  Layer of MPEG1 Video  MPEG 1 Intra frame Encoding.
1 Part A Multimedia Production Chapter 2 Multimedia Basics Digitization, Coding-decoding and Compression Information and Communication Technology.
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
IMAGE COMPRESSION.
Video Basics.
Data Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Discrete Cosine Transform
Data Compression.
Chapter 7.2: Layer 5: Compression
Data Compression CS 147 Minh Nguyen.
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.
UNIT IV.
Judith Molka-Danielsen, Oct. 02, 2000
Image Coding and Compression
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Chapter 8 – Compression Aims: Outline the objectives of compression.
Fundamentals of Video Compression
15 Data Compression Foundations of Computer Science ã Cengage Learning.
Presentation transcript:

T.Sharon-A.Frank 1 Multimedia Compression Basics

2 T.Sharon-A.Frank Compression Issues Storage and Bandwidth Requirements –Discrete media –Continuous media Compression Basics –Entropy –Source –Hybrid Compression Techniques –Image (JPEG) –Video (H.261, MPEG 1/2/4) –Audio (G.7xx)

3 T.Sharon-A.Frank Why Compress? Uncompressed data requires considerable storage capacity. Useful to compress static images. But critical for efficient delivery of video and audio. Without compression, not enough bandwidth to deliver a new screen image every 1/30 of a second.

4 Compression Concepts Compression ratio: size of original file divided by size of compressed file. Data quality: Lossy compression ignores information that the viewer may not miss and therefore information may be lost. Lossless compression preserves original data precisely. Compression speed: time it takes to compress/decompress.

5 T.Sharon-A.Frank Compression Requirements low delay Compression high quality Low complexity Efficient implementation Scalability Hardware/Software Assist high compression ratio

6 T.Sharon-A.Frank Storage Requirements for A4 A4 is 2.10 x 2.97 cm (8.27 x Inch)

7 T.Sharon-A.Frank Discrete Media – Size per Page

8 T.Sharon-A.Frank Continuous Media – Bandwidth

9 T.Sharon-A.Frank Video Compression Example (1) A full-screen 10-second video clip: –at 30 frames/sec * 10 = 300 frames –at 640x480 =.3072MB pixels per frame –at “true” color = 3 bytes per pixel –300 *.3072 * 3 = MB –…but…276.48MB takes up a lot of space. Cannot transfer 276MB in 10 seconds: –32X CD-ROM rate ~ 48MB in 10 sec –Hard disk rate ~ 330MB in 10 sec.

10 T.Sharon-A.Frank Video Compression Example (2) Therefore must compress: –There is video compression hardware –Most often, software is used. Video lends itself to compression –Small changes between images. Therefore good compression ratios. Thus in practice our 10 sec video clip takes up 14 MB or less.

11 T.Sharon-A.Frank Compression Techniques

12 Always possible to decompress compressed data and obtain an exact copy of the original uncompressed data. – Data is just more efficiently arranged, none discarded. Run-length encoding (RLE) Huffman coding Arithmetic coding Dictionary-based schemes – LZ77, LZ78, LZW (used in GIF) Lossless Compression

13 T.Sharon-A.Frank Coding Techniques – Entropy

14 T.Sharon-A.Frank Entropy Coding Data in data stream considered a simple digital sequence and semantics of data are ignored. Short Code words for frequently occurring symbols. Longer Code words for more infrequently occurring symbols –For example: E occurs frequently in English, so we should give it a shorter code than Q.

15 T.Sharon-A.Frank Run Length Encoding (RLE) Generalization of Zero Suppression. Runs (sequences) of data are stored as a single value and count, rather than the individual run. Example: –WWWWWWWWWWWWBWWWWWWWWWWWWBBBWWWWWW WWWWWWWWWWWWWWWWWWBWWWWWWWWWWWWWW –Becomes: 12WB12W3B24WB14W To avoid confusion, use flags + appearance counter Example: ABCCCCCCCCDEFGGG –Becomes: ABC!8DEFGGG ! is flag

16 T.Sharon-A.Frank One-dimensional RLE

17 T.Sharon-A.Frank Two-dimensional RLE

18 T.Sharon-A.Frank Huffman Coding Huffman coding gives optimal code given: –number of different symbols/characters –probability of each symbol/character. Shorter code is given to higher probability. Results in variable code size. Uses prefix code. Allows decoding at any random location. Commonly used as a final stage of compression.

19 T.Sharon-A.Frank Arithmetic Coding Encodes each symbol using previous ones. Encodes symbols as intervals. General method: –Each symbol divides the previous interval –Intervals are scaled. Encodes the entire message into a single number, a fraction n where (0.0 ≤ n < 1.0). Does not allow decoding at any random location. Also optimal.

20 T.Sharon-A.Frank Coding Techniques – Source

21 T.Sharon-A.Frank Source Encoding Takes semantics of data into account – amount of compression depends on data contents. This method is one where compressing data and then decompressing it retrieves data that may well be different from the original, but is "close enough" to be useful in some way. Used frequently on the Internet and especially in streaming media and telephony applications.

22 T.Sharon-A.Frank Prediction Coding Current sampled signal can be predicted based on the previous neighborhood samples. Prediction error has smaller entropy than original signal.

23 T.Sharon-A.Frank Prediction Coding Techniques Audio –PCM: Pulse Code Modulation (digitizing algorithm using logarithmic coding) –DPCM: Differential PCM –ADPCM: Adaptive DPCM –DM: Delta Modulation Video –MC: Motion Compensation

24 DPCM –Compute a predicted value for next sample, store the difference between prediction and actual value. –Used in digital telephone systems. –Also the standard form for digital audio in computers and various compact disk formats. ADPCM –Dynamically vary step size used to store quantized differences. DPCM/ADPCM

25 T.Sharon-A.Frank DPCM SignalDifferentially coded signal tt Predicted value = last sampled value + difference

26 T.Sharon-A.Frank Adapted Encoding (ADPCM) SignalDifferentially coded signal Predicted value extrapolated from previous values; prediction function is variable tt

27 T.Sharon-A.Frank Delta Modulation (DM) SignalDifferentially coded signal Difference coded with 1 bit tt

28 T.Sharon-A.Frank Transformation Coding FFT – Fast Fourier Transform DCT – Discrete Cosine Transform Transform time/spatial domain to frequency domain FDCT IDCT a x or t T c f Less significant coefficients Most significant coefficients possibly packed in lower frequencies with certain media types (e.g., images)

29 T.Sharon-A.Frank Transformation Example 2x2 array of pixels AB DC Transform X0 = A X1 = B – A X2 = C – A X3 = D – A Inverse Transform An = X0 Bn = X1 + X0 Cn = X2 + X0 Dn = X3 + X0

30 T.Sharon-A.Frank Layered Coding Encoding is done in/by layers Techniques: –Bit Position –Sub-sampling –Sub-band coding

31 T.Sharon-A.Frank Vector Quantization The data stream is divided to blocks called vectors. Table, called code-book –contains a set of patterns –may be predefined or dynamically constructed. Find best matching pattern in the table. Send table entry number instead of vector.

32 T.Sharon-A.Frank Principle of Vector Quantization Compressed data stream Code-book Original data stream

33 T.Sharon-A.Frank Vector Quantization with Error Transmission Compressed data stream Code-book Original data stream