1 / 29

Multimedia Communications EG 371 and EG 348

Multimedia Communications EG 371 and EG 348. Dr Matthew Roach Lecture 4 JPEG compression / format. JPEG. Joint Photographic Experts Group Standards for saving digital images Many compression modes Lossy sequential mode Baseline mode. JPEG. Image / block preparation

kathy
Download Presentation

Multimedia Communications EG 371 and EG 348

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. Multimedia CommunicationsEG 371 and EG 348 Dr Matthew Roach Lecture 4 JPEG compression / format Multimedia communications EG-371 Dr Matt Roach

  2. JPEG • Joint Photographic Experts Group • Standards for saving digital images • Many compression modes • Lossy sequential mode • Baseline mode Multimedia communications EG-371 Dr Matt Roach

  3. JPEG • Image / block preparation • Forward DCT (discrete cosine transform) • Quantisation • Entropy encoding • Frame building Multimedia communications EG-371 Dr Matt Roach

  4. Image / block preparation Multimedia communications EG-371 Dr Matt Roach

  5. Image / block preparation Cr Y Cb Multimedia communications EG-371 Dr Matt Roach

  6. Image / block preparation R B G Multimedia communications EG-371 Dr Matt Roach

  7. Image / block preparation • Each matrix compressed separately • Using DCT • Spit into blocks for speed Multimedia communications EG-371 Dr Matt Roach

  8. Forward DCT • Not concerned with how • What • Transform into frequency components • Why • Spatial frequency sensitivity of the HVS • Benefit • Creates higher redundancy for encoding Multimedia communications EG-371 Dr Matt Roach

  9. DCT Increasing fH Coefficients DCT Increasing fV Coefficients P[x,y] F[i,j] DC coefficient AC coefficient Multimedia communications EG-371 Dr Matt Roach

  10. DCT • Typical DCT coefficients after transform Multimedia communications EG-371 Dr Matt Roach

  11. Quantisation • Quantisation table Multimedia communications EG-371 Dr Matt Roach

  12. Quantisation • DCT coefficients Multimedia communications EG-371 Dr Matt Roach

  13. Quantisation • DCT coefficients Quantisation table Multimedia communications EG-371 Dr Matt Roach

  14. Quantisation • DCT coefficients Quantized DCT coefficients Multimedia communications EG-371 Dr Matt Roach

  15. Quantisation • Computation involves rounding to nearest integer value • Threshold value increase with spatial frequency • The DC component in transformed matrix is largest • Many high frequency coefficient are 0 Multimedia communications EG-371 Dr Matt Roach

  16. Entropy encoding • Vectoring • Differential encoding • Run length encoding • Huffman encoding Multimedia communications EG-371 Dr Matt Roach

  17. Vectoring • 2-D matrix into string of values • Linearized vector 63 2 1 0 AC confidents increasing in order of frequency DC coefficient Multimedia communications EG-371 Dr Matt Roach

  18. Vectoring example 63 ………………. 5 4 3 2 1 0 Multimedia communications EG-371 Dr Matt Roach

  19. Differential encoding • Encoded the difference • Across blocks for the DC coefficient • Largest absolute value • Coded (SSS, value) • SSS number of bits needed to code value • Value, actual bits that represent the value • Uses complement for negative values • 12,13,11,11,10 …> 12,1,-2,0,-1 • (4,1100)(1,1)(2,01)(0, )(1,0) • (sss, value) Multimedia communications EG-371 Dr Matt Roach

  20. Frame building • Top level • Start of frame delimiter • End of frame delimiter • Frame header • Width height of frame • Number of components (R,G,B etc) • Digitisation format used (4:2:2, 4:2:0 etc.) • Frame contents Multimedia communications EG-371 Dr Matt Roach

  21. Frame building • Frame Contents • Scan • Segment • Segment header • Huffman table used to encode each block • Scan header • Identity of components (R,G,B etc) • Number of bits used to digitise components • Quantisation table used to encode components Multimedia communications EG-371 Dr Matt Roach

  22. Scream resolution 813 x 1012 Image 1 Size 56k Download time 10 sec (56k) 0.8 sec (720k) Image 2 Size 14k Download time 2.5 sec (56k) 0.2 (720k) Example images – Image 1 Multimedia communications EG-371 Dr Matt Roach

  23. Scream resolution 813 x 1012 Image 1 Size 56k Download time 10 sec (56k) 0.8 sec (720k) Image 2 Size 14k Download time 2.5 sec (56k) 0.2 (720k) Example images – Image 2 Multimedia communications EG-371 Dr Matt Roach

  24. Frame types • Intracoded frames I-frames • Encoded with no reference to other frames • Y Cr Cb matrices encoded independently JPEG • Predictive frames P-frames • Encoding based on preceding I or P frame • Motion estimation, motion compensation • Error propagation • Bi-directional frames B-frames • Intercoded , interpolation frames • Used to combat fast moving objects Multimedia communications EG-371 Dr Matt Roach

  25. I, P and B frame sequencing • Sequencing • M = Prediction span • 1-3 • N= GOP • Group of pictures • 3-12 I P P I P P I M = 1 N = 3 I B B P B B I M = 3 N = 6 Multimedia communications EG-371 Dr Matt Roach

  26. Altering the sequence • Uncoded frame sequence • IBBPBBPBBI • The recorded sequence would be • IPBBPBBIBB Multimedia communications EG-371 Dr Matt Roach

  27. Motion estimation and compensation 8 • 1 Macroblock • 4 blocks Y • 1 block Cr • 1 block Cb • Block (8x8) • Digitisation format • 4:1:1 8 8 8 Cr 8 Y 8 8 Cb 8 Multimedia communications EG-371 Dr Matt Roach

  28. Encode P frame • Macroblock • Address • Target frame • Frame to be encoded • Reference frame • preceding I or P frame • Motion vector Multimedia communications EG-371 Dr Matt Roach

  29. Example motion vector estimation Multimedia communications EG-371 Dr Matt Roach

More Related