Week 14. Video Compression. Ref: Fundamentals of Multimedia

Similar documents
Chapter 10. Basic Video Compression Techniques Introduction to Video Compression 10.2 Video Compression with Motion Compensation

10.2 Video Compression with Motion Compensation 10.4 H H.263

Using animation to motivate motion

Welcome Back to Fundamentals of Multimedia (MR412) Fall, 2012 Chapter 10 ZHU Yongxin, Winson

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

CMPT 365 Multimedia Systems. Media Compression - Video Coding Standards

CMPT 365 Multimedia Systems. Media Compression - Video

Chapter 11.3 MPEG-2. MPEG-2: For higher quality video at a bit-rate of more than 4 Mbps Defined seven profiles aimed at different applications:

MPEG-2. ISO/IEC (or ITU-T H.262)

LECTURE VIII: BASIC VIDEO COMPRESSION TECHNIQUE DR. OUIEM BCHIR

MPEG-4: Simple Profile (SP)

Video Compression Standards (II) A/Prof. Jian Zhang

Video Coding Standards. Yao Wang Polytechnic University, Brooklyn, NY11201 http: //eeweb.poly.edu/~yao

Digital Video Processing

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

MPEG-2. And Scalability Support. Nimrod Peleg Update: July.2004

The Scope of Picture and Video Coding Standardization

Lecture 6: Compression II. This Week s Schedule

Lecture 5: Error Resilience & Scalability

Video coding. Concepts and notations.

Laboratoire d'informatique, de Robotique et de Microélectronique de Montpellier Montpellier Cedex 5 France

Lecture 4: Video Compression Standards (Part1) Tutorial 2 : Image/video Coding Techniques. Basic Transform coding Tutorial 2

2014 Summer School on MPEG/VCEG Video. Video Coding Concept

Video Coding Standards

In the name of Allah. the compassionate, the merciful

Chapter 2 MPEG Video Compression Basics

5LSE0 - Mod 10 Part 1. MPEG Motion Compensation and Video Coding. MPEG Video / Temporal Prediction (1)

Multimedia Standards

Ch. 4: Video Compression Multimedia Systems

Multimedia Communications: Coding, Systems, and Networking. Prof. Tsuhan Chen H.261

Digital video coding systems MPEG-1/2 Video

COMP 249 Advanced Distributed Systems Multimedia Networking. The Video Data Type Coding & Compression Basics

Video Compression An Introduction

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

Outline Introduction MPEG-2 MPEG-4. Video Compression. Introduction to MPEG. Prof. Pratikgiri Goswami

VIDEO COMPRESSION STANDARDS

Advanced Video Coding: The new H.264 video compression standard

H.261. Lecture Special Topics in Signal Processing. Multimedia Communications: Coding, Systems, and Networking

Lecture 13 Video Coding H.264 / MPEG4 AVC

Audio and video compression

PREFACE...XIII ACKNOWLEDGEMENTS...XV

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

Introduction to Video Coding

Video Compression. Learning Objectives. Contents (Cont.) Contents. Dr. Y. H. Chan. Standards : Background & History

Video Codecs. National Chiao Tung University Chun-Jen Tsai 1/5/2015

Module 6 STILL IMAGE COMPRESSION STANDARDS

H.264/AVC und MPEG-4 SVC - die nächsten Generationen der Videokompression

EE 5359 H.264 to VC 1 Transcoding

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

Zonal MPEG-2. Cheng-Hsiung Hsieh *, Chen-Wei Fu and Wei-Lung Hung

THE H.264 ADVANCED VIDEO COMPRESSION STANDARD

A real-time SNR scalable transcoder for MPEG-2 video streams

Standard Codecs. Image compression to advanced video coding. Mohammed Ghanbari. 3rd Edition. The Institution of Engineering and Technology

ITU-T DRAFT H.263 VIDEO CODING FOR LOW BITRATE COMMUNICATION LINE TRANSMISSION OF NON-TELEPHONE SIGNALS. DRAFT ITU-T Recommendation H.

Introduction to Video Compression

Video Coding Standards: H.261, H.263 and H.26L

4G WIRELESS VIDEO COMMUNICATIONS

Video Coding in H.26L

Tutorial T5. Video Over IP. Magda El-Zarki (University of California at Irvine) Monday, 23 April, Morning

Lecture 3 Image and Video (MPEG) Coding

Lecture 5: Video Compression Standards (Part2) Tutorial 3 : Introduction to Histogram

Cross Layer Protocol Design

Multimedia Signals and Systems Motion Picture Compression - MPEG

Lecture 3: Image & Video Coding Techniques (II) & Standards (I) A/Prof. Jian Zhang

Video Transcoding Architectures and Techniques: An Overview. IEEE Signal Processing Magazine March 2003 Present by Chen-hsiu Huang

Fundamentals of Video Compression. Video Compression

VIDEO CODING STANDARDS FOR MULTIMEDIA COMMUNICATION 1. Video Coding Standards for Multimedia Communication: H.261, H.

Lesson 6. MPEG Standards. MPEG - Moving Picture Experts Group Standards - MPEG-1 - MPEG-2 - MPEG-4 - MPEG-7 - MPEG-21

Wireless Communication

Compression and File Formats

Review and Implementation of DWT based Scalable Video Coding with Scalable Motion Coding.

VIDEO AND IMAGE PROCESSING USING DSP AND PFGA. Chapter 3: Video Processing

Emerging H.26L Standard:

INTERNATIONAL TELECOMMUNICATION UNION ITU-T H.263 (03/96) TELECOMMUNICATION STANDARDIZATION SECTOR OF ITU TRANSMISSION OF NON-TELEPHONE SIGNALS VIDEO

Georgios Tziritas Computer Science Department

Comparative Study of Partial Closed-loop Versus Open-loop Motion Estimation for Coding of HDTV

The VC-1 and H.264 Video Compression Standards for Broadband Video Services

Introduction to Video Encoding

Selected coding methods in H.265/HEVC

CMPT 365 Multimedia Systems. Media Compression - Image

VC 12/13 T16 Video Compression

System Modeling and Implementation of MPEG-4. Encoder under Fine-Granular-Scalability Framework

High Efficiency Video Coding. Li Li 2016/10/18

Module 7 VIDEO CODING AND MOTION ESTIMATION

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

The Basics of Video Compression

Scalable Extension of HEVC 한종기

How an MPEG-1 Codec Works

Compressed-Domain Video Processing and Transcoding

Video Coding Standards: JPEG and MPEG

Efficient support for interactive operations in multi-resolution video servers

Complexity Estimation of the H.264 Coded Video Bitstreams

Motion Estimation. Original. enhancement layers. Motion Compensation. Baselayer. Scan-Specific Entropy Coding. Prediction Error.

Thanks for slides preparation of Dr. Shawmin Lei, Sharp Labs of America And, Mei-Yun Hsu February Material Sources

Lecture 8 JPEG Compression (Part 3)

Fernando Pereira. Instituto Superior Técnico

MPEG-2 Patent Portfolio License Illustrative Cross-Reference Chart Ctry. Patent No. Claims Category Description Standard Sections

LIST OF TABLES. Table 5.1 Specification of mapping of idx to cij for zig-zag scan 46. Table 5.2 Macroblock types 46

JPEG 2000 vs. JPEG in MPEG Encoding

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

Transcription:

Week 14 Video Compression Ref: Fundamentals of Multimedia

Last lecture review Prediction from the previous frame is called forward prediction Prediction from the next frame is called forward prediction P-frames: Predicted from previous p-frame or I-frame B-frame: bi-directionally predicted from the I or P frames B-frames are never used for prediction. 2

What is video? A sequence of images displayed at a high frequency to give illusion of motion! 3

Observation 1: Everything we observed for images! Color redundancy Spatial redundancy Spectral redundancy 4

Transform Coding T Q RLE E T: Transform Q: Quantizer RLE: Run Length Encoding E: Entropy coder 5

Observation 2: Content of consecutive frames is mostly similar! Temporal redundancy! 6

Predictive Coding Q RLE E Q -1 P Q:Quantizer Q -1 : Inverse quantizer P: Predictor 7

Hybrid Coding T Q RLE E Q -1 T -1 P 8

Hybrid Coding T Q RLE E Q -1 T -1 P ME 9

Video Coding Standards H.261 H.263 MPEG 1/2/4 H.264 10

H.261 The standard was designed for videophone, video conferencing. The video codec supports bit-rates of p x 64 kbps, where p ranges from 1 to 30 (Hence also known as p * 64). Require that the delay of the video encoder be less than 150 msec so that the video can be used for real-time bidirectional video conferencing. 11

Video Formats Supported by H.261 12

H.261 Frame Sequence 13

H.261 Frame Sequence Two types of image frames are defined: Intra-frames (I-frames) and Inter-frames (P-frames): - I-frames are treated as independent images. Transform coding method similar to JPEG is applied within each I-frame, hence Intra. - P-frames are not independent: coded by a forward predictive coding method (prediction from a previous P-frame is allowed not just from a previous I-frame). - Temporal redundancy removal is included in P-frame coding, whereas I- frame coding performs only spatial redundancy removal. - To avoid propagation of coding errors, an I-frame is usually sent a couple of times in each second of the video. 14

Motion vectors in H.261 are always measured in units of full pixel and they have a limited range of ± 15 pixels, i.e., p = 15! 15

Intra-frame (I-frame) Coding I-frame Coding. Macroblocks are of size 16 x 16 pixels for the Y frame, and 8 x 8 for Cb and Cr frames, since 4:2:0 chroma subsampling is employed. A macroblock consists of four Y, one Cb, and one Cr 8 x 8 blocks. For each 8 x 8 block a DCT transform is applied, the DCT coefficients then go through quantization zigzag scan and entropy coding. 16

P-frame Coding Based on Motion Compensation 17

Inter-frame (P-frame) Predictive Coding - For each macroblock in the Target frame, a motion vector is allocated by one of the search methods discussed earlier. - After the prediction, a difference macroblock is derived to measure the prediction error. - Each of these 8 x 8 blocks go through DCT, quantization, zigzag scan and entropy coding procedures. 18

What if no good match is found? Sometimes, a good match cannot be found, i.e., the prediction error exceeds a certain acceptable level. The MB itself is then encoded (treated as an Intra MB) and in this case it is termed a nonmotion compensated MB. 19

For a motion vector, the difference MVD is sent for entropy coding: MVD = MV Preceding MV Current 20

Quantization in H.261 The quantization in H.261 uses a constant step_size, for all DCT coefficients within a macroblock. If we use DCT and QDCT to denote the DCT coefficients before and after the quantization, then for DC coefficients in Intra mode: for all other coefficients: ( DCT ) DCT QDCT = round = round step _ size 8 QDCT DCT = DCT = step _ size 2* scale scale an integer in the range of [1, 31]. 21

Encoder and Decoder 22

Decoder 23

Data Flow at the Observation Points in H.261 Encoder Data Flow at the Observation Points in H.261 Decoder 24

A Glance at Syntax of H.261 Video Bitstream Syntax of H.261 video bitstream consists of a hierarchy of four layers: 1. Picture layer 2. Group of Blocks (GOB) layer 3. Macroblock layer 4. Block layer 25

Syntax of H.261 Video Bitstream. 26

The Picture layer PSC (Picture Start Code) delineates boundaries between pictures. TR (Temporal Reference) provides a time-stamp for the picture. 27

The GOB layer H.261 pictures are divided into regions of 11 x 3 macroblocks, each of which is called a Group of Blocks (GOB). For instance, the CIF image has 2 x 6 GOBs, corresponding to its image resolution of 352 x 288 pixels. Each GOB has its Start Code (GBSC) and Group number (GN). In case a network error causes a bit error or the loss of some bits, H.261 video can be recovered and resynchronized at the next identifiable GOB. GQuant indicates the Quantizer to be used in the GOB unless it is overridden by any subsequent MQuant (Quantizer for Macroblock). GQuant and MQuant are referred to as scale. 28

The Macroblock layer Each Macroblock (MB) has its own Address indicating its position within the GOB, Quantizer (MQuant), and six 8 x 8 image blocks (4 Y, 1 Cb, 1 Cr). 29

The Block layer For each 8 x 8 block, the bitstream starts with DC value, followed by pairs of length of zerorun (Run) and the subsequent non-zero value (Level) for ACs, and finally the End of Block (EOB) code. The range of Run is [0; 63]. Level reflects quantized values its range is [ 127, 127] and Level 0. 30

Arrangement of GOBs in H.261 Luminance Images 31

H.263 H.263 is an improved video coding standard for video conferencing Aims at low bit-rate communications at bit-rates of less than 64 kbps Uses predictive coding for inter-frames transform coding for the remaining 32

Video Formats Supported by H.263 33

Motion Vectors are predicted from the previous, above and above and right MBs MV1 MV2 MV3 MV MV Current Motion Vector MV1 Previous Motion Vector MV2 Above Motion Vector MV3 Above and Right Motion Vector 34

For the Macroblock with MV(u, v) the error vector (δu, δv) is coded δu = u u p δv = v v p u p = median(u 1, u 2, u 3 ), v p = median(v 1, v 2, v 3 ). 35

Half-pixel Prediction 36

Half-Pixel Precision In order to reduce the prediction error, half-pixel precision is supported in H.263 vs. full-pixel precision only in H.261. The default range for both the horizontal and vertical components u and v of MV(u, v) are now [ 16, 15.5]. The pixel values needed at half-pixel positions are generated by a simple bilinear interpolation method. 37

MPEG Overview MPEG: Moving Pictures Experts Group, established in 1988 for the development of digital video. It is appropriately recognized that proprietary interests need to be maintained within the family of MPEG standards: - Accomplished by defining only a compressed bitstream that implicitly defines the decoder. - The compression algorithms, and thus the encoders, are completely up to the manufacturers. 38

MPEG 1 storage and retrieval MPEG 2 digital TV MPEG4/H.264 storage and retrieval 39

Motion Compensation in MPEG-1 40

The Need for Bidirectional Search The MB containing part of a ball in the Target frame cannot find a good matching MB in the previous frame because half of the ball was occluded by another object. A match however can readily be obtained from the next frame. 41

B-frame Coding Based on Bidirectional Motion Compensation 2 42

MPEG Frame Sequence 43

GOBs are replaced by Slices 44

MPEG-1 Slices May contain variable numbers of macroblocks in a single picture. May also start and end anywhere as long as they fill the whole picture. Each slice is coded independently additional flexibility in bit-rate control. Slice concept is important for error recovery. 45

Different quantization tables for its Intra and Inter coding For DCT coefficients in Intra mode: 8 DCT[ i, j] 8 DCT[ i, j] QDCT[, i j] = round round step _ size[ i, j] = Q [ i, j]* scale 1 For DCT coefficients in Inter mode: 8 DCT[ i, j] 8 DCT[ i, j] QDCT[, i j] = step _ size[ i, j] = Q [ i, j]* scale 2 46

Default Quantization Table (Q 1 ) for Intra-Coding 8 16 19 22 26 27 29 34 16 16 22 24 27 29 34 37 19 22 26 27 29 34 34 38 22 22 26 27 29 34 37 40 22 26 27 29 32 25 40 48 26 27 29 32 35 40 48 58 26 27 29 34 38 46 56 69 27 29 35 38 46 56 69 83 Default Quantization Table (Q 2 ) for Inter-Coding 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 47

Half-pixel precision with an increased range of [ 512, 511.5] 48

Random access by GOP layer in which each GOP is time coded! I B B P B B P B B P B B I 49

Display Order I 1 B 1 B 2 P 1 B 3 B 4 P 2 B 5 B 6 P 3 B 7 B 8 I 2 Decoding Order I 1 P 1 B 2 P 2 P 3 I 2 B 1 B 3 B 4 B 5 B 6 B 7 B 8 50

Typical Sizes of MPEG-1 Frames Type Size Compression I 18kB 7:1 P 6kB 20:1 B 2.5kB 50:1 Avg 4.8kB 27:1 The typical size of compressed P-frames is significantly smaller than that of I-frames because temporal redundancy is exploited in inter-frame compression. B-frames are even smaller than P-frames because of (a) the advantage of bi-directional prediction and (b) the lowest priority given to B-frames. 51

Layers of MPEG-1 Video Bitstream. 52

MPEG2 For higher quality video at a bitrate of more than 4 Mbps! 53

MPEG-2 7 Profiles 1. Simple 2. Main 3. SNR scalable 4. Spatially scalable 5. High 6. 4:2:2 7. Multiview. 54

Supporting Interlaced Video Frame picture Top-field Bottom-field Field pictures 55

Supporting Interlaced Video MPEG-2 must support interlaced video as well since this is one of the options for digital broadcast TV and HDTV. In interlaced video each frame consists of two fields, referred to as the top-field and the bottom-field. In a Frame-picture, all scanlines from both fields are interleaved to form a single frame, then divided into 16 16 macroblocks and coded using MC. If each field is treated as a separate picture, then it is called Field-picture. 56

Five Modes of Predictions 1. Frame Prediction for Frame-pictures 2. Field Prediction for Field-pictures 3. Field Prediction for Frame-pictures 4. 16 8 MC for Field-pictures 5. Dual-Prime for P-pictures 57

MPEG-2 Scalabilities A base layer and one or more enhancement layers can be defined Useful for Networks with very different bit-rates. Networks with variable bit rate (VBR) channels. Networks with noisy connections. 58

MPEG-2 supports the following scalabilities 1. SNR Scalability enhancement layer provides higher SNR. 2. Spatial Scalability enhancement layer provides higher spatial resolution. 3. Temporal Scalability enhancement layer facilitates higher frame rate. 4. Hybrid Scalability combination of any two of the above three scalabilities. 5. Data Partitioning quantized DCT coefficients are split into partitions. 59

MPEG 2 Support of 4:2:2 and 4:4:4 chroma subsampling 60

Better resilience to bit-errors: In addition to Program Stream, a Transport Stream is added to MPEG-2 bit streams! 61

Two types of scales are allowed scale i = i & scale i i 62

MPEG-4 MPEG-4 departs from its predecessors in adopting a new object-based coding The bit-rate for MPEG-4 video now covers a large range between 5 kbps to 10 Mbps. 63

Composition MPEG-4 Videos (VOP = Video object plane) 64