Lecture 3 Image and Video (MPEG) Coding

Similar documents
Lecture 8 JPEG Compression (Part 3)

Lecture 8 JPEG Compression (Part 3)

Compression II: Images (JPEG)

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

What is multimedia? Multimedia. Continuous media. Most common media types. Continuous media processing. Interactivity. What is multimedia?

Week 14. Video Compression. Ref: Fundamentals of Multimedia

Digital Video Processing

Multimedia. What is multimedia? Media types. Interchange formats. + Text +Graphics +Audio +Image +Video. Petri Vuorimaa 1

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

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

Georgios Tziritas Computer Science Department

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

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

VC 12/13 T16 Video Compression

Ch. 4: Video Compression Multimedia Systems

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:

CMPT 365 Multimedia Systems. Media Compression - Image

Multimedia Standards

Features. Sequential encoding. Progressive encoding. Hierarchical encoding. Lossless encoding using a different strategy

Video Compression An Introduction

Digital Image Representation Image Compression

Video coding. Concepts and notations.

Image, video and audio coding concepts. Roadmap. Rationale. Stefan Alfredsson. (based on material by Johan Garcia)

DigiPoints Volume 1. Student Workbook. Module 8 Digital Compression

Wireless Communication

Audio and video compression

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

MPEG-4. Today we'll talk about...

Using animation to motivate motion

PREFACE...XIII ACKNOWLEDGEMENTS...XV

MPEG-4: Simple Profile (SP)

Cross Layer Protocol Design

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

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

The Core Technology of Digital TV

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

Lecture 6: Compression II. This Week s Schedule

CISC 7610 Lecture 3 Multimedia data and data formats

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

CS 335 Graphics and Multimedia. Image Compression

Stereo Image Compression

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

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

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

Introduction ti to JPEG

Index. 1. Motivation 2. Background 3. JPEG Compression The Discrete Cosine Transformation Quantization Coding 4. MPEG 5.

7.5 Dictionary-based Coding

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

Lecture Coding Theory. Source Coding. Image and Video Compression. Images: Wikipedia

Lecture 5: Compression I. This Week s Schedule

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

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

The Basics of Video Compression

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

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

Introduction to Video Compression

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

JPEG: An Image Compression System. Nimrod Peleg update: Nov. 2003

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

The Scope of Picture and Video Coding Standardization

Computer and Machine Vision

Digital video coding systems MPEG-1/2 Video

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

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio:

Optical Storage Technology. MPEG Data Compression

JPEG: An Image Compression System

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

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

CMPT 365 Multimedia Systems. Media Compression - Video

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

Multimedia Signals and Systems Motion Picture Compression - MPEG

MPEG-4: Overview. Multimedia Naresuan University

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

CMPT 365 Multimedia Systems. Media Compression - Video Coding Standards

LECTURE VIII: BASIC VIDEO COMPRESSION TECHNIQUE DR. OUIEM BCHIR

Bluray (

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

JPEG Compression. What is JPEG?

Digital Image Processing

Digital Image Representation. Image Representation. Color Models

IST MPEG-4 Video Compliant Framework

Anatomy of a Video Codec

DIGITAL TELEVISION 1. DIGITAL VIDEO FUNDAMENTALS

Lossy compression CSCI 470: Web Science Keith Vertanen Copyright 2013

VIDEO COMPRESSION STANDARDS

2.2: Images and Graphics Digital image representation Image formats and color models JPEG, JPEG2000 Image synthesis and graphics systems

Compression of Stereo Images using a Huffman-Zip Scheme

Introduction to LAN/WAN. Application Layer 4

MPEG-4 departs from its predecessors in adopting a new object-based coding:

EE Multimedia Signal Processing. Scope & Features. Scope & Features. Multimedia Signal Compression VI (MPEG-4, 7)

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

Lossy compression. CSCI 470: Web Science Keith Vertanen

Lecture 13 Video Coding H.264 / MPEG4 AVC

A HYBRID DPCM-DCT AND RLE CODING FOR SATELLITE IMAGE COMPRESSION

MPEG-4 AUTHORING TOOL FOR THE COMPOSITION OF 3D AUDIOVISUAL SCENES

Introduction to Video Coding

JPEG Modes of Operation. Nimrod Peleg Dec. 2005

10.2 Video Compression with Motion Compensation 10.4 H H.263

Video Coding Standards

Fundamentals of Video Compression. Video Compression

Transcription:

CS 598KN Advanced Multimedia Systems Design Lecture 3 Image and Video (MPEG) Coding Klara Nahrstedt Fall 2017

Overview JPEG Compression MPEG Basics MPEG-4 MPEG-7

JPEG COMPRESSION

JPEG Compression 8x8 blocks Source Image B G R DCT-based encoding FDCT Quantizer Entropy Encoder Compressed image data Table Table

Visualization of Basic FDCT Functions Increasing frequency Increasing frequency

Coefficient Differentiation F(0,0) includes the lowest frequency in both directions is called DC coefficient Determines fundamental color of the block F(0,1). F(7,7) are called AC coefficients Their frequency is non-zero in one or both directions

Quantization Throw out bits Consider example: 101101 2 = 45 (6 bits) We can truncate this string to 4 bits: 1011 2 = 11 We can truncate this string to 3 bits: 101 2 = 5 (original value 40) or 110 2 = 6 (original value 48) Uniform quantization is achieved by dividing DCT coefficients by N and round the result (e.g., above we used N=4 or N=8) In JPEG use quantization tables Fq(u,v) = F(u,v)/Quv Two quantization tables one for luminance and one for two chrominance components

De facto Quantization Table Eye becomes less sensitive 16 11 10 16 24 40 51 61 12 12 14 19 26 58 60 55 14 13 16 24 40 57 69 56 14 17 22 29 51 87 80 62 18 22 37 56 68 109 103 77 24 35 55 64 81 104 113 92 49 64 78 87 103 121 120 101 72 92 95 98 112 100 103 99 Eye becomes less sensitive

Entropy Encoding Compress sequence of quantized DC and AC coefficients from quantization step further increase compression, without loss Separate DC from AC components DC components change slowly, thus will be encoded using difference encoding

DC Encoding DC represents average intensity of a block encode using difference encoding scheme use 3x3 pattern of blocks Because difference tends to be near zero, can use less bits in the encoding categorize difference into difference classes send the index of the difference class, followed by bits representing the difference

Difference Coding applied to DC Coefficients

AC Encoding Use zig-zag ordering of coefficients orders frequency components from low->high produce maximal series of 0s at the end Ordering helps to apply efficiently entropy encoding Apply Huffman coding Apply RLE on AC zero values

Huffman Encoding Sequence of DC difference indices and values along with RLE of AC coefficients Apply Huffman encoding to sequence Attach appropriate headers Finally have the JPEG image!

Interchange Format of JPEG

VIDEO MPEG-2 COMPRESSION FORMAT (BASICS)

Video MPEG Compression is Hybrid Coding RLE, Huffman Arithmetic Coding

MPEG General Information Goal: data compression MPEG (MPEG-1, MPEG-2, MPEG-4) defines video, audio coding and system data streams with synchronization MPEG information Aspect ratios: 1:1 (CRT), 4:3 (NTSC), 16:9 (HDTV) Refresh frequencies: 23.975, 24, 25, 29.97, 50, 59.94, 60 Hz

MPEG Image Preparation (Resolution and Dimension) MPEG defines exactly format Three components: Luminance and two chrominance components (2:1:1) YCbCr YCbCr is family of color spaces, Y is luma, Cb and Cr are blue-difference and red-difference chroma component Resolution of luminance comp:x1 768; Y1 576 pixels Pixel precision is 8 bits for each component Example of Video format: 352x240 pixels, 30 fps; chrominance components: 176x120 pixels

MPEG Image Preparation - Blocks Each image is divided into macro-blocks Macro-block : 16x16 pixels for luminance; 8x8 for each chrominance component Macro-blocks are useful for Motion Estimation

MPEG Video Processing Intra frames (same as JPEG) typically about 12 frames between I frames Predictive frames encode from previous I or P reference frame Bi-directional frames encode from previous and future I or P frames I B B P B B P B B P B B I

Selecting I, P, or B Frames Heuristics change of scenes should generate I frame limit B and P frames between I frames B frames are computationally intense Type Size Compress I 18K 7:1 P 6K 20:1 B 2.5K 50:1 Avg 4.8K 27:1

MPEG Video I-Frames Intra-coded images I-frames points of random access in MPEG stream I-frames use 8x8 blocks defined within Macro-block No quantization table for all DCT coefficients, only quantization factor

MPEG Video P-Frames Motion Estimation Method Predictive coded frames require information of previous I frame and or previous P frame for encoding/decoding For Temporary Redundancy we determine last P or I frame that is most similar to the block under consideration

Matching Methods SSD metric SSD N 1 i 0 ( xi yi ) 2 SAD metric SAD N 1 i 0 xi yi Minimum error represents best match must be below a specified threshold error and perceptual similarity not always correlated

Example of Finding Minimal SSD

Syntax of P Frame Addr: address the syntax of P frame Type: INTRA block is specified if no good match was found Quant: quantization value per macro-block (vary quantization to fine-tune compression) Motion Vector: a 2D vector used for motion compensation provides offset from coordinate position in target image to coordinates in reference image CBP(Coded Block Pattern): bit mask indicates which blocks are present

MPEG Video B Frames Bi-directionally Predictive-coded frames

MPEG Video Decoding 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

MPEG Video Quantization AC coefficients of B/P frames are usually large values, I frames have smaller values Adjust quantization If data rate increases over threshold, then quantization enlarges step size (increase quantization factor Q) If data rate decreases below threshold, then quantization decreases Q

MPEG-4

MPEG-4 Example ISO N3536 MPEG4

MPEG-4 Characteristics and Applications

Media Objects An object is called a media object real and synthetic images; analog and synthetic audio; animated faces; interaction Media objects have Spatial relationships Temporal relationships Compose media objects into a hierarchical representation form compound, dynamic scenes

MPEG-4 Example Media Object - Background Media Object -Player ISO N3536 MPEG4

Spatial Relationship - Composition (Scene Graph) Scene character furniture sprite voice desk globe ISO N3536 MPEG4

Temporal Relationships Composition stream (BIFS) has its own associated time base Composition timestamps specify at what time access units for composition must be ready at input of composition information decoder Timestamps are attached to each elementary stream Decoding timestamp (DTS) specifies at which time the access unit for media object should be ready at decoder input Composition timestamp (CTS) specifies time when object should be ready at the composition unit (compositor input).

Video Syntax Structure New MPEG-4 Aspect: Object-based layered syntactic structure

MPEG-4 Coding Architecture decoder decoder decoder

Examples of Base and Enhancement Layers

Coding of Objects Each VOP corresponds to an entity that after being coded is added to the bit stream Encoder sends together with VOP Composition information where and when each VOP is to be displayed Users are allowed to change the composition of the entire scene displayed by interacting with the composition information

Spatial Scalability VOP which is temporally coincident with I-VOP in the base layer, is encoded as P-VOP in the enhancement layer. VOP which is temporally coincident with P-VOP in the base layer is encoded as B-VOP in the enhancement layer.

Temporal Scalability

Composition (cont.) Encode objects in separate channels encode using most efficient mechanism transmit each object in a separate stream Composition takes place at the decoder, rather than at the encoder requires a binary scene description (BIFS) BIFS is low-level language for describing: hierarchical, spatial, and temporal relations

MPEG-4 Decoder Architecture Source: Batista et al, MPEG-4:A mulitmedia standard for the thrid millenium: Part 1, IEEE Multimedia, 1999

MPEG-4 Rendering ISO N3536 MPEG4

Synchronization Layer (timing and synchronization) Synchronization of elementary streams Elementary streams consist of access units which correspond to portions of stream with DTS and CTS Global timeline (high-resolution units) e.g., 600 units/sec Each continuous track specifies relation e.g., if a video is 30 fps, then a frame should be displayed every 33 ms. Others specify start/end time

MPEG-7

MPEG-7 Motivation Need for searching for audio-visual information Goal: input a picture of motorbike from Terminator II and get search results Efficiently search for video sequence where King Lear congratulates his assistants Input a whistle of a melody and find a song

MPEG-7 Description Standardization of core set of quantitative measures of audiovisual features, called Descriptors (D) structures of descriptors and their relationships, called Description Schemes (DS) A language, called Description Definition Language (DDL) Result: one can index and search for audiovisual material that has MPEG-7 metadata associated with it.

MPEG-7 Features Multimedia content description Set of methods and tools for different classes of multimedia content description Types of descriptions: Medium-based: Sampling rate, location of shot cuts, camera s focal length, etc Physical: physical loudness of sound,.. Perceptual: perceptual pitch Transcription: dialog transcriptions Architectural: domain of document structuralists Annotative: domain of human annotations

MPEG-7 Features Flexibility in data management Referencing - to parts of document, who document, series of documents Multimodality description of multimedia content in such a way as to allow queries based on visual descriptions to retrieve audio data and visa versa Applications description of stored, streamed, realtime, non-rt apps Source: Nack et all, MPEG-7, IEEE Multimedia 1999

MPEG-7 Features Globalization of data resources MPEG-7 resources can be Co-located with audio-visual material or Remote - live somewhere else Need mechanisms to link audio-video material and MPEG-5 descriptions

MPEG-7 Features MPEG-7 does not extract descriptions/features automatically MPEG-7 concentrates on representations that can be used for descriptions MPEG-7 uses describing text documents such as SGML, XML (Extensible Markup Language), RDF (Resource Description Language) MPEG-4 and MPEG-7 are a pair of standards complementing each other

Summary MPEG is a very prevalent video coding format, especially in video-on-demand MPEG-1, MPEG-2 and MPEG-4 are content distribution systems MPEG-7 (and MPEG-21) are descriptionspecific systems to assist in representing metadata of e.g., MPEG-4 coded data and querying for MPEG coded data