1 / 23

CS529 Multimedia Networking

CS529 Multimedia Networking. Video Compression. Material from: Sanjiv Malik, http ://www.slideshare.net/sanjivmalik/video-compression-basics#btnNext Iain Richardson, http://www.vcodex.com/files/videocoding2b.pdf. Need for Compression.

chava
Download Presentation

CS529 Multimedia Networking

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS529Multimedia Networking Video Compression Material from: Sanjiv Malik, http://www.slideshare.net/sanjivmalik/video-compression-basics#btnNext Iain Richardson, http://www.vcodex.com/files/videocoding2b.pdf

  2. Need for Compression • Color image, 352x288 pixels, 24-bit “true” color  304 kbytes • 12-bit “reduced” color  152 kbytes • “VHS” quality (352x288, 12-bit, 25 f/s)  30.4 Mb/s • “Television” quality (704x576, 12-bit, 25 f/s)  121.7 Mb/s • Too much data for transmission or storage!

  3. Compression Strategy • Entropy compression • Remove statistical redundancy from data • Encode common values with fewer bits • Good for text files, not so good for images since not a lot of natural entropy • Remove subjective redundancy of images

  4. Image Compression

  5. Blocks • Blocks are 8x8 samples • Convert RGB into YUV (Luminance and Chrominance) • Fewer bits for Chrominance

  6. Discrete Cosine Transform (DCT) • Convert spatial domain to frequency domain • So, rather than pixel values, how pixels change across image • Possible to separate out (and discard) based on frequency • Human eye not very sensitive to high frequency changes in images, so can discard

  7. Discrete Cosine Transform • Block can be represented by sum of 64 basis patterns • Output of DCT is weights for patterns (the DCT coefficients) • Multiply each base by weight and add to get original image block

  8. Reconstructing Block from DCT

  9. Usefulness of DCT • Most images only contain a few significant coefficients (usually lowest frequencies)

  10. Quantization DCT • DCT values are floating point – change to integers during quantization • Divide each DCT by integer, discard remainder • Loss of precision • Typically, many are then 0 Quant Matrix Final Matrix Next, Entropy encoding (lossless)

  11. Zigzag Scanning • Process (“scan”) quantized coefficients in zig-zag order • Non-zero coefficients tend to be grouped

  12. Run-level Encoding • Encode each coefficient as (run, level) pair • Run – number of zeros • Level – non-zero value

  13. Huffman Encoding • Use variable length code where probability of number determines bits • More common, fewer bits and vice versa • Table sent/stored with encoding

  14. Image Compression • Reverse stages to decompress • Information lost during quantization • Original image not the same • Too much lost, block edges show (“blockiness”) and high-frequency patterns appear (“mosquito noise”)

  15. Video Compression • Moving pictures don’t change much from image to image • Add extra “motion model” to front end of image compression 10 F/S Video

  16. Video Encoder

  17. Motion Estimation and Compensation • Subtract previous frame from current frame

  18. Motion Estimation with Blocks • Divide frame into blocks (e.g. 16x16 MPEG) • Look for “match” within range (e.g. 64 pixels) • Calculate offset (motion vector)

  19. Motion Estimation with Blocks

  20. Motion Estimation

  21. Motion Vectors • Have direction and magnitude • Have error

  22. Bi-directional Prediction • Can look forward or backward

  23. Standards • MPEG (next paper) • MPEG-1: Initially storage (CD or Internet) • MPEG-4: general purpose, prevalent • Basis for QuickTime • H.261, H.263 • Video conferencing • H.264 uses best of both • Blue-ray, Vimeo, YouTube, Silverlight …

More Related