2. OutlineOutline
• VIDEO COMPRESSIONVIDEO COMPRESSION
– VIDEO CODING BASICSVIDEO CODING BASICS
– MOTION COMPENSATIONMOTION COMPENSATION
• MPEG FAMILYMPEG FAMILY
– MPEG-1 VIDEO standardMPEG-1 VIDEO standard
– MPEG-2 VIDEO standardMPEG-2 VIDEO standard
– MPEG-4MPEG-4
– H.264H.264
– MPEG-7MPEG-7
3. VIDEO COMPRESSIONVIDEO COMPRESSION
• Why do we use compression?Why do we use compression?
– Temporal RedundancyTemporal Redundancy
– Spatial RedundancySpatial Redundancy
time
x
y
5. Reducing TemporalReducing Temporal
RedundancyRedundancy
• Segment a frame into macroblocks, notSegment a frame into macroblocks, not
search by pixelssearch by pixels
• Output energy( bit rate) is increased withOutput energy( bit rate) is increased with
the degree of temporal redundancythe degree of temporal redundancy
• Interframe coderInterframe coder ( only use temporal( only use temporal
redundancy reduction)redundancy reduction)
6. Reducing Spatial RedundancyReducing Spatial Redundancy
• Using DCT codingUsing DCT coding
• Intraframe coderIntraframe coder (use only spatial(use only spatial
redundancy reduction, only for currentredundancy reduction, only for current
frame)frame)
• Hybrid( intra-/ inter - frame) coding methodHybrid( intra-/ inter - frame) coding method
7. Motion CompensationMotion Compensation
• Often used andOften used and
developed bydeveloped by
MPEG familyMPEG family
• 將相鄰的將相鄰的 frameframe 中中
出現的移動物件進出現的移動物件進
行互相補償的過程行互相補償的過程
,因為該物件移動,因為該物件移動
範圍不大且形狀在範圍不大且形狀在
短時間內不易變動短時間內不易變動
• It is preceded byIt is preceded by
motion estimationmotion estimation
Motion Vector
Search Range
Current Frame
Reference Frame
Ω
8. MPEG-1 IntroductionMPEG-1 Introduction
• DCT for intra- and inter- framesDCT for intra- and inter- frames
• Block-based motion compensationBlock-based motion compensation
• Huffman CodingHuffman Coding
• Source input format : YUV, why not RGBSource input format : YUV, why not RGB
• Y : luminance component(Y : luminance component( 亮度亮度 ))
• U(Cb), V(Cr) : color difference orU(Cb), V(Cr) : color difference or
chrominance componentchrominance component (色差)(色差)
9. MPEG-1 Picture TypeMPEG-1 Picture Type
• Intra-Picture( I )Intra-Picture( I )
• Predicted- Pictures( P )Predicted- Pictures( P )
• Bidirectional-Predicted-Picture( B )Bidirectional-Predicted-Picture( B )
10. MPEG-2MPEG-2
• 與與 MPEG-1MPEG-1 通用通用
• Difference from MPEG-1Difference from MPEG-1
– 好很多的畫質好很多的畫質
– 更多的輸入格式更多的輸入格式 ( ex: RGB, more YUV form)( ex: RGB, more YUV form)
– 在雙向傳輸時有較短的在雙向傳輸時有較短的 delay timedelay time
– Higher bit rateHigher bit rate
– We can adjust our pictures qualityWe can adjust our pictures quality