220 likes | 445 Views
Lossy Compression. William Dayton Nick Trojanowski. Lossy file compression compresses files by trimming out data, and therefore quality, from the original data. The loss of data is not usually enough to be noticeable by the user, but can immensely save on file size. Definition.
E N D
Lossy Compression William Dayton Nick Trojanowski
Lossy file compression compresses files by trimming out data, and therefore quality, from the original data. • The loss of data is not usually enough to be noticeable by the user, but can immensely save on file size. Definition
Lossy compression loses data; lossless does not • When encoding data, lossy takes up less file space • Lossless compression – 9/10 original size • Lossy compression – 1/10 original size Lossy vs Lossless
Transform Codecs • Samples taken, separated, quantized, and entropy encoded • Predictive Codecs • Data based off preceding data, by doing next byte based off previous Lossy Compression Types
chromafiltering • 4:2:2 means every 4 pixels are 4 luminance samples (Y), and 2 chrominance samples (RGB) • 4:2:2 reduces by 33%, 4:1:1 & 4:2:0 by 50% • hue change not typically seen, can affect certain effects • YXbXr; Y = (R+B+G)/3, Xb = Y-B, Xr = Y-r 4:2:2 4:1:1 Image Compression 4:2:0
File Types • JPEG • DjVu – AT&T Research Labs • PGF (Progressive Graphics File) • BTC (Block Truncation Coding) Image Compression cont.
Best known image compression type, mostly commonly used on Internet • Used for digital photography • Based on discrete cosine transform (DCT) • Has varying compression ratios • First converted to YCbCr • Chroma downsampling to RGB • DCT Joint Photographic Experts Group (JPEG)
Group of functions that express a signal in sum of different sinusoids • 8 types • DCT-II most common Discrete Cosine Transform
Higher quantization at extreme ranges • 10:1 compression ratio almost indistinguishable from original • Less accuracy after loud sections • Bad compression around 3kHz Audio Compression
File Types • Opus • MP2 • MP3 • MP4 • OGG • WMA • Musepack Audio Compression cont.
Uses psychoacoustics • Based on Musicam format • Sub-band coding • Ex: 128kbit/s 1/11 file size • Can use variable bit rate for encoding • .mp4 can also do video MP2, 3, & 4
Can you hear the difference? MP3 vs WAV
Mix between audio & image compression • Compression ratio between 10:1/200:1 • Reduces redundancy & framerate • Bases image on macroblocks • No standard uncompressed format Video Compression
File Types • Motion JPEG • MPEG1 • MPEG2 • MPEG4 • OGG Video Compression cont.
MPEG is flexible & error resilient • Max bitrate for MPEG4 is 8000kbits/s • Achieves compression ratio 20:1 to 200:1 • OGG is open source • Does audio, video, & text • Theora, Tarkin, Dirac for video • Theora made as competitor to MPEG4 MPEG1, 2, 4, & OGG
The one on the right has over triple the bitrate of the one on the left.