Download - An introduction to audio/video compression
![Page 1: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/1.jpg)
An introduction to audio/video
compression
Dr. Malcolm Wilson
![Page 2: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/2.jpg)
Introduction
• Review digital video.
• Need for compression.
• Lossy and lossless compression.
• How to apply techniques to still video (jpeg).
![Page 3: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/3.jpg)
Digital Video
• Samples represent pixel values of a video frame.• Typically 480x640x3=1M (approx) per frame• Sample size 8-10 bits typically.
![Page 4: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/4.jpg)
Video datarates
• With 8 bits samples at 25 frames per second we have a datarate of 200 Mbits per second.•Broadcast video (10 bit and includes audio) 270 Mbits per second.
![Page 5: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/5.jpg)
Why do we need compression?
Modems 56kbit s-1
Broadband 8Mbit s-1
USB 1.1 12Mbit s-1
USB 2.0 480Mbit s-1
IEEE 1394 400Mbit s-1
Ethernet 100kbit s-1
DVD 14Mbit s-1
CD-ROM 50Mbit s-1
EIDE Hard 100MB s-1
SCSI Hard 160MB s-1
![Page 6: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/6.jpg)
Lossless Compression
• Achieve datarate reduction without discarding information.
• Run Length CodingEg: 5 5 5 5 5 5May be coded 5 6
![Page 7: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/7.jpg)
Lossless Compression
Entropy (Huffman) Coding
• Assign shorter codes to the more probable values.
• Possible when there is statistical bias in image data.
![Page 8: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/8.jpg)
Lossy Compression
• Achieving datarate reduction by discarding information.
• Missing out samples from data stream/reducing sample size generally noticeable.
![Page 9: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/9.jpg)
Transforms• Frequency transforms (DCT) separate frequency components.
• Transformed image allows efficient coding of high frequency data.
![Page 10: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/10.jpg)
Example DCT Basis Pictures
• Picture broken into 8x8 pixel blocks (typically).
• Any 8x8 pixel (picture) block made by adding different proportions of basis pictures.
• So store the proportions.
![Page 11: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/11.jpg)
DCT basis functions (Basis pictures).
![Page 12: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/12.jpg)
Original Picture
![Page 13: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/13.jpg)
Using one (dc) basis picture
![Page 14: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/14.jpg)
Using 6 basis pictures
![Page 15: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/15.jpg)
Video compression• Most 8 x 8 blocks do not contain high frequency components.
• Code high frequency components using less bits (introduces noise).
![Page 16: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/16.jpg)
Video compression• We are left with a sequence of values.
•Zig-Zag scan.
• Many values of zero towards the bottom right hand corner.
• Use RLE to reduce the datarate further.
![Page 17: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/17.jpg)
Variable length coding
• More likely that any non-zero value will have a run of zeros before it.
• Non-zero value more likely to have a low value than a high one.
• Use Huffman coding.
![Page 18: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/18.jpg)
Summary
• Compression is needed to replay video from computer peripherals and to economise on storage.• Lossless techniques can allow some compression of video.•Lossy techniques can be used by considering psychological factors.
![Page 19: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/19.jpg)
Summary
•We need to transform the signal to achieve unnoticable lossy compression.
•Lossless techniques may then be used to achieve further compression.
![Page 20: An introduction to audio/video compression](https://reader034.vdocuments.us/reader034/viewer/2022051420/56815e0e550346895dcc6df9/html5/thumbnails/20.jpg)
Psychological Considerations
• Our eyes are not as sensitive to colour detail.
• Colour information –Less bandwidth
• Our eyes are less sensitive to high frequency noise.