Foundation of Video Coding Part I: Overview and Binary Encoding

Similar documents
Reading.. IMAGE COMPRESSION- I IMAGE COMPRESSION. Image compression. Data Redundancy. Lossy vs Lossless Compression. Chapter 8.

Information, Entropy, and Coding

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Arithmetic Coding: Introduction

Probability Interval Partitioning Entropy Codes

On the Use of Compression Algorithms for Network Traffic Classification

Image Compression through DCT and Huffman Coding Technique

Gambling and Data Compression

Compression techniques

CHAPTER 2 LITERATURE REVIEW

Design of Efficient Algorithms for Image Compression with Application to Medical Images

LECTURE 4. Last time: Lecture outline

FUNDAMENTALS of INFORMATION THEORY and CODING DESIGN

Video Coding Basics. Yao Wang Polytechnic University, Brooklyn, NY11201

An Introduction to Information Theory

Conceptual Framework Strategies for Image Compression: A Review

Introduction to Medical Image Compression Using Wavelet Transform

Streaming Lossless Data Compression Algorithm (SLDC)

Introduction to Probability

On the Many-to-One Transport Capacity of a Dense Wireless Sensor Network and the Compressibility of Its Data

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Data Storage 3.1. Foundations of Computer Science Cengage Learning

Chapter 1 Introduction

To determine vertical angular frequency, we need to express vertical viewing angle in terms of and. 2tan. (degree). (1 pt)

ANALYSIS OF THE EFFECTIVENESS IN IMAGE COMPRESSION FOR CLOUD STORAGE FOR VARIOUS IMAGE FORMATS

Introduction to image coding

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

DATA SECURITY USING PRIVATE KEY ENCRYPTION SYSTEM BASED ON ARITHMETIC CODING

Genetic Algorithms commonly used selection, replacement, and variation operators Fernando Lobo University of Algarve

Modified Golomb-Rice Codes for Lossless Compression of Medical Images

The enhancement of the operating speed of the algorithm of adaptive compression of binary bitmap images

Ex. 2.1 (Davide Basilio Bartolini)

Sachin Dhawan Deptt. of ECE, UIET, Kurukshetra University, Kurukshetra, Haryana, India

encoding compression encryption

CHAPTER 6. Shannon entropy

Linear Codes. Chapter Basics

Entropy and Mutual Information

MIMO CHANNEL CAPACITY

Capacity Limits of MIMO Channels

Analysis of Compression Algorithms for Program Data

Michael W. Marcellin and Ala Bilgin

INTERNATIONAL TELECOMMUNICATION UNION TERMINAL EQUIPMENT AND PROTOCOLS FOR TELEMATIC SERVICES

Transform-domain Wyner-Ziv Codec for Video

Comparison of different image compression formats. ECE 533 Project Report Paula Aguilera

Fast Arithmetic Coding (FastAC) Implementations

Computer Networks and Internets, 5e Chapter 6 Information Sources and Signals. Introduction

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 5 9/17/2008 RANDOM VARIABLES

Introduction to Data Compression

Video Coding Standards. Yao Wang Polytechnic University, Brooklyn, NY11201

LZ77. Example 2.10: Let T = badadadabaab and assume d max and l max are large. phrase b a d adadab aa b

MAS108 Probability I

FCE: A Fast Content Expression for Server-based Computing

Khalid Sayood and Martin C. Rost Department of Electrical Engineering University of Nebraska

THE SECURITY AND PRIVACY ISSUES OF RFID SYSTEM

Lossless Medical Image Compression using Predictive Coding and Integer Wavelet Transform based on Minimum Entropy Criteria

Class Notes CS Creating and Using a Huffman Code. Ref: Weiss, page 433

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


ST 371 (IV): Discrete Random Variables

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

Storage Optimization in Cloud Environment using Compression Algorithm

Statistical Modeling of Huffman Tables Coding

A NEW LOSSLESS METHOD OF IMAGE COMPRESSION AND DECOMPRESSION USING HUFFMAN CODING TECHNIQUES

Chapter 3: DISCRETE RANDOM VARIABLES AND PROBABILITY DISTRIBUTIONS. Part 3: Discrete Uniform Distribution Binomial Distribution

Study and Implementation of Video Compression Standards (H.264/AVC and Dirac)

Network Design Performance Evaluation, and Simulation #6

International Journal of Advanced Research in Computer Science and Software Engineering

A Catalogue of the Steiner Triple Systems of Order 19

CM0340 SOLNS. Do not turn this page over until instructed to do so by the Senior Invigilator.

Complexity-bounded Power Control in Video Transmission over a CDMA Wireless Network

e.g. arrival of a customer to a service station or breakdown of a component in some system.

Information Theory and Coding SYLLABUS


Number Systems and Radix Conversion

Indexing and Compression of Text

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Catch Me If You Can: A Practical Framework to Evade Censorship in Information-Centric Networks

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Lecture 2 Outline. EE 179, Lecture 2, Handout #3. Information representation. Communication system block diagrams. Analog versus digital systems

How To Improve Performance Of The H264 Video Codec On A Video Card With A Motion Estimation Algorithm

Lossless Data Compression Standard Applications and the MapReduce Web Computing Framework

Lossless Grey-scale Image Compression using Source Symbols Reduction and Huffman Coding

Video Encryption Exploiting Non-Standard 3D Data Arrangements. Stefan A. Kramatsch, Herbert Stögner, and Andreas Uhl

Diffusion and Data compression for data security. A.J. Han Vinck University of Duisburg/Essen April 2013

Random variables, probability distributions, binomial random variable

ELEC3028 Digital Transmission Overview & Information Theory. Example 1

Lecture 9: Introduction to Pattern Analysis

JPEG Image Compression by Using DCT

Bounded Cost Algorithms for Multivalued Consensus Using Binary Consensus Instances

Fuzzy Probability Distributions in Bayesian Analysis

How To Code With Cbcc (Cbcc) In Video Coding

Review Horse Race Gambling and Side Information Dependent horse races and the entropy rate. Gambling. Besma Smida. ES250: Lecture 9.

College of information technology Department of software

HIGH DENSITY DATA STORAGE IN DNA USING AN EFFICIENT MESSAGE ENCODING SCHEME Rahul Vishwakarma 1 and Newsha Amiri 2

1. (First passage/hitting times/gambler s ruin problem:) Suppose that X has a discrete state space and let i be a fixed state. Let

JPEG A Short Tutorial

INTRODUCTION TO DIGITAL SYSTEMS. IMPLEMENTATION: MODULES (ICs) AND NETWORKS IMPLEMENTATION OF ALGORITHMS IN HARDWARE

LARGE CLASSES OF EXPERTS

Analog Representations of Sound

Transcription:

Foundation of Video Coding Part I: Overview and Binary Encoding Yao Wang Polytechnic University, Brooklyn, NY11201 http://eeweb.poly.edu Based on: Y. Wang, J. Ostermann, and Y.-Q. Zhang, Video Processing and Communications, Prentice Hall, 2002.

Outline Overview of video coding systems Review of probability and information theory concepts Binary encoding Information theory bounds Huffman coding Arithmetic coding Yao Wang, 2006 Coding: Overview and Lossless Coding

Components in a Coding System Yao Wang, 2006 Coding: Overview and Lossless Coding 3

Video Coding Techniques Based on Different Source Models Waveform-based techniques Content-dependent-techniques Yao Wang, 2006 Coding: Overview and Lossless Coding 4

Statistical Characterization of Random Sources Source: a random sequence (discrete time random process), Ex 1: an image that follows a certain statistics F n represents the possible value of the n-th pixel of the image, n=(m,n) f n represents the actual value taken Ex 2: a video that follows a certain statistics F n represents the possible value of the n-th pixel of a video, n=(k,m,n) f n represents the actual value taken Continuous source: F n takes continuous values (analog image) Discrete source: F n takes discrete values (digital image) Stationary source: statistical distribution invariant to time (space) shift Probability distribution probability mass function (pmf) or probability density function (pdf): Joint pmf or pdf: Conditional pmf or pdf: Yao Wang, 2006 Coding: Overview and Lossless Coding 5

Entropy of a RV Consider RV F={f 1,f 2,,f K }, with probability p k =Prob.{F= f K } Self-Information of one realization f k : H k = -log(p k ) p k =1: always happen, no information P k ~0: seldom happen, its realization carries a lot of information Entropy = average information: Entropy is a measure of uncertainty or information content, unit=bits Very uncertain -> high information content Yao Wang, 2006 Coding: Overview and Lossless Coding 6

Example: Two Possible Symbols Example: Two possible outcomes Flip a coin, F={ head, tail }: p 1 =p 2 =1/2: H=1 (highest uncertainty) If the coin has defect, so that p 1 =1, p 2 =0: H=0 (no uncertainty) More generally: p 1 =p, p 2 =1-p, H=-(p log p+ (1-p) log (1-p)) 0 1/2 1 p Yao Wang, 2006 Coding: Overview and Lossless Coding 7

Another Example: English Letters 26 letters, each has a certain probability of occurrence Some letters occurs more often: a, s, t, Some letters occurs less often: q, z, Entropy ~= information you obtained after reading an article. But we actually don t get information at the alphabet level, but at the word level! Some combination of letters occur more often: it, qu, Yao Wang, 2006 Coding: Overview and Lossless Coding 8

Joint Entropy Joint entropy of two RVs: Uncertainty of two RVs together N-th order entropy Uncertainty of N RVs together Entropy rate (lossless coding bound) Average uncertain per RV Yao Wang, 2006 Coding: Overview and Lossless Coding 9

Conditional Entropy Conditional entropy between two RVs: Uncertainty of one RV given the other RV M-th order conditional entropy Yao Wang, 2006 Coding: Overview and Lossless Coding 10

Example: 4-symbol source Four symbols: a, b, c, d pmf: T p = [0.5000,0.2143,0.1703,0.1154] 1 st order conditional pmf: q ij =Prob(f i f j ) 2 nd order pmf: Ex. p(" ab") = p(" a") q(" b"/" a") = 0.5* 0.1875 = 0.0938 Go through how to compute H 1, H 2, H c,1. Yao Wang, 2006 Coding: Overview and Lossless Coding 11

Mutual Information Mutual information between two RVs : Information provided by G about F M-th order mutual information (lossy coding bound) Yao Wang, 2006 Coding: Overview and Lossless Coding 12

Lossless Coding (Binary Encoding) Binary encoding is a necessary step in any coding system Applied to original symbols (e.g. image pixels) in a discrete source, or converted symbols (e.g. quantized transformed coefficients) from a continuous or discrete source Binary encoding process (scalar coding) Symbol a i Binary Encoding Codeword c i (bit length l i ) Probability table p i Bit rate (bit/symbol): Yao Wang, 2006 Coding: Overview and Lossless Coding 13

Bound for Lossless Coding Scalar coding: Assign one codeword to one symbol at a time Problem: could differ from the entropy by up to 1 bit/symbol Vector coding: Assign one codeword for each group of N symbols Larger N -> Lower Rate, but higher complexity Conditional coding (context-based coding) The codeword for the current symbol depends on the pattern (context) formed by the previous M symbols Yao Wang, 2006 Coding: Overview and Lossless Coding 14

Binary Encoding: Requirement A good code should be: Uniquely decodable Instantaneously decodable prefix code Yao Wang, 2006 Coding: Overview and Lossless Coding 15

Huffman Coding Idea: more frequent symbols -> shorter codewords Algorithm: Huffman coding generate prefix code Can be applied to one symbol at a time (scalar coding), or a group of symbols (vector coding), or one symbol conditioned on previous symbols (conditional coding) Yao Wang, 2006 Coding: Overview and Lossless Coding 16

Huffman Coding Example: Scalar Coding Yao Wang, 2006 Coding: Overview and Lossless Coding 17

Huffman Coding Example: Vector Coding

Huffman Coding Example: Conditional Coding R H C," a" C," a" = 1.5625, R = 1.5016, H C," b" = C," b" = R C," c" H = C," c" R = C," d" H C," d" = 1.9375, R C,1 = 1.8829, H = 1.7500 C,1 = 1.6922 Yao Wang, 2006 Coding: Overview and Lossless Coding 19

Arithmetic Coding Basic idea: Represent a sequence of symbols by an interval with length equal to its probability The interval is specified by its lower boundary (l), upper boundary (u) and length d (=probability) The codeword for the sequence is the common bits in binary representations of l and u A more likely sequence=a longer interval=fewer bits The interval is calculated sequentially starting from the first symbol The initial interval is determined by the first symbol The next interval is a subinterval of the previous one, determined by the next symbol Yao Wang, 2006 Coding: Overview and Lossless Coding 20

P(a)=1/2 P(b)=1/4 P(c)=1/4 Encoding: 1/2 Decoding:

Implementation of Arithmetic Coding Previous example is meant to illustrate the algorithm in a conceptual level Require infinite precision arithmetic Can be implemented with finite precision or integer precision only For more details on implementation, see Witten, Neal and Cleary, Arithmetic coding for data compression, J. ACM (1987), 30:520-40 Sayood, Introduction to Data Compression, Morgan Kaufmann, 1996 Yao Wang, 2006 Coding: Overview and Lossless Coding 22

Huffman vs. Arithmetic Coding Huffman coding Convert a fixed number of symbols into a variable length codeword Efficiency: To approach entropy rate, must code a large number of symbols together Used in all image and video coding standards Arithmetic coding Convert a variable number of symbols into a variable length codeword Efficiency: N is sequence length Can approach the entropy rate by processing one symbol at a time Easy to adapt to changes in source statistics Integer implementation is available, but still more complex than Huffman coding with a small N Not widely adopted in the past (before year 2000) Used as advanced options in image and video coding standards Becoming standard options in newer standards (JPEG2000,H.264) Yao Wang, 2006 Coding: Overview and Lossless Coding 23

Summary Coding system: original data -> model parameters -> quantization-> binary encoding Waveform-based vs. content-dependent coding Characterization of information content by entropy Entropy, Joint entropy, conditional entropy Mutual information Lossless coding Bit rate bounded by entropy rate of the source Huffman coding: Scalar, vector, conditional coding can achieve the bound only if a large number of symbols are coded together Huffman coding generates prefix code (instantaneously decodable) Arithmetic coding Can achieve the bound by processing one symbol at a time More complicated than scalar or short vector Huffman coding Yao Wang, 2006 Coding: Overview and Lossless Coding 24

Homework Reading assignment: Sec. 8.1-8.4 (excluding Sec. 8.3.2,8.8.8) Written assignment Prob. 8.1,8.3,8.5,8.6,8.7 (for Prob. 8.7, you don t have to complete the encoding for the entire sequence. Do the first few letters.) Yao Wang, 2006 Coding: Overview and Lossless Coding 25