videos mei-chen yeh. outline video representation basic video compression concepts – motion...

24
Videos Mei-Chen Yeh

Upload: philomena-carter

Post on 13-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Videos

Mei-Chen Yeh

Page 2: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Outline

• Video representation• Basic video compression concepts– Motion estimation and compensation

Some slides are modified from Prof. Chu’s slides.

Page 3: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Videos

• A natural video stream is continuous in both spatial and temporal domains.

• A digital video stream sample pixels in both domains.

Page 4: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Video processing

YCbCr

YCbCr

Page 5: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

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

YRC

YBC

BGRY

r

b

114.0587.0299.0

Luminance(Y)

Chrominance(Cb + Cr)

Page 6: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Video signal representation (2)

• Y is the luma component and Cb and Cr are the blue and red chroma components.

Y Cb Cr

Page 7: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Sampling formats (1)

4:4:4 4:2:2 (DVB) 4:1:1 (DV)

Slide from Dr. Ding

Page 8: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Sampling formats (2)

4:2:0 (VCD, DVD)

Page 9: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

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équential Couleur 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.

Page 10: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

TV encoding system (2)

Page 11: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Other frame formats

• CIF (352x288)Common Interchange Format

• QCIF (176x144)Quarter Common Interchange Format

Page 12: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Uncompressed bitrate of videos

Video Type

Pixels per Frames

Image Aspect Ratio

Frames per Second

Bits/pixel Uncompressed Bitrate

NTSC 480 483 4:3 29.97 16 111.2 Mb/s

PAL 576 576 4:3 25 16 132.7 Mb/s

CIF 352 288 4:3 14.98 12 18.2 Mb/s

QCIF 176 144 4:3 9.99 12 3.0 Mb/s

HDTV 1280 720 16:9 59.94 12 622.9 Mb/s

HDTV 1920 1080 16:9 29.97 12 754.7 Mb/s

Slide from Dr. Chang

Page 13: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Outline

• Video representation• Basic video compression concepts– Motion estimation and compensation

Page 14: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

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.

Page 15: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

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

Page 16: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Example

1. Compress and in frame 1.

2. Compress the motion of in remaining frames. Direction and magnitude

1 2 3 4

Slide from VC Lab

Page 17: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Motion compensation (1)• Objects tend to move between frames

Slide from Prof. Bernd Girod

Page 18: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Motion compensation (2)• 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

search area

Page 19: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Motion compensation: Example

Slide from Prof. Bernd Girod

Page 20: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Motion-compensated decoder

CodedBitstream VLD

1Q IDCT

MotionCompensation

PreviousFrame memory

Reconstructedframe

MV

Residual

Slide from VC Lab

Page 21: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Motion-compensated encoder

Slide from VC Lab

MotionCompensated

Predictor

DCT + Q

iDCT + iQ

MV = (dx, dy)①

② ③

Residuals

PreviousFrame Buffer

Page 22: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

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

Page 23: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

Example: A typical Group of Picture (GOP) in MPEG-2

Page 24: Videos Mei-Chen Yeh. Outline Video representation Basic video compression concepts – Motion estimation and compensation Some slides are modified from

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