Presentation is loading. Please wait.

Presentation is loading. Please wait.

Images. Audio. Cryptography - Steganography. 1. 1 MultiMedia Compression } Movies.

Similar presentations


Presentation on theme: "Images. Audio. Cryptography - Steganography. 1. 1 MultiMedia Compression } Movies."— Presentation transcript:

1 Images. Audio. Cryptography - Steganography. 1. 1 MultiMedia Compression } Movies

2 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 Codes' type

3 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 Another division for types

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

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

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

7 1. 7 Tree of Prefix code

8 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 A complete prefix code

9 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 Shannon-Fano coding

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

11 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 Shannon-Fano is not optimal


Download ppt "Images. Audio. Cryptography - Steganography. 1. 1 MultiMedia Compression } Movies."

Similar presentations


Ads by Google