Images. Audio. Cryptography - Steganography. 1. 1 MultiMedia Compression } Movies.
-
Upload
howard-sparks -
Category
Documents
-
view
212 -
download
0
description
Transcript of Images. Audio. Cryptography - Steganography. 1. 1 MultiMedia Compression } Movies.
Images.Audio.Cryptography - Steganography.
1. 1
MultiMedia Compression
} Movies
Statistic codeGiving a presentation in a different length to each item according to its probability.
Dictionary codeA collection of strings.The compressed file contains pointers to those strings.
1. 2
Codes' type
Static codeTwo passes on data.One for gathering information and one for executing the compression.
Adaptive codeOne 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
Lossless CodeNo loss of data
Lossy CodeSome data may lost. Very common in use for audio, images, video etc.
1. 4
Yet another division for types
Fixed length code can be easily broken into codewords.How can we split a variable length code?
1. 5
Uniquely Decipherable
A - 0B - 10C - 11D - 1
110 can be “CA” or “DB” or “DDA”.
No codeword is the prefix of any other codeword.Example:
A - 000B - 001C - 0100D - 0101E - 011F - 10G - 11
1. 6
The prefix property
10011010000000111
F C G E A B
1. 7
Tree of Prefix code
10
11100100
011010001000
01010100
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
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
A - 5%, B - 15%, C - 20%, D - 25%, E - 35%.
1. 10
An example
15%
5%25%
20%
35%
5%20%
25% 15%
35%
25% 15% 35%5% 20%
20%5%
1
1
1
1
0
00
0
111 A(5%)
01 B(15%)
110 C(20%)
10 D(25%)
00 E(35%)
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.25This 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
15%
5%25%
20%
35%
5%
20%25%
15% 35%
25%
15%
35%5% 15%20%
5%
1
1
1
1
0
00
0