Introduction to Video Encoding

Similar documents
Introduction to Video Encoding

Image and video processing

Image and Video Coding I: Fundamentals

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

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

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

Cross Layer Protocol Design

EE 5359 H.264 to VC 1 Transcoding

CS 260: Seminar in Computer Science: Multimedia Networking

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

STUDY AND IMPLEMENTATION OF VIDEO COMPRESSION STANDARDS (H.264/AVC, DIRAC)

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

Image and Video Coding I: Fundamentals

White paper: Video Coding A Timeline

Week 14. Video Compression. Ref: Fundamentals of Multimedia

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

International Journal of Emerging Technology and Advanced Engineering Website: (ISSN , Volume 2, Issue 4, April 2012)

Video Compression An Introduction

MULTIMEDIA AND CODING

CMPT 365 Multimedia Systems. Media Compression - Video

EE 5359 Low Complexity H.264 encoder for mobile applications. Thejaswini Purushotham Student I.D.: Date: February 18,2010

High Efficiency Video Coding: The Next Gen Codec. Matthew Goldman Senior Vice President TV Compression Technology Ericsson

Mali GPU acceleration of HEVC and VP9 Decoder

Mark Kogan CTO Video Delivery Technologies Bluebird TV

CSCD 443/533 Advanced Networks Fall 2017

Digital Video Processing

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

Efficient MPEG-2 to H.264/AVC Intra Transcoding in Transform-domain

Lecture 7, Video Coding, Motion Compensation Accuracy

Multimedia Systems Video II (Video Coding) Mahdi Amiri April 2012 Sharif University of Technology

Building an Area-optimized Multi-format Video Encoder IP. Tomi Jalonen VP Sales

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

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

Using animation to motivate motion

An Improved H.26L Coder Using Lagrangian Coder Control. Summary

Objective: Introduction: To: Dr. K. R. Rao. From: Kaustubh V. Dhonsale (UTA id: ) Date: 04/24/2012

Comparative and performance analysis of HEVC and H.264 Intra frame coding and JPEG2000

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

VIDEO COMPRESSION STANDARDS

Compression; Error detection & correction

Obtaining video clips

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

The Scope of Picture and Video Coding Standardization

Wireless Communication

Parallelism In Video Streaming

The Perils of Preserving Digitized and Born-Digital Video

JPEG 2000 vs. JPEG in MPEG Encoding

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

Intra Prediction Efficiency and Performance Comparison of HEVC and VP9

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

MULTIMEDIA SYSTEMS

Computing in the Modern World

Diagnostic Instrumentation

Fundamentals of Video Compression. Video Compression

Rate Distortion Optimization in Video Compression

International Journal of Advance Research in Computer Science and Management Studies

Lecture 5: Error Resilience & Scalability

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

EE Low Complexity H.264 encoder for mobile applications

Computer and Machine Vision

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

Encoding Video for the Highest Quality and Performance

Overview, implementation and comparison of Audio Video Standard (AVS) China and H.264/MPEG -4 part 10 or Advanced Video Coding Standard

A COST-EFFICIENT RESIDUAL PREDICTION VLSI ARCHITECTURE FOR H.264/AVC SCALABLE EXTENSION

Investigation of the GoP Structure for H.26L Video Streams

Introduction to Video Coding

Implementation of H.264 Video Codec for Block Matching Algorithms

A Quantized Transform-Domain Motion Estimation Technique for H.264 Secondary SP-frames

VHDL Implementation of H.264 Video Coding Standard

Video Quality Analysis for H.264 Based on Human Visual System

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

Reducing/eliminating visual artifacts in HEVC by the deblocking filter.

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

06/12/2017. Image compression. Image compression. Image compression. Image compression. Coding redundancy: image 1 has four gray levels

VIDEO COMPRESSION. Image Compression. Multimedia File Formats. Lossy Compression. Multimedia File Formats. October 8, 2009

Lec 08 Video Signal Processing I

Compression and File Formats

Introduction to Video Compression

Testing HEVC model HM on objective and subjective way

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

CISC 7610 Lecture 3 Multimedia data and data formats

Intra Prediction Efficiency and Performance Comparison of HEVC and VP9

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

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

Georgios Tziritas Computer Science Department

High Efficiency Video Coding (HEVC) test model HM vs. HM- 16.6: objective and subjective performance analysis

WHITE PAPER ON2 TECHNOLOGIES, INC. TrueMotion VP7 Video Codec. January 10, 2005 Document Version: 1.0

Quicktime Player Error Codec For Avi Per

Digital video coding systems MPEG-1/2 Video

Professor, CSE Department, Nirma University, Ahmedabad, India

Implementation and analysis of Directional DCT in H.264

Image/video compression: howto? Aline ROUMY INRIA Rennes

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

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

Homogeneous Transcoding of HEVC for bit rate reduction

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

How an MPEG-1 Codec Works

A Novel Deblocking Filter Algorithm In H.264 for Real Time Implementation

Lecture Information Multimedia Video Coding & Architectures

THE H.264 ADVANCED VIDEO COMPRESSION STANDARD

Transcription:

Introduction to Video Encoding Preben N. Olsen University of Oslo and Simula Research Laboratory preben@simula.no August 26, 2013 1 / 37

Agenda 1 Introduction Repetition History Quality Assessment Containers 2 Video Encoding Fundamentals Macroblocks Frames Prediction Modes Motion Compensation Parallel Encoding 2 / 37

Repetition From first lecture... Media Compression Raw data is inconvenient, very large file sizes Compression reduces bandwidth and storage costs Image Representation Number of pixels, e.g., 1920 1080 Color representation per pixel Y UV (Y C b C r ) Color Space Y is the luma component (light intensity) U is a chroma component (color) V is a chroma component (color) Reduce file size by chroma sub-sampling 3 / 37

Repetition Figure : RGB and CMYK [1] 4 / 37

Repetition Figure : YUV Dissected, original [2] 5 / 37

Repetition Full HD YUV frame size... 1920 1080 24 bits 5.9 MB 6 / 37

Repetition Why not (buy and) download The Hobbit in full YUV format? 5.9 MB 48 FPS (162 60) Seconds 2.6 TB 7 / 37

Repetition Figure : YUV Data Layout, original [3] 8 / 37

Repetition Figure : JPG Block Diagram [1] 9 / 37

Repetition JPEG is short for Joint Photographic Experts Group There s a trade-off between size and quality in jpg images Compression rate of 1: 10 gives a reasonable result Lossless jpg encoding yields approx comp rate of 1: 1.6 10 / 37

History The MPEG is short for Motion Picture Expert Group Industry together with ISO and ITU develops standards MPEG-1 started in 1988, released in 1993 MPEG-2 started in 1990, released in 1996 11 / 37

History MPEG-3 was to include support for HDTV (1080p) MPEG-4 started in 1998, released between 1999-... Part 2 of MPEG-4 describes H.263 Advanced Simple Profile Sometimes referred to as DivX or Xvid 12 / 37

History Part 10 of MPEG-4 defines H.264, introduced in 2003 Twice the compression of H.263 (MPEG-4 ASP) Used by Blu-ray, Rikstv, Youtube, and many others Sometimes referred to as x264 This codec has 17 different profiles 13 / 37

History High Efficiency Video Coding or H.265 started in 2004 HVEC has better compression, same level of quality Released to the public on June 7th, 2013 [4] Supports Ultra High Definition TV (UHDTV), 7680 4320 14 / 37

Money and Politics Patent pool created by MPEG-LA About 1,500 patents related to H.264 Incentive for large, global companies 15 / 37

History Google bought On2, which initially developed VP8 VP8 spec. released with open-source implementation in 2010 Supported by many browsers and mobile platforms Ongoing development on VP9, a HVEC competitor 16 / 37

Quality Assessment Assessing video quality is difficult A group of people rate which version is best People have different opinions on quality Objective measurements can give an estimate Peak Signal-to-Noise Ratio (PSNR) Shell script for PSNR found in mplayer source tree 17 / 37

Containers File containers are not codecs Video codecs are used for encoding and decoding bitstreams Containers are used for packaging bitstreams Examples include Audio Video Interleave (AVI), Matroska (MKV), Video Objects (VOB), and OGG 18 / 37

Video Encoding Fundamentals 19 / 37

Figure : Overview of H.264/VP8 20 / 37

Macroblocks Figure : Missing macroblocks [5] 21 / 37

Macroblocks Different macroblock types and sizes 16 16 pixels, subdivided into 4 4 Intra-, predicted-, and bi-directional predicted macroblocks 22 / 37

Macroblocks Figure : Foreman and macroblocks 23 / 37

Also different frame types Frames Usually intra-predicted frames, predicted frames, and bi-directional predicted frames VP8 does not have bi-directional, but alt-ref and golden-frames Figure : Different frames [6] 24 / 37

Frames Predict the pixels of a macroblock using information available within a single frame. Prediction type 1 Intra-prediction 2 Inter-prediction 3 Bi-directional Typically predicts from left, top and top-left macroblock by interor extrapolating the border pixel s values. Different prediction modes available, e.g. horizontal, vertical, and average. 25 / 37

Frames Prediction type 1 Intra-prediction 2 Inter-prediction 3 Bi-directional Predict a macroblock by reusing pixels from another frame. Objects tend to move around in a video, and motion vectors are used to compensate for this. H.264 allows up to 16 reference frames, while VP8 only supports 3 frames. 26 / 37

Frames Prediction type 1 Intra-prediction 2 Inter-prediction 3 Bi-directional Predict the pixels of a macroblock using information available in other frames, both previous and upcoming frames; that is, going back and forward in time. Can reference every type of frame, including other bi-directional predicted frames. 27 / 37

Determining Prediction Modes The motion estimator tries many modes Different blocks are evaluated Two-step process, initial and refinement 28 / 37

Some Cost Functions Mean square error (MSE) Sum of Absolute Differences (SAD) Sum of Absolute Transformed Differences (SATD) SATD is more accurate than SAD 29 / 37

Motion Compensation With the best motion vector a predicted block is generated The original reference frame can not be used directly as input to the motion compensator as the decoder never sees the original image Decoder sees a reconstructed image, i.e., an image with loss A reconstructed reference image must be used as input 30 / 37

Parallel Encoding Approaches available both for intra- and inter-prediction Some give up compression efficiency for increased parallelism Pipeline approach shouldn t be combined with real-time reqs 31 / 37

What should be optimized? Parallel Encoding Figure : VP8 profiling 32 / 37

Parallel Encoding Figure : Group of Pictures [6] 33 / 37

Parallel Encoding Figure : Sliced-based approach 34 / 37

Conclusion Video encoding is mainly about trying (and failing) different prediction modes limited by user-defined restrictions (resource usage) The actual encoding of the video when the parameters are known usually accounts for a small percentage of the running time Any (reasonable) codec can produce the desired video quality - what differs between them is the size of the output bitstream they produce 35 / 37

The End 36 / 37

References Video & Image Compression Techniques: Image Coding Fundamentals http://goo.gl/6fck7n Wikipedia: YUV http://en.wikipedia.org/wiki/yuv Any To YUV: Documentation http://any2yuv.sourceforge.net/docs H.265: High efficiency video coding http://www.itu.int/rec/t-rec-h.265 BitBlit.Org http://www.bitblit.org/gsoc/g3dvl/ GOP (Group of Pictures) http://goo.gl/83d7hz 37 / 37