SWE 423: Multimedia Systems Chapter 7: Data Compression (3)

Slides:



Advertisements
Similar presentations
Noise, Information Theory, and Entropy (cont.) CS414 – Spring 2007 By Karrie Karahalios, Roger Cheng, Brian Bailey.
Advertisements

EE 4780 Huffman Coding Example. Bahadir K. Gunturk2 Huffman Coding Example Suppose X is a source producing symbols; the symbols comes from the alphabet.
15-583:Algorithms in the Real World
Michael Alves, Patrick Dugan, Robert Daniels, Carlos Vicuna
Arithmetic Coding. Gabriele Monfardini - Corso di Basi di Dati Multimediali a.a How we can do better than Huffman? - I As we have seen, the.
Problem: Huffman Coding Def: binary character code = assignment of binary strings to characters e.g. ASCII code A = B = C =
Data Compression Michael J. Watts
School of Computing Science Simon Fraser University
CSc 461/561 CSc 461/561 Multimedia Systems Part B: 1. Lossless Compression.
SWE 423: Multimedia Systems
2015/6/15VLC 2006 PART 1 Introduction on Video Coding StandardsVLC 2006 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
SWE 423: Multimedia Systems Chapter 7: Data Compression (2)
Losslessy Compression of Multimedia Data Hao Jiang Computer Science Department Sept. 25, 2007.
Data Structures – LECTURE 10 Huffman coding
Lecture 4 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan
Fundamentals of Multimedia Chapter 7 Lossless Compression Algorithms Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
2015/7/12VLC 2008 PART 1 Introduction on Video Coding StandardsVLC 2008 PART 1 Variable Length Coding  Information entropy  Huffman code vs. arithmetic.
Lossless Compression - I Hao Jiang Computer Science Department Sept. 13, 2007.
Huffman Coding. Main properties : –Use variable-length code for encoding a source symbol. –Shorter codes are assigned to the most frequently used symbols,
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Lossless Compression in Multimedia Data Representation Hao Jiang Computer Science Department Sept. 20, 2007.
1 Lossless Compression Multimedia Systems (Module 2) r Lesson 1: m Minimum Redundancy Coding based on Information Theory: Shannon-Fano Coding Huffman Coding.
Data Compression Arithmetic coding. Arithmetic Coding: Introduction Allows using “fractional” parts of bits!! Used in PPM, JPEG/MPEG (as option), Bzip.
Basics of Compression Goals: to understand how image/audio/video signals are compressed to save storage and increase transmission efficiency to understand.
Information and Coding Theory
Noiseless Coding. Introduction Noiseless Coding Compression without distortion Basic Concept Symbols with lower probabilities are represented by the binary.
15-853Page :Algorithms in the Real World Data Compression II Arithmetic Coding – Integer implementation Applications of Probability Coding – Run.
1 Lossless Compression Multimedia Systems (Module 2 Lesson 2) Summary:  Adaptive Coding  Adaptive Huffman Coding Sibling Property Update Algorithm 
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 7 – Basics of Compression (Part 2) Klara Nahrstedt Spring 2011.
Page 110/6/2015 CSE 40373/60373: Multimedia Systems So far  Audio (scalar values with time), image (2-D data) and video (2-D with time)  Higher fidelity.
7. 1 Arithmetic vs. Huffman Most of Multimedia methods use Huffman coding. We should check why Huffman has been chosen: Error Resilience. Average Codeword's.
Basic Concepts of Encoding Codes, their efficiency and redundancy 1.
1 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204, Lecture 5.
Lossless Compression CIS 465 Multimedia. Compression Compression: the process of coding that will effectively reduce the total number of bits needed to.
DCSP-8: Minimal length coding I Jianfeng Feng Department of Computer Science Warwick Univ., UK
Introduction to Algorithms Chapter 16: Greedy Algorithms.
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 8. Greedy Algorithms.
Huffman coding Content 1 Encoding and decoding messages Fixed-length coding Variable-length coding 2 Huffman coding.
Huffman Code and Data Decomposition Pranav Shah CS157B.
Coding Theory Efficient and Reliable Transfer of Information
Data Compression Meeting October 25, 2002 Arithmetic Coding.
Abdullah Aldahami ( ) April 6,  Huffman Coding is a simple algorithm that generates a set of variable sized codes with the minimum average.
Dynamic programming vs Greedy algo – con’t Input: Output: Objective: a number W and a set of n items, the i-th item has a weight w i and a cost c i a subset.
CS Spring 2011 CS 414 – Multimedia Systems Design Lecture 6 – Basics of Compression (Part 1) Klara Nahrstedt Spring 2011.
Lecture 4: Lossless Compression(1) Hongli Luo Fall 2011.
CS654: Digital Image Analysis Lecture 34: Different Coding Techniques.
Bahareh Sarrafzadeh 6111 Fall 2009
Lossless Compression(2)
1 Source Coding and Compression Dr.-Ing. Khaled Shawky Hassan Room: C3-222, ext: 1204, Lecture 7 (W5)
CMPT365 Multimedia Systems 1 Arithmetic Coding Additional Material Spring 2015 CMPT 365 Multimedia Systems.
ENTROPY & RUN LENGTH CODING. Contents What is Entropy coding? Huffman Encoding Huffman encoding Example Arithmetic coding Encoding Algorithms for arithmetic.
Index construction: Compression of documents Paolo Ferragina Dipartimento di Informatica Università di Pisa Reading Managing-Gigabytes: pg 21-36, 52-56,
بسم الله الرحمن الرحيم My Project Huffman Code. Introduction Introduction Encoding And Decoding Encoding And Decoding Applications Applications Advantages.
Chapter 7 Lossless Compression Algorithms 7.1 Introduction 7.2 Basics of Information Theory 7.3 Run-Length Coding 7.4 Variable-Length Coding (VLC) 7.5.
Prof. Paolo Ferragina, Algoritmi per "Information Retrieval" Basics
Lossless Compression-Statistical Model Lossless Compression One important to note about entropy is that, unlike the thermodynamic measure of entropy,
UNIT I. Entropy and Uncertainty Entropy is the irreducible complexity below which a signal cannot be compressed. Entropy is the irreducible complexity.
Chapter 7 Lossless Compression Algorithms
Information theory Data compression perspective Pasi Fränti
Ch4. Zero-Error Data Compression Yuan Luo. Content  Ch4. Zero-Error Data Compression  4.1 The Entropy Bound  4.2 Prefix Codes  Definition and.
Data Compression Michael J. Watts
CSI-447: Multimedia Systems
Proving the Correctness of Huffman’s Algorithm
Context-based Data Compression
Chapter 8 – Binary Search Tree
Analysis & Design of Algorithms (CSCE 321)
Distributed Compression For Binary Symetric Channels
Homework #2 Due May 29 , Consider a (2,1,4) convolutional code with g(1) = 1+ D2, g(2) = 1+ D + D2 + D3 a. Draw the.
CSE 589 Applied Algorithms Spring 1999
Presentation transcript:

SWE 423: Multimedia Systems Chapter 7: Data Compression (3)

Outline Entropy Encoding –Arithmetic Coding

Entropy Encoding: Arithmetic Coding Initial idea introduced in 1948 by Shannon –Many researchers worked on this idea –Modern arithmetic coding can be attributed to Pasco (1976) and Rissanen and Langdon (1979) Arithmetic coding treats the whole message as one unit –In practice, the input data is usually broken up into chunks to avoid error propagation

Entropy Encoding: Arithmetic Coding A message is represented by a half-open interval [a,b), where a,b . –General idea of encoding Map the message into an open interval [a,b) Find a binary fractional number with minimum length that belongs to the above interval. This will be the encoded message –Initially, [a,b) = [0,1) –When the message becomes longer, the length of the interval shortens and the # of bits needed to represent the interval increases

Entropy Encoding: Arithmetic Coding Coding Algorithm Algorithm ArithmeticCoding // Input: symbol: Input stream of the message terminator: terminator symbol // : Low[] and High[]: all symbols’ ranges // Output: binary fractional code of the message low = 0; high = 1; range = 1; while (symbol != terminator) { get (symbol); high = low + range * High(symbol); low = low + range * Low(symbol); range = high – low; } return CodeWord(low,high);

Entropy Encoding: Arithmetic Coding Binary code generation Algorithm CodeWord // Input: low and high // Output: binary fractional code code = 0; k = 1; while (value(code) < low) { assign 1 to the kth binary fraction bit; if (value(code) > high) replace the kth bit by 0; k++; }

Entropy Encoding: Arithmetic Coding Example: Assume S = {A,B,C,D,E,F,$}, where $ is the terminator symbol. In addition, assume the following probabilities for each character: –Pr (A) = 0.2 –Pr(B) = 0.1 –Pr(C) = 0.2 –Pr(D) = 0.05 –Pr(E) = 0.3 –Pr(F) = 0.05 –Pr($) = 0.1 Generate the fractional binary code of the message CAEE

Entropy Encoding: Arithmetic Coding It can be proven that  log 2 (1/  P i )  is the upper bound on the number of bits needed to encode a message –In our case, the maximum is equal to 12. –When the length of the message increases, the range decreases and the upper bound value Generally, arithmetic coding outperforms Huffman coding –Treats the whole message as one unit vs. an integral number of bits to code each character in Huffman coding –Redo the previous example CAEE$ using Huffman coding and notice how many bits are required to code this message.

Entropy Encoding: Arithmetic Coding Decoding Algorithm Algorithm ArithmeticDecoding // Input: code: binary code // : Low[] and High[]: all symbols’ ranges // Output: The decoded message value = convert2decimal(code); Do { find a symbol s so that Low(s) <= value < High(s); output s; low = Low(s); high = High(s); range = high – low; value = (value – low) / range; } while s is not the terminator symbol;

Entropy Encoding: Arithmetic Coding Example