Media Compression.

Slides:



Advertisements
Similar presentations
Multimedia System Video
Advertisements

MPEG Moving Picture Experts Group. What defines good video quality? Size of pictures Bitrate of channel medium (especially in real-time applications)
T.Sharon-A.Frank 1 Multimedia Compression Basics.
MPEG: A Video Compression Standard for Multimedia Applications Václav Hlaváč CTU Prague, Initial material were slides of Didier.
Image Compression. Data and information Data is not the same thing as information. Data is the means with which information is expressed. The amount of.
Basics of MPEG Picture sizes: up to 4095 x 4095 Most algorithms are for the CCIR 601 format for video frames Y-Cb-Cr color space NTSC: 525 lines per frame.
NUS.SOC.CS Roger Zimmermann (based on slides by Ooi Wei Tsang) MPEG + RTP.
1 Video Coding Concept Kai-Chao Yang. 2 Video Sequence and Picture Video sequence Large amount of temporal redundancy Intra Picture/VOP/Slice (I-Picture)
MPEG + RTP.
Source Coding for Video Application
Chapter 7 End-to-End Data
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.
Spring 2003CS 4611 Multimedia Outline Compression RTP Scheduling.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
Department of Computer Engineering University of California at Santa Cruz Video Compression Hai Tao.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
CSc 461/561 Multimedia Systems Part B: 2. Lossy Compression
CS :: Fall 2003 MPEG-1 Video (Part 1) Ketan Mayer-Patel.
T.Sharon-A.Frank 1 Multimedia Image Compression 2 T.Sharon-A.Frank Coding Techniques – Hybrid.
Nus.soc.cs5248 Ooi Wei Tsang Recent Papers from conferences.
1 Image and Video Compression: An Overview Jayanta Mukhopadhyay Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur,
CSE679: MPEG r MPEG-1 r MPEG-2. MPEG r MPEG: Motion Pictures Experts Group r Standard for encoding videos/movies/motion pictures r Evolving set of standards.
Image and Video Compression
Video Streaming via Transcoding Jianping Fan Department of Computer Science University of North Carolina at Charlotte Charlotte, NC 28223
{ Lossy Compression William Dayton Nick Trojanowski.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.
Introduction to JPEG Alireza Shafaei ( ) Fall 2005.
ECE472/572 - Lecture 12 Image Compression – Lossy Compression Techniques 11/10/11.
MPEG: A Video Compression Standard for Multimedia Applications Didier Le Gall Communications of the ACM Volume 34, Number 4 Pages 46-58, 1991.
1 Image Compression. 2 GIF: Graphics Interchange Format Basic mode Dynamic mode A LZW method.
MPEG-1 and MPEG-2 Digital Video Coding Standards Author: Thomas Sikora Presenter: Chaojun Liang.
MPEG: (Moving Pictures Expert Group) A Video Compression Standard for Multimedia Applications Seo Yeong Geon Dept. of Computer Science in GNU.
Video Compression Techniques By David Ridgway.
Image Processing and Computer Vision: 91. Image and Video Coding Compressing data to a smaller volume without losing (too much) information.
Codec structuretMyn1 Codec structure In an MPEG system, the DCT and motion- compensated interframe prediction are combined. The coder subtracts the motion-compensated.
June, 1999 An Introduction to MPEG School of Computer Science, University of Central Florida, VLSI and M-5 Research Group Tao.
Image Compression Supervised By: Mr.Nael Alian Student: Anwaar Ahmed Abu-AlQomboz ID: IT College “Multimedia”
8. 1 MPEG MPEG is Moving Picture Experts Group On 1992 MPEG-1 was the standard, but was replaced only a year after by MPEG-2. Nowadays, MPEG-2 is gradually.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Media Compression.
Compression video overview 演講者:林崇元. Outline Introduction Fundamentals of video compression Picture type Signal quality measure Video encoder and decoder.
Media signal Media format Last updated on June 15, 2010 Doug Young Suh
NUS.SOC.CS5248 Ooi Wei Tsang Systems Support for Continuous Media OOI WEI TSANG.
Spring 2000CS 4611 Multimedia Outline Compression RTP Scheduling.
NUS.SOC.CS5248 Ooi Wei Tsang Rate Adaptations. NUS.SOC.CS5248 Ooi Wei Tsang You are Here Network Encoder Sender Middlebox Receiver Decoder.
MPEG.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Rate Adaptations.
(B1) What are the advantages and disadvantages of digital TV systems? Hint: Consider factors on noise, data security, VOD etc. 1.
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.
NUS.SOC.CS Roger Zimmermann (based in part on slides by Ooi Wei Tsang) Rate Adaptations.
1 Introduction to Video Compression תשס"ט – 2009 דחיסת מולטימדיה – הנדסת מערכות תקשורת Part A Introduction to Video Compression תשס"ט – 2009 דחיסת מולטימדיה.
H. 261 Video Compression Techniques 1. H.261  H.261: An earlier digital video compression standard, its principle of MC-based compression is retained.
JPEG Compression What is JPEG? Motivation
Media Compression.
Multimedia Outline Compression RTP Scheduling Spring 2000 CS 461.
Algorithms in the Real World
Error Recovery.
JPEG Image Coding Standard
Rate Adaptations.
MPEG + RTP.
MPEG-1 Video Coding Standard
"Digital Media Primer" Yue-Ling Wong, Copyright (c)2013 by Pearson Education, Inc. All rights reserved.
Media Compression.
Video Compression - MPEG
CIS679: MPEG MPEG.
ENEE 631 Project Video Codec and Shot Segmentation
Standards Presentation ECE 8873 – Data Compression and Modeling
UNIT IV.
Chapter 8 – Compression Aims: Outline the objectives of compression.
MPEG-1 MPEG is short for the ‘Moving Picture Experts Group‘.
MPEG-1 MPEG is short for the ‘Moving Picture Experts Group‘.
Presentation transcript:

Media Compression

You are Here Encoder Decoder Middlebox Sender Receiver Network NUS.SOC.CS5248 Ooi Wei Tsang

Why compress? “Bandwidth Not Enough” “Disk Space Not Enough” Size of Uncompressed DVD Movie = NUS.SOC.CS5248 Ooi Wei Tsang

Why compress? “Bandwidth Not Enough” “Disk Space Not Enough” Size of Uncompressed DVD Movie = 720 x 576 x 3 x 25 x 60 x 120 = 208.6GB NUS.SOC.CS5248 Ooi Wei Tsang

JPEG Compression

Original Image (1153KB) 1:1

Original Image (1153KB) 3.5:1

Original Image (1153KB) 17:1

Original Image (1153KB) 27:1

Original Image (1153KB) 72:1

Original Image (1153KB) 192:1

Compression Ratio Quality Size Ratio Raw TIFF 1153KB 1:1 Zipped TIFF 1.2:1 Q=100 331KB 3.5:1 Q=70 67KB 17:1 Q=40 43KB 27:1 Q=10 16KB 72:1 Q=1 6KB 192:1 NUS.SOC.CS5248 Ooi Wei Tsang

Magic of JPEG Throw away information we cannot see Color information “High frequency signals” Rearrange data for good compression Use standard compression NUS.SOC.CS5248 Ooi Wei Tsang

Discard color information Y YUV is also known as LUV or YCbCr V U NUS.SOC.CS5248 Ooi Wei Tsang

Color Sub-sampling 4:4:4 4:2:0 4:2:2 4:1:1 420 is used by MPEG. 411 is used by DV. 4:2:2 4:1:1 NUS.SOC.CS5248 Ooi Wei Tsang

4:2:2 Sub-sampling Y V U YUV is also known as LUV or YCbCr NUS.SOC.CS5248 Ooi Wei Tsang

Original Image (1153KB) 4:2:0

Original Image (1153KB) “4:1:0”

Discrete Cosine Transform Demo NUS.SOC.CS5248 Ooi Wei Tsang

Quantization DC 242 65 23 5 8 8 8 8 30 8 2 -54 -10 -4 -2 8 8 8 16 -6 -1 / = 13 6 3 5 8 8 16 32 1 2 1 -1 -2 8 16 32 64 Quantization Table AC NUS.SOC.CS5248 Ooi Wei Tsang

Differential Coding 30 8 6 -1 2 1 25 3 2 1 4 27 3 2 1 4 30 8 6 -1 2 1 1 25 3 2 1 4 27 3 2 1 4 30 8 6 -1 2 1 -5 3 2 1 4 2 3 1 4 NUS.SOC.CS5248 Ooi Wei Tsang

Zig-zag ordering 27 3 2 1 4 27, 3, 2, 4, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 NUS.SOC.CS5248 Ooi Wei Tsang

Run-Length Encoding 27 3 2 1 4 27, 3, 2, 4, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 (27, 1) (3, 1) (2, 1), (4, 1), (1, 2), (0, 5), (1, 1), (0, 4) NUS.SOC.CS5248 Ooi Wei Tsang

Idea: Motion JPEG Compress every frame in a video as JPEG DVD-quality video = 208.6GB Reduction ratio = 27:1 Final size = 7.7GB NUS.SOC.CS5248 Ooi Wei Tsang

Video Compression

Temporal Redundancy NUS.SOC.CS5248 Ooi Wei Tsang

Motion Estimation NUS.SOC.CS5248 Ooi Wei Tsang

Bi-directional Prediction NUS.SOC.CS5248 Ooi Wei Tsang

Watch for Motion Vectors Demo NUS.SOC.CS5248 Ooi Wei Tsang

H.261 P-Frame I-Frame NUS.SOC.CS5248 Ooi Wei Tsang

MPEG-1 B-Frame NUS.SOC.CS5248 Ooi Wei Tsang

MPEG Frame Pattern Example display sequence: IBBPBBP … Example encoding sequence: IPBBPBB NUS.SOC.CS5248 Ooi Wei Tsang

Compression Ratio Frame Type Typical Ratio I 10:1 P 20:1 B 50:1 NUS.SOC.CS5248 Ooi Wei Tsang

Sequence sequence header: width height frame rate bit rate : NUS.SOC.CS5248 Ooi Wei Tsang

GOP: Group of Picture gop header: time : NUS.SOC.CS5248 Ooi Wei Tsang

Picture pic header: number type (I,P,B) : NUS.SOC.CS5248 Ooi Wei Tsang

Picture NUS.SOC.CS5248 Ooi Wei Tsang

Slice NUS.SOC.CS5248 Ooi Wei Tsang

Macroblock NUS.SOC.CS5248 Ooi Wei Tsang

Block Y U 1 Macroblock = V NUS.SOC.CS5248 Ooi Wei Tsang

For I-Frame Every macroblock is encoded independently (“I-macroblock”) NUS.SOC.CS5248 Ooi Wei Tsang

For P-Frame Every macroblock is either I-macroblock a motion vector + error terms wrt a prev I/P-frame (“P-macroblock”) NUS.SOC.CS5248 Ooi Wei Tsang

For B-Frame Every macroblock is either I-macroblock P-macroblock a motion vector + error terms wrt a future I/P-frame 2 motion vectors + error terms wrt a prev/future I/P-frame NUS.SOC.CS5248 Ooi Wei Tsang

Review: MPEG structure Sequence GOP Picture Slice Macroblock Block NUS.SOC.CS5248 Ooi Wei Tsang

MPEG Decoding (I-Frame) Entropy Decoding Dequantize 101000101 IDCT NUS.SOC.CS5248 Ooi Wei Tsang

MPEG Decoding (P-Frame) Entropy Decoding Dequantize 101000101 IDCT Prev Frame + NUS.SOC.CS5248 Ooi Wei Tsang

MPEG Decoding (B-Frame) Entropy Decoding Dequantize 101000101 Future Frame IDCT AVG Prev Frame + NUS.SOC.CS5248 Ooi Wei Tsang

There are more.. Half-pel Motion Prediction Skipped Macroblock etc. NUS.SOC.CS5248 Ooi Wei Tsang

MPEG in daily life MPEG Standards Bit-rate Usage MPEG-1 1.5Mbps VCD DVD, SVCD, HDTV MPEG-4 Scalable QuickTime, DivX;) NUS.SOC.CS5248 Ooi Wei Tsang

The Future: H.264 Same quality at half the rate How: Variable block size Multiple reference frame ... NUS.SOC.CS5248 Ooi Wei Tsang

Hands-On Download source code, compile and play with ffmpeg mpeg_stat Try different MPEG-1 encoding parameter NUS.SOC.CS5248 Ooi Wei Tsang

Impact on Systems Design How to package data into packets? How to deal with packet loss? How to deal with bursty traffic? How to predict decoding time? : NUS.SOC.CS5248 Ooi Wei Tsang