Video Compression. Representations. Multimedia Systems and Applications. Analog Video Representations. Digitizing. Digital Video Block Structure

Similar documents
Principles of Video Compression

H.261: A Standard for VideoConferencing Applications. Nimrod Peleg Update: Nov. 2003

Advanced Computer Networks

Multimedia Communications. Video compression

An Overview of Video Coding Algorithms

Motion Video Compression

Video coding standards

Multimedia Communications. Image and Video compression

Introduction to Video Compression Techniques. Slides courtesy of Tay Vaughan Making Multimedia Work

COMP 249 Advanced Distributed Systems Multimedia Networking. Video Compression Standards

ITU-T Video Coding Standards

Video 1 Video October 16, 2001

Overview: Video Coding Standards

Chapter 10 Basic Video Compression Techniques

Chapter 2 Introduction to

AUDIOVISUAL COMMUNICATION

The H.26L Video Coding Project

Multimedia Systems. Part 13. Mahdi Vasighi

Video compression principles. Color Space Conversion. Sub-sampling of Chrominance Information. Video: moving pictures and the terms frame and

ITU-T Video Coding Standards H.261 and H.263

Audio and Video II. Video signal +Color systems Motion estimation Video compression standards +H.261 +MPEG-1, MPEG-2, MPEG-4, MPEG- 7, and MPEG-21

Module 8 VIDEO CODING STANDARDS. Version 2 ECE IIT, Kharagpur

Video (Fundamentals, Compression Techniques & Standards) Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011

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

Multimedia. Course Code (Fall 2017) Fundamental Concepts in Video

Digital Image Processing

Implementation of an MPEG Codec on the Tilera TM 64 Processor

Part II Video. General Concepts MPEG1 encoding MPEG2 encoding MPEG4 encoding

The H.263+ Video Coding Standard: Complexity and Performance

Ch. 1: Audio/Image/Video Fundamentals Multimedia Systems. School of Electrical Engineering and Computer Science Oregon State University

MULTIMEDIA TECHNOLOGIES

Module 8 VIDEO CODING STANDARDS. Version 2 ECE IIT, Kharagpur

06 Video. Multimedia Systems. Video Standards, Compression, Post Production

MPEGTool: An X Window Based MPEG Encoder and Statistics Tool 1

PAL uncompressed. 768x576 pixels per frame. 31 MB per second 1.85 GB per minute. x 3 bytes per pixel (24 bit colour) x 25 frames per second

Contents. xv xxi xxiii xxiv. 1 Introduction 1 References 4

So far. Chapter 4 Color spaces Chapter 3 image representations. Bitmap grayscale. 1/21/09 CSE 40373/60373: Multimedia Systems

yintroduction to video compression ytypes of frames ysome video compression standards yinvolves sending:

SUMMIT LAW GROUP PLLC 315 FIFTH AVENUE SOUTH, SUITE 1000 SEATTLE, WASHINGTON Telephone: (206) Fax: (206)

Joint Optimization of Source-Channel Video Coding Using the H.264/AVC encoder and FEC Codes. Digital Signal and Image Processing Lab

Lecture 1: Introduction & Image and Video Coding Techniques (I)

Digital Media. Daniel Fuller ITEC 2110

Digital Video Telemetry System

Intra-frame JPEG-2000 vs. Inter-frame Compression Comparison: The benefits and trade-offs for very high quality, high resolution sequences

ELEC 691X/498X Broadcast Signal Transmission Fall 2015

Midterm Review. Yao Wang Polytechnic University, Brooklyn, NY11201

A video signal consists of a time sequence of images. Typical frame rates are 24, 25, 30, 50 and 60 images per seconds.

INTERNATIONAL TELECOMMUNICATION UNION. SERIES H: AUDIOVISUAL AND MULTIMEDIA SYSTEMS Coding of moving video

A Novel Approach towards Video Compression for Mobile Internet using Transform Domain Technique

Lecture 2 Video Formation and Representation

ATSC vs NTSC Spectrum. ATSC 8VSB Data Framing

Electronic Publishing

Analog and Digital Video Basics

Chapter 3 Fundamental Concepts in Video. 3.1 Types of Video Signals 3.2 Analog Video 3.3 Digital Video

Research Topic. Error Concealment Techniques in H.264/AVC for Wireless Video Transmission in Mobile Networks

Content storage architectures

MPEG + Compression of Moving Pictures for Digital Cinema Using the MPEG-2 Toolkit. A Digital Cinema Accelerator

INTERNATIONAL TELECOMMUNICATION UNION

Analog and Digital Video Basics. Nimrod Peleg Update: May. 2006

FEC FOR EFFICIENT VIDEO TRANSMISSION OVER CDMA

Essence of Image and Video

MPEG-2. Lecture Special Topics in Signal Processing. Multimedia Communications: Coding, Systems, and Networking

5.1 Types of Video Signals. Chapter 5 Fundamental Concepts in Video. Component video

Distributed Multimedia Systems. 2.Coding. László Böszörményi Distributed Multimedia Systems Coding - 1

Into the Depths: The Technical Details Behind AV1. Nathan Egge Mile High Video Workshop 2018 July 31, 2018

Lecture 23: Digital Video. The Digital World of Multimedia Guest lecture: Jayson Bowen

OL_H264MCLD Multi-Channel HDTV H.264/AVC Limited Baseline Video Decoder V1.0. General Description. Applications. Features

Part1 박찬솔. Audio overview Video overview Video encoding 2/47

The Multistandard Full Hd Video-Codec Engine On Low Power Devices

Study of AVS China Part 7 for Mobile Applications. By Jay Mehta EE 5359 Multimedia Processing Spring 2010

Multimedia Communication Systems 1 MULTIMEDIA SIGNAL CODING AND TRANSMISSION DR. AFSHIN EBRAHIMI

Motion Re-estimation for MPEG-2 to MPEG-4 Simple Profile Transcoding. Abstract. I. Introduction

Video Over Mobile Networks

1997 Digital Signal Processing Solutions

Transitioning from NTSC (analog) to HD Digital Video

AN MPEG-4 BASED HIGH DEFINITION VTR

Video Compression Basics. Nimrod Peleg Update: Dec. 2003

Chapter 2 Video Coding Standards and Video Formats

MPEG has been established as an international standard

Reduced complexity MPEG2 video post-processing for HD display

FINAL REPORT PERFORMANCE ANALYSIS OF AVS-M AND ITS APPLICATION IN MOBILE ENVIRONMENT

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

Video coding. Summary. Visual perception. Hints on video coding. Pag. 1

Video signals are separated into several channels for recording and transmission.

A Low-Power 0.7-V H p Video Decoder

Film Grain Technology

To discuss. Types of video signals Analog Video Digital Video. Multimedia Computing (CSIT 410) 2

Error concealment techniques in H.264 video transmission over wireless networks

Chrominance Subsampling in Digital Images

COMP 9519: Tutorial 1

Understanding IP Video for

OVE EDFORS ELECTRICAL AND INFORMATION TECHNOLOGY

Module 1: Digital Video Signal Processing Lecture 5: Color coordinates and chromonance subsampling. The Lecture Contains:

STUDY OF AVS CHINA PART 7 JIBEN PROFILE FOR MOBILE APPLICATIONS

Performance Evaluation of Error Resilience Techniques in H.264/AVC Standard

Chapter 6 & Chapter 7 Digital Video CS3570

An Efficient Low Bit-Rate Video-Coding Algorithm Focusing on Moving Regions

4 H.264 Compression: Understanding Profiles and Levels

Computer and Machine Vision

Multicore Design Considerations

Transcription:

Representations Multimedia Systems and Applications Video Compression Composite NTSC - 6MHz (4.2MHz video), 29.97 frames/second PAL - 6-8MHz (4.2-6MHz video), 50 frames/second Component Separation video (luma, chroma) - svhs, Hi8mm RGB, YUV, YIQ, YC B C R - used for most compressed representations Separation video called s-video James Wang Some notes are adapted from Prof. Lawrence A. Rowe s original slides at http://www.bmrc.berkeley.edu/~larry 2 Analog Video Representations NTSC Y = 0.299R + 0.587G + 0.114B I = 0.596R - 0.275G - 0.321B Q = 0.212R - 0.523G + 0.311B composite = Y + Icos(Fsc t) + Qsin(Fsc t) PAL Y = 0.299R + 0.587G + 0.114B U = 0.492(B-Y) V = 0.877(R-Y) composite = Y + Usin(Fsc t) + Vcos(Fsc t) Digitizing Analog TV is a continuous signal Digital TV uses discrete numeric values Signal is sampled Samples are quantized Small, discrete regions are digitized Image represented by pixel array 3 4 Digital Video Block Structure 4:2:2 YC B C R 16x16 macroblock 8x8 pixel blocks Y 1 Y 3 Y 2 Y 4 C B1 C B2 8 bits/sample = 16 bits/pixel = 4Kbits/macroblock 4:1:1 YC B C R 3Kbits/macroblock 12 bits/pixel macroblock Y 1 Y 2 Y 3 C B C R Y 4 C R1 C R2 What is Video Data Rate? Digital 720x483 = 347,760 pixels/frame 4:2:2 sampling gives 695,520 bytes/frame 21 MB/sec (167 Mbs) 4:4:4 sampling gives 250 Mbs ATV (MPEG MP@ML) 1280x720 = 921,600 pixels/frame 4:2:0 sampling gives 1,382,400 bytes/frame 41 MB/sec (328 Mbs) 5 6 (Note: MPEG coded streams are 1.5-80 Mbs) 1

What is Video Data Rate (cont.)? ATSC (720P) 720x1280 = 921,600 pixels per frame 4:2:2 sampling = 1,843,200 bytes per frame 24 fps = 44,236,800 bytes per second 44 MB/s = 354 Mbs ATSC (studio 1080I) 1080x1920 = 2,073,600 pixels per frame 4:4:4 sampling = 6,220,800 bytes per frame 30 fps = 186,624,000 bytes per second 187MB/s = 1.5 Gbs Human Perception What is smooth motion Depends on source material Most action is perceived as smooth at 24 fps Human most sensitive Low frequencies Changes in luminance and blue-orange axis Vision emphasizes edge detection Strong bias to horizontal and vertical lines Visual masking by large luminance changes 7 8 H. 261 Overview of H. 261 Developed by CCITT (Consultative Committee for International Telephone and Telegraph) in 1988-1990 Frame Sequence 9 Designed for videoconferencing, videotelephone applications over ISDN telephone lines. Bit-rate is p x 64 Kb/sec, where p ranges from 1 to 30. 10 Frame types are CCIR 601 CIF (352 x 288) and QCIF (176 x 144) images with 4:2:0 sub-sampling. Two frame types: Intra-frames (I-frames) and Interframes (P-frames): I-frame provides an accessing point, it uses basically JPEG. P-frames use "pseudo-differences" from previous frame ("predicted"), so frames depend on each other. Intra-frame Coding Intra-frame Coding Macroblocks are 16 x 16 pixel areas on Y plane of original image. A macroblock usually consists of 4 Y blocks, 1 Cr block, and 1 Cb block. Quantization is by constant value for all DCT coefficients (i.e., no quantization table as in JPEG). 11 12 2

Inter-frame (P-frame) Coding A Coding Example (P-frame) Inter-frame (P-frame) Coding Previous image is called reference image, the image to encode is called target image. Points to emphasize: 1. The difference image (not the target image itself) is encoded. 2. Need to use the decoded image as reference image, not the original. 3. We're using "Mean Absolute Error" (MAE) to decide best block. Can also use "Mean Squared Error" (MSE) = sum(e*e)/n 13 14 H. 261 Encoder H. 261 Encoder 15 Control" -- controlling the bit-rate. If the transmission buffer is too full, then bit-rate will be reduced by changing the quantization factors. "memory" -- used to store the reconstructed image (blocks) for the purpose of motion vector search for the next P-frame. 16 C(x + k, y + l) -- pixels in the macro block with upper left corner (x, y) in the Target frame. R(x + i + k, y + j + l) -- pixels in the macro block with upper left corner (x + i, y + j) in the Reference frame. Cost function is: where MAE stands for Mean Absolute Error. Goal is to find a vector (u, v) such that MAE(u, v) is minimum. 17 18 3

19 Full Search Method Sequentially search the whole [-p, p] region --> very slow Two-Dimensional Logarithmic Search Similar to binary search. MAE function is initially computed within a window of [-p/2, p/2] at nine locations as shown in the figure. Repeat until the size of the search region is one pixel wide: 1. Find one of the nine locations that yields the minimum MAE 2. Form a new searching region with half of the previous size and centred at the location found in step 1. 20 Hierarchical Motion Estimation Hierarchical Motion Estimation 1. Form several low resolution version of the target and reference pictures 2. Find the best match motion vector in the lowest resolution version. 3. Modify the motion vector level by level when going up 21 22 Some Important Issues Details 23 Avoiding propagation of errors 1. Send an I-frame every once in a while 2. Make sure you use decoded frame for comparison Bit-rate control Simple feedback loop based on "buffer fullness" If buffer is too full, increase the quantization scale factor to reduce the data. 24 How the Macroblock is Coded? Many macroblocks will be exact matches (or close enough). So send address of each block in image --> Addr Sometimes no good match can be found, so send INTRA block --> Type Will want to vary the quantization to fine tune compression, so send quantization value -->Quant Motion vector --> vector Some blocks in macroblock will match well, others match poorly. So send bitmask indicating which blocks are present (Coded Block Pattern, or CBP). Send the blocks (4 Y, 1 Cr, 1 Cb) as in JPEG. 4

25 Details H. 261 Bitstream Structure 26 Details Need to delineate boundaries between pictures, so send Picture Start Code --> PSC Need timestamp for picture (used later for audio synchronization), so send Temporal Reference --> TR Is this a P-frame or an I-frame? Send Picture Type --> PType Picture is divided into regions of 11 x 3 macroblocks called Groups of Blocks --> GOB Might want to skip whole groups, so send Group Number (Grp #) Might want to use one quantization value for whole group, so send Group Quantization Value --> GQuant Generally, bitstream is designed so that we can skip data whenever possible and still remain unambiguous. H. 263 H. 263 27 H. 263 is an improved standard for low bitrate video, adopted in March 1996. As H. 261, it uses the transform coding for intra-frames and predictive coding for interframes. Advanced Options: Half-pixel precision in motion compensation Unrestricted motion vectors Syntax-based arithmetic coding Advanced prediction and PB-frames In addition to CIF and QCIF, H. 263 could also support SQCIF, 4CIF, and 16CIF. The following page is a summary of video formats supported by H. 261 and H. 263: 28 Video Formats Supported Video Luminance Chrominance H.261 H.263 Bit-rate (Mbit/s) Max bits allowed format Image Image support support (if uncompressed, per 30 fps) picture Resolution Resolution B / W Color (BPPmax, Kb) SQCIF 128 x 96 64 x 48 n/a Required 3 4.4 64 QCIF 176 x 144 88 x 72 Required Required 6.1 9.1 64 CIF 352 x 288 176 x 144 Optional Optional 24.3 36.5 256 4CIF 704 x 576 352 x 288 n/a Optional 97.3 146 512 16CIF 1408 x 1152 704 x 576 n/a Optional 389.3 583.9 1024 What is MPEG? MPEG "Motion Picture Coding Experts Group", established in 1988 to create standard for delivery of video and audio. MPEG-1 Target: VHS quality on a CD-ROM or Video CD (VCD) (352 x 240 + CD audio @ 1.5 Mbits/sec) Standard had three parts: Video, Audio, and System (control interleaving of streams) MPEG-1 Video Problem: some macroblocks need information not in the previous reference frame. Example: The darkened macroblock in Current frame does not have a good match from the Previous frame, but it will find a good match in the Next frame. 29 30 MPEG solution: add third frame type: bidirectional frame, or B-frame In B-frames, search for matching macroblocks in both past and future frames. 5

Typical pattern is MPEG-1 Video IBBPBBPBB IBBPBBPBB IBBPBBPBB Actual pattern is up to encoder, and need not be regular. Differences from H. 261 Larger gaps between I and P frames, so need to expand motion vector search range. To get better encoding, allow motion vectors to be specified to fraction of a pixel (1/2 pixel). Bitstream syntax must allow random access, forward/backward play, etc. Added notion of slice for synchronization after loss/corrupt data. Example: picture with 7 slices: 31 32 Differences from H. 261 Example of 7 slices: B Frame B frame macroblocks can specify two motion vectors (one to past and one to future), indicating result is to be averaged 33 34 MPEG-1 Compression Compression performance of MPEG 1 Type Size Compression I 18 KB 7:1 P 6 KB 20:1 B 2.5 KB 50:1 Avg 4.8 KB 27:1 MPEG Video Bitstream Public domain tool such as mpeg_stat and mpeg_bits is able to analyze an MPEG bitstream. 35 36 6

MPEG Video Bitstream MPEG Video Bitstream 37 Sequence Information 1. Video Params include width, height, aspect ratio of pixels, picture rate. 2. Bitstream Params are bit rate, buffer size, and constrained parameters flag (means bitstream can be decoded by most hardware) 3. Two types of QTs: one for intra-coded blocks (I-frames) and one for inter-coded blocks (P-frames). Group of Pictures (GOP) information 1. Time code: bit field with SMPTE time code (hours, minutes, seconds, frame). 2. GOP Params are bits describing structure of GOP. Is GOP closed? Does it have a dangling pointer broken? Picture Information 1. Type: I, P, or B-frame? 2. Buffer Params indicate how full decoder's buffer should be before starting decode. 3. Encode Params indicate whether half pixel motion vectors are used. 38 Slice Information 1. Vert Pos: what line does this slice start on? 2. QScale: How is the quantization table scaled in this slice? Marcoblock (MB) Information 1. Addr Incr: number of MBs to skip. 2. Type: Does this MB use a motion vector? What type? 3. QScale: How is the quantization table scaled in this MB? 4. Coded Block Pattern (CBP): bitmap indicating which blocks are coded. Decoding MPEG Video in Software Software Decoder goals: portable, multiple display types Breakdown of time Function % Time Parsing Bitstream 17.40% IDCT 14.20% Reconstruction 31.50% Dithering 24.50% Misc. Arith. 9.90% Other 2.70% 39 7