540 likes | 766 Views
Digital Video Compression Fundamentals and Standards. Web Technology. Outline. Introduction Video Compression Standards Simulation Reference Software Future Work and Conclusions. Outline. Introduction Video Compression Standards Simulation Reference Software Future Work and Conclusions.
E N D
Digital Video Compression Fundamentals and Standards Web Technology
Outline • Introduction • Video Compression Standards • Simulation Reference Software • Future Work and Conclusions Digital Video Compression Fundamentals and Standards
Outline • Introduction • Video Compression Standards • Simulation Reference Software • Future Work and Conclusions Digital Video Compression Fundamentals and Standards
Introduction (1/2) • Why video compression technique is important ? • One movie video without compression • 720 x 480 pixels per frame • 30 frames per second • Total 90 minutes • Full color The total quantity of data = 167.96 G Bytes !! Digital Video Compression Fundamentals and Standards
Introduction (2/2) • What is the difference between video compression and image compression? • Temporal Redundancy • Coding method to remove redundancy • Intraframe Coding • Remove spatial redundancy • Interframe Coding • Remove temporal redundancy Digital Video Compression Fundamentals and Standards
The most intuitive method to remove Spatiotemporal redundancy • 3-Dimensional DCT • Remove spatiotemporal correlation • Good for low motion video • Bad for high motion video Digital Video Compression Fundamentals and Standards
The most popular method to remove temporal redundancy • The Block-Matching Algorithm Digital Video Compression Fundamentals and Standards
Matching Function • The dissimilarity between two blocks and • The matching criteria • Mean square error (MSE) • High precision is needed • Mean absolute difference (MAD) • Low precision is enough Digital Video Compression Fundamentals and Standards
The Exhaustive Block-Matching Algorithm Reference Frame Current Frame Motion Vector |A|=12 12 22 33 44 55 66 77 88 12 22 33 44 55 66 77 88 12 22 33 44 55 66 77 88 12 22 33 44 55 66 77 88 11 23 34 44 55 66 77 88 11 23 34 44 55 66 77 88 11 23 34 44 55 66 77 88 11 23 34 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 11 22 33 44 55 66 77 88 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 Search Range Digital Video Compression Fundamentals and Standards
Fast Block-Matching Algorithms • EBMA needs Intensive computation • Fast Algorithm is needed • Find the possible local optimal Reference Frame Current Frame Digital Video Compression Fundamentals and Standards
Fast Block-Matching Algorithms • The characteristics of fast algorithm • Not accurate as EBMA • Save large computation • Two famous fast algorithm • 2-D logarithm Search Method • Three Steps Search Method Digital Video Compression Fundamentals and Standards
2-D logarithm Search Method 1 2 1 1 1 1 2 4 4 4 1 2 2 4 3 3 4 4 3 Digital Video Compression Fundamentals and Standards
Three Step Search Method 2 2 2 3 3 3 1 1 2 1 1 3 2 2 3 3 3 3 3 2 2 2 1 1 1 1 1 1 Digital Video Compression Fundamentals and Standards
Multiresolution Motion Estimation (1/3) • The number of levels is L • l-th level images of the target frames where is set of pixels at level L • At the l-th level, the MV is • At the l-th level, the estimated MV is • Determine update such that error is minimized • The new motion vector is Digital Video Compression Fundamentals and Standards
Multiresolution Motion Estimation (2/3) • Variable block size method Digital Video Compression Fundamentals and Standards
Multiresolution Motion Estimation (3/3) Digital Video Compression Fundamentals and Standards
Outline • Introduction • Video Compression Standards • Simulation Reference Software • Future Work and Conclusions Digital Video Compression Fundamentals and Standards
The Development of Video Compression Standards Digital Video Compression Fundamentals and Standards
The MPEG-1 Standard • Group of Pictures • Motion Estimation • Motion Compensation • Differential Coding • DCT • Quantization • Entropy Coding Digital Video Compression Fundamentals and Standards
Group of Pictures (1/2) • I-frame (Intracoded Frame) • Coded in one frame such as DCT. • This type of frame do not need previous frame • P-frame (Predictive Frame) • One directional motion prediction from a previous frame • The reference can be either I-frame or P-frame • Generally referred to as inter-frame • B-frame (Bi-directional predictive frame) • Bi-directional motion prediction from a previous or future frame • The reference can be either I-frame or P-frame • Generally referred to as inter-frame Digital Video Compression Fundamentals and Standards
Forward Motion Compensation N=9 M=3 GOP I B B P B B P B B I Bidirectional Motion Compensation Group of Pictures (2/2) • The distance between two nearest P-frame or P-frame and I-frame • denoted by M • The distance between two nearest I-frames • denoted by N Digital Video Compression Fundamentals and Standards
The MPEG-1 Encoder (1/4) Intra-frame Residue DCT DCT DCT Q Q Q Entropy Coding Entropy Coding Entropy Coding Inter-frame Q-1 Q-1 Motion Compensation Motion Compensation Motion Vector IDCT IDCT Motion Estimation Motion Estimation Frame Memory Frame Memory Digital Video Compression Fundamentals and Standards
The MPEG-1 Encoder (2/4) • Differential Coding • is the input image • is the predictive image • DCT Digital Video Compression Fundamentals and Standards
The MPEG-1 Encoder (3/4) • Quantization • Intra quantization matrix • Inter quantization matrix Digital Video Compression Fundamentals and Standards
The MPEG-1 Encoder (4/4) • Motion Compensation • Exploit motion vector and the previous reconstructed frame to generate the predictive frame • is the compensated image • is the previous image • is the motion vector Reference frame Target frame Digital Video Compression Fundamentals and Standards
The MPEG-2 Standard • Field/Frame DCT Coding • Field/Frame Prediction Mode Selection • Alternative Scan Order • Various Picture Sampling Formats • User Defined Quantization Matrix Digital Video Compression Fundamentals and Standards
Progressive Scan and Interlaced Scan Progressive Scan Interlaced Scan Digital Video Compression Fundamentals and Standards
Field DCT Coding Luminance MB Frame DCT Coding Field/Frame DCT Coding • The field type DCT • Fast motion video • The frame type DCT • Slow motion video Digital Video Compression Fundamentals and Standards
Zig-zag scan Alternate scan 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0.72 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.27 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3.62 0 0 0 0 0 0 0 2D DCT Alternative Scan Order • Zigzag scan order • Frame DCT • Alternative scan order • Field DCT Digital Video Compression Fundamentals and Standards
The MPEG-2 Encoder (2/2) • Quantization • User can change the quantization if necessary • Intra quantization matrix • Inter quantization matrix • Various picture sampling formats • 4:4:4 • 4:2:2 • 4:2:0 Digital Video Compression Fundamentals and Standards
The MPEG-2 Encoder (1/2) SNR Enhanced Layer Q Entropy Coding • Base Layer • Basic quality requirement • For SDTV • Enhanced Layer • High quality service • For HDTV + Bits Enhance Q-1 + Bits Base Entropy Coding DCT Q Q-1 + Q-1 Base Layer + Motion Compensation IDCT + Motion Estimation + Frame Memory Digital Video Compression Fundamentals and Standards
H.264/AVC • Variable Block Size • Multiple Reference Frames • Integer Transform • Intra Prediction • In-loop Deblocking Filtering • 1/4-pel Resolution Motion Estimation • CAVLC Digital Video Compression Fundamentals and Standards
16 x 16 16 x 8 8 x 16 8 x 8 0 0 0 1 0 1 1 2 3 8 x 8 8 x 4 4 x 8 4 x 4 0 0 0 1 0 1 1 2 3 Variable Block Size • The fixed block size may not be suitable for all motion objects • Improve the flexibility of comparison • Reduce the error of comparison • 7 types of blocks for selection Digital Video Compression Fundamentals and Standards
Multiple Reference Frames • The neighboring frames are not the most similar in some cases • The B-frame can be reference frame • B-frame is close to the target frame in many situations Digital Video Compression Fundamentals and Standards
Integer Transform for Reducing The Spatial Redundancy (1/2) • The transform matrix C • 4×4 Block Size • Separable Integer Transform • The transform coefficients are CXCT Digital Video Compression Fundamentals and Standards
Integer Transform for Reducing The Spatial Redundancy (2/2) C X CT E Digital Video Compression Fundamentals and Standards
Intra Prediction Transform/ Quantization Entropy Coding Vertical Horizontal DC Vertical left Diagonal down-left Diagonal right + + + + Horizontal down + Horizontal up + Mean + + Intra Prediction • Predict the similarity between the neighboring pixels in one frame in advance, and exploit differential coding transform coding to remove the redundancy. Vertical right Digital Video Compression Fundamentals and Standards
q0 q1 q2 q3 p3 p2 p1 p0 Remove Perceptual Redundancy • In-loop deblocking filtering • Remove blocking artifact • Result from block based motion compensation • Result from block based transform coding QP Digital Video Compression Fundamentals and Standards
Integer search positions Best integer match Half-pel search positions Best half-pel match Quarter-pel search positions Best quarter-pel match 1/4-pel Resolution Motion Estimation Digital Video Compression Fundamentals and Standards
The H.264/AVC Encoder Control Data Coder Controller Residue Transform/ Quantization Entropy Coding Inverse Transform/ De-Quantization Motion Vector Motion Compensation Intra-frame Prediction De-blocking Filter Motion Estimation Digital Video Compression Fundamentals and Standards
Outline • Introduction • Video Compression Standards • Simulation Reference Software • Future Work and Conclusions Digital Video Compression Fundamentals and Standards
H.264 Reference Software http://iphome.hhi.de/suehring/tml/ • JM • Current software version: JM 15 • Benchmark Digital Video Compression Fundamentals and Standards
Reference Software Demo Digital Video Compression Fundamentals and Standards
Outline • Introduction • Video Compression Standards • Simulation Reference Software • Future Work and Conclusions Digital Video Compression Fundamentals and Standards
Future Work • Fast Mode Decision Algorithm • Interpolation Filter Design • Deblocking Filter Design • DCT-Based Motion Estimation • Implementation Based on TI DSP Digital Video Compression Fundamentals and Standards
Fast Mode Decision Algorithm • The computational cost of H.264 is large • Variable block-size ME • Multiple reference frames • Fast mode decision is needed for reducing the computation time Digital Video Compression Fundamentals and Standards
Interpolation Filter Design • In order to estimate and compensate the fractional-pel displacements • Adaptive Interpolation filter for replacing the fixed coefficient filter Digital Video Compression Fundamentals and Standards
Deblocking Filter Design • Block based ME and Transform result in the annoying blocking artifact • Reduce the blocking artifact can increase the quality of compressed video Digital Video Compression Fundamentals and Standards
DCT Based Motion Estimation • Robust even in noisy environment • Complexity comparison • DCT Based ME • O(M2) • Block Based ME • O(N2×M2) • Concept • Pseudo Phase • Similar to Digital Video Compression Fundamentals and Standards
Implementation Based on TI DSP • TMS320C6416 • TI DM642 Digital Video Compression Fundamentals and Standards