240 likes | 442 Views
Videos. Mei-Chen Yeh. Outline. Video representation Basic video compression concepts Motion estimation and compensation. Some slides are modified from Prof. Chu’s slides. Videos. A natural video stream is continuous in both spatial and temporal domains.
E N D
Videos Mei-Chen Yeh
Outline • Video representation • Basic video compression concepts • Motion estimation and compensation Some slides are modified from Prof. Chu’s slides.
Videos • A natural video stream is continuous in both spatialand temporal domains. • A digital video stream sample pixels in both domains.
Video processing YCbCr YCbCr
Video signal representation (1) • Composite color signal • R, G, B • Y, Cb, Cr • Why Y, Cb, Cr? • Backward compatibility (back-and-white to color TV) • The eye is less sensitive to changes of Cb and Cr components Luminance (Y) Chrominance (Cb + Cr)
Video signal representation (2) • Y is the luma component and Cb and Cr are the blue and red chroma components. Y Cb Cr
Sampling formats (1) 4:4:4 4:2:2 (DVB) 4:1:1 (DV) Slide from Dr. Ding
Sampling formats (2) 4:2:0 (VCD, DVD)
TV encoding system (1) • PAL • Phase Alternating Line, is a color encoding system used in broadcast television systems in large parts of the world. • SECAM • (French: SéquentialCouleur Avec Mémoire), is an analog color television system first used in France. • NTSC • National Television System Committee, is the analog television system used in most of North America, South America, Burma, South Korea, Taiwan, Japan, Philippines, and some Pacific island nations and territories.
Other frame formats • QCIF (176x144) • Quarter Common Interchange Format • CIF (352x288) • Common Interchange Format
Uncompressed bitrate of videos Slide from Dr. Chang
Outline • Video representation • Basic video compression concepts • Motion estimation and compensation
Video compression • A video is a sequence of correlated frames. • Compression: remove redundancy • Make use of the temporal correlation! • The previous reconstructed frame is used to generate a prediction for the current frame.
Video compression • Intra coding: Compress one frame without referring to other frames • Each pixel has to be compressed • DCT → Quantization → Entropy coding • Inter coding: Compress one frame depending on the previously encoded frame • Only compress moving objects and new objects • Background can be ignored ~ Image compression
Example 1 2 3 4 • Compress and in frame 1. • Compress the motion of in remaining frames. • Direction and magnitude Slide from VC Lab
Motion compensation (1) Objects tend to move between frames Slide from Prof. Bernd Girod
Motion compensation (2) search area • Block-based motion compensation • Divide a frame into blocks • Search the previous reconstructed frame for the most matching block • Motion vector: the offsets between block locations
Motion compensation: Example Slide from Prof. Bernd Girod
Motion-compensated decoder Residual IDCT Reconstructed frame VLD Coded Bitstream MV Motion Compensation Previous Frame memory Slide from VC Lab
Motion-compensated encoder Residuals DCT + Q iDCT + iQ Motion Compensated Predictor Previous Frame Buffer MV = (dx, dy) Slide from VC Lab
Three types of coded picture • I frame (Intraframe) • Encoded without any temporal prediction • P frame (Forward Predicted Frame) • Encoded using motion prediction from the previous I or P frame • B frame (Bidirectionally Predicted Frame) • Encoded using interpolated motion prediction between the previous I or P frames and the next I or P frames
Summary • Video compression concepts • Cb, Cr sampling • Motion compensation and estimation • The encoder mimics the behavior of the decoder • Unbalanced computing: searching for a good prediction can be time consuming • GOP structure