Multi Media Compression Images Movies Audio Cryptography Steganography

  • Slides: 11
Download presentation
Multi. Media Compression } Images. Movies Audio. Cryptography - Steganography. 1. 1

Multi. Media Compression } Images. Movies Audio. Cryptography - Steganography. 1. 1

Codes' type Statistic code Giving a presentation in a different length to each item

Codes' type Statistic code Giving a presentation in a different length to each item according to its probability. Dictionary code A collection of strings. The compressed file contains pointers to those strings. 1. 2

Another division for types Static code Two passes on data. One for gathering information

Another division for types Static code Two passes on data. One for gathering information and one for executing the compression. Adaptive code One pass on data for both gathering information and compression's executing. Faster than static. If file isn't uniform, can be sometimes better since it can "forget". 1. 3

Yet another division for types Lossless Code No loss of data Lossy Code Some

Yet another division for types Lossless Code No loss of data Lossy Code Some data may lost. Very common in use for audio, images, video etc. 1. 4

Uniquely Decipherable Fixed length code can be easily broken into codewords. How can we

Uniquely Decipherable Fixed length code can be easily broken into codewords. How can we split a variable length code? A B C D - 0 10 11 1 n 110 can be “CA” or “DB” or “DDA”. 1. 5

The prefix property No codeword is the prefix of any other codeword. Example: A

The prefix property No codeword is the prefix of any other codeword. Example: A B C D E F G - 000 001 0100 0101 011 10011010000000111 F E 1. 6 C A B G

Tree of Prefix code 1. 7

Tree of Prefix code 1. 7

A complete prefix code A prefix code is complete if it fits a complete

A complete prefix code A prefix code is complete if it fits a complete binary tree. A prefix code is complete if an insertion of another codeword will make it a not Uniquely Decipherable code. These two definitions are equivalents. 1. 8

Shannon-Fano coding Divide the set of symbols into two equal or almost equal subsets

Shannon-Fano coding Divide the set of symbols into two equal or almost equal subsets based on the probability of occurrence of characters in each subset. One set is assigned 0. The other set is assigned 1. Repeat the procedure until all subsets have a single element. Each element's code is the concatenation of the sets' bits. 1. 9

An example A - 5%, B - 15%, C - 20%, D - 25%,

An example A - 5%, B - 15%, C - 20%, D - 25%, E - 35%. 111 01 110 10 00 A(5%) B(15%) C(20%) D(25%) E(35%) 1. 10

Shannon-Fano is not optimal This tree will give a better compression: Shannon-Fano tree: 3*0.

Shannon-Fano is not optimal This tree will give a better compression: Shannon-Fano tree: 3*0. 05+2*0. 15+3*0. 20 +2*0. 25+2*0. 35=2. 25 This better tree: 3*0. 05+3*0. 15+2*0. 20 +2*0. 25+2*0. 35=2. 2 1. 11