Download presentation
Presentation is loading. Please wait.
Published byTamsin Harvey Modified over 9 years ago
1
Compression Data files compression Music compression Image and video compression
2
Introduction
3
File Compression Ask not what your country can do for you -- ask what you can do for your country. 79 characters Dictionnary 1. Ask 2. What 3. Your 4. Country 5. Can 6. Do 7. For 8. you Compressed sentence 1 not 2 3 4 5 6 7 8 -- 1 2 8 5 6 7 3 4 Dictionnary + Compressed sentence : 72 characters
4
File Compression Ask not what your country can do for you -- ask what you can do for your country. 79 characters Dictionnary 1. ask_ 2. what_ 3. you 4. r_country 5. _can_do_for_you Compressed sentence Dictionnary + Compressed sentence : 59 characters 1not__2345__--__12354
5
File Compression Ask not what your country can do for you -- ask what you can do for your country. John F. Kennedy - 1961 LZ adaptive dictionnary-based algorithm
6
Audio Compressing Digital sound Sound compression techniques Huffman algorithm MP3
7
Digital Sound Sampling –A song is a frequency –Shannon theorem Exemple sampling rate Sampling RateSound quality 44,100 HzCD quality 22,000 HzRadio quality 8000 HzPhone quality
8
Digital sound Example for a 1 minute long song Sampling 44,100 Hz Encoding 16 bits Stereo song –=> (((44100*2o)*2)*60) ≈ 10Mo for CDA –1 Mo for MP3
9
Sound compression techniques Destroying compression –Frequencies located between 20 Hz 20 Khz –Human ear can hear between 2 and 5 KHz –Cut higher and lower frequencies No destroying compression –Generally techniques of coding –Huffman algorithm
10
Huffman algorithm lettersoccuren cies frenque ncy coding Space4200 A3201 E23100 N23101 C141100 I141101 M141110 S141111 total120bits42bits Principle –The most frequent information is coded with short symbols, the less frequent one with longs symbols Example « I can see a man »
11
MP3 called MPEG Audio Layer-3 a compression system for audio compress a CD-quality song by a factor of 10 to 14, without losing the CD sound quality
12
MP3 Procedure –The mask effect –The reserve of bytes –The join stereo –Huffman algorithm
13
Picture coding Coding -HSL :(Hue,Saturation,Luminance) -RGB :(Red,Green,Blue) Pixel …1001011…
14
Picture compression RLE method (for BMP TIFF formats) ‘’BBBBBWWBBBBWWWWWWW ‘’ ‘’5B 2W 4B 7W’’ (Black and white) ‘’r1r2r3r4r5r6’’ ‘’ 1r1 1r2 1r3 1r4 1r5 1r6’’ (Colour gradation) Bad effectiveness
15
Picture compression JPEG Compression -merging per packages of 2x2 pixels -merging per packages of 8x8 packages - calculation of the average color of packages - allocation to each new package of the average color - coding of each colour by HUFFMAN 5169 Bytes1512 Bytes 369 Bytes
16
Video compression (MPEG) Moving Pictures Expert Group -frame I compression -picture by picture -frame P compression -what differs from the previous (and the following) picture is coded -frame B compression
17
Video compression MPEG-1: 1988 MPEG-2: used by DVD MPEG-4: used by Divx—Xvid—VP3-—3ivX
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.