Compressing Media Types Flashcards
Lossy Compression
Once the file is compressed the original data file can never be recreated (uncompressed)
Data removed lost forever
Lossless Compression
Data encoded in a way which allows file to be uncompressed
This recreates original file
Run length encoding
Analyses a bit-mapped image for repeating pixel colours
Single value for colour is stored where colour appears more than once in a row
Note of the number of times which the colour is repeated
LZW encoding (Give an example of what it is used on as well as explanation)
Looks for repeating patterns of pixels
Dictionary of patterns is created
Dictionary replaces repeating patterns with a code
New data and the dictionary are saved in compressed file
Eg Used on GIF files
DCT encoding (Give an example of what it is used on as well as explanation)
Mathematical algorithm applied to groups of 64 pixels
Each group is saved in compressed form
Groups uncompressed when graphic is viewed
This recreates an approximation of the original groups which are joined to complete the image
Eg Used on JPEG files
Vector Graphic Encoding (Give an example of what it is used on as well as explanation)
Properties of objects stored using text
Similar objects stored
Repeating patterns of characters in text file
Patterns stored in a shorter form within a dictionary
Eg SVG graphics
Perceptual Noise Shaping
MP3 files compressed to a tenth of the original file size
Retains high sound quality because focuses on removing data that the human ear cannot easily hear
Techniques used by perceptual noise shaping
Quiet sound next to a loud sound is removed when they are of a similar frequency
Human ear has difficulty with extreme high and low frequencies and so these are removed
Low base sound changed from stereo to a single mono sound as human ear cannot detect direction from which base sounds are coming
Inter frame compression
Only stores information changes between each frame of a video
Reference I-frame stored at regular intervals
Algorithm searches for blocks of pixels which stay the same between frames following this
Position of these blocks is stored in the I-frame
Compression achieved determined by number of differences between frames
Intra frame compression
Same as inter frame compression
But treats each frame of the video as a separate bit-mapped graphic and
Compresses the frames using similar techniques
Codecs
Accompanying sound for a video also compressed
Technique variety used stored in a codec
Video playing software must have the same codec installed to view the compressed video
Large file sizes cause the problems of…
Longer download/opening times
Increased storage requirements
More demanding hardware requirements