Lossy Compression
description
Transcript of Lossy Compression
Lossy Compression
Lossy CompressionWilliam DaytonNick 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 sizeLossy vs LosslessTransform CodecsSamples taken, separated, quantized, and entropy encodedPredictive CodecsData based off preceding data, by doing next byte based off previousLossy Compression Typeschroma filtering 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 effectsYXbXr; Y = (R+B+G)/3, Xb = Y-B, Xr = Y-r
4:2:24:1:14:2:0Image Compression
File TypesJPEGDjVu AT&T Research LabsPGF (Progressive Graphics File)BTC (Block Truncation Coding)Image Compression cont.6
Best known image compression type, mostly commonly used on InternetUsed for digital photographyBased on discrete cosine transform (DCT)Has varying compression ratios
First converted to YCbCrChroma downsampling to RGBDCTJoint Photographic Experts Group (JPEG)
Group of functions that express a signal in sum of different sinusoids8 typesDCT-II most commonDiscrete Cosine Transform
Audio CompressionHigher quantization at extreme ranges10:1 compression ratio almost indistinguishable from originalLess accuracy after loud sectionsBad compression around 3kHz
Audio Compression cont.File TypesOpusMP2MP3MP4OGGWMAMusepackUses psychoacousticsBased on Musicam formatSub-band codingEx: 128kbit/s 1/11 file sizeCan use variable bit rate for encoding.mp4 can also do videoMP2, 3, & 4MP3 vs WAV
Can you hear the difference?
Video CompressionMix between audio & image compressionCompression ratio between 10:1/200:1Reduces redundancy & framerateBases image on macroblocksNo standard uncompressed formatFile TypesMotion JPEGMPEG1MPEG2MPEG4OGGVideo Compression cont.MPEG is flexible & error resilientMax bitrate for MPEG4 is 8000kbits/sAchieves compression ratio 20:1 to 200:1
OGG is open sourceDoes audio, video, & textTheora, Tarkin, Dirac for videoTheora 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.wave samplenull30354.512eng - iTunPGAP0eng - iTunNORM 000008C1 0000086B 0000336F 00004391 0000421F 00004239 00007D3A 000079B6 00005D92 00006005eng - iTunSMPB 00000000 00000210 00000935 00000000001461BB 00000000 00126635 00000000 00000000 00000000 00000000 00000000 00000000