Presentation is loading. Please wait.

Presentation is loading. Please wait.

MPEG-1 Video Coding Standard

Similar presentations


Presentation on theme: "MPEG-1 Video Coding Standard"— Presentation transcript:

1 MPEG-1 Video Coding Standard
Jianping Fan Department of Computer Science University of North Carolina at Charlotte Charlotte, NC 28223

2 1. What does MPEG mean? MPEG: Moving Picture Experts Group 2. Why we do not use MJPEG? 12 13 14 Spatial correlations among neighboring pixels! Temporal correlations among neighboring frames!

3 3. Why we need MPEG? Temporal Redundancy Exploit temporal relationship among frames for coding! save our money for: a. Storage space; b. Bandwidth CIF: 352*288 MPEG Frame rate: 25f/s 1.5Mbits/s Space: ~21.6Mbits/s

4 4. MPEG Video Structure Temporal relationships could be in short period! GOP 1 GOP 2 GOP 3 GOP 4 time Why we need this? I B B P B B P B B B P GOP

5 4. MPEG Video Structure 16*16 8*8 block macroblock frame Universal structure is very important for universal decoder!!

6 5. MPEG-1 Encoder MPEG-1 has defined three frame coding types: I, P, B. I frame: Intra-coding frame P frame: motion-based predictive coding frame B frame: motion-based bidirectional predictive coding frame The difference between I and P or B: I can be encoded/decoded without reference The difference between P and B: P can be encoded/decoded with one reference

7 5. MPEG-1 Encoder DCT Q VLC Buffer 01001…. IQ Q: quantization ME IDCT IDCT IQ VLC Buffer 01001…. ME: motion estimation ME IQ: reverse quantization

8 5. MPEG-1 Encoder I B P

9 6. How to Encode I Frame? slice Y DCT U V Entropy coding
block DCT U V macroblock Entropy coding …………

10 (3) CIE: more close to human vision
6. How to Encode I Frame? a. Color Space (1) RGB: display (2) YUV: coding (3) CIE: more close to human vision b. DCT (Discrete Cosine Transformation) DCT

11 b. DCT (Discrete Cosine Transformation)
6. How to Encode I Frame? b. DCT (Discrete Cosine Transformation) DCT

12 Q(u) = integer round (u/scale)
6. How to Encode I Frame? DCT Zigzag scale Quantization (7,0), (5,0), (2,0), (2,0), (3,4), (1,4), (1,41) Q(u) = integer round (u/scale) Entropy coding

13 6. How to Encode I Frame?

14 6. How to Encode I Frame? Entrpoy coding: Code probability 1 1 Pc=1/2 1 01 Pc=1/4 1 001 Pc=1/8 000 Pc=1/8 Huffman Tree

15 7. How to Encode P Frame? Motion-based prediction I or P frame Current P frame I B B P B B P B B P

16 7. How to Encode P Frame? Motion compensation: motion vectors + errors

17 a. Find the reference block at the same position
7. How to Encode P Frame? Motion estimation: a. Find the reference block at the same position (x,y) (x,y) Reference Frame Current Frame I, P blocks & Skip

18 7. How to Encode P Frame? b. Take the reference block as the search center

19 8. How to Encode B Frame? Forward prediction Backward prediction Previous reference Current frame Future reference I B B P B B P

20 8. How to Encode B Frame? Why we need B frame? Higher compression ratio I, P, B blocks & Skips

21 8. How to Encode B Frame? Why we cannot put too much B frames? Display order: I B B P B B P B B P B B P Encoding order: I P B B P B B P B B P B B Buffer Size: 3 frames

22 9. How to Design MPEG Decoder?
Video sequence Sequence header Sequence end code Sequence layer GOP GOP GOP GOP GOP header GOP layer I-frame P-frame B-frame B-frame Picture header slice slice slice Picture layer Slice header macroblock macroblock Slice layer Macroblock header Macroblock layer Block(0) Block(1) Block(5)

23 9. How to Design MPEG Decoder?
a. Search for the start codes: Sequence header code: 0x000001B bits Sequence end code: x000001B bits Group_start_code: x000001B bits Picture_start_code: x bits Slice_start_code: x000001AF bits

24 9. How to Design MPEG Decoder?
b. Functions for decoding the video data: Sequence header() Sequence_start_code 32 Horizontal size 12 12 Vertical size 4 Pel_aspect_ratio 4 Picture_rate 18 Bit rate Marker_bit 1 Buffer_size 10 Q table 22 Quantization table Done

25 9. How to Design MPEG Decoder?
Group_of_picture () Group_start_code 32 Drop_frame_flag 1 Time_code_hours 5 Time_code_minutes 6 Market_bit 1 Time_code_seconds 6 6 Time_code_pictures Close_gop 1 1 Broken_link Picture( ) Done

26 9. How to Design MPEG Decoder?
Picture ( ) 32 Picture_start_code 10 Temporal_reference 3 Picture_coding_type 16 Decoding_delay 3 Forward_vector_type 3 Backward_vector_type Slice( ) Done

27 9. How to Design MPEG Decoder?
Slice ( ) 32 Slice_start_code 5 Quantization scale Macroblock ( ) Done

28 9. How to Design MPEG Decoder?
Macroblock ( ) 11 Macroblock_escape Macroblock_address_increase 1-11 Macroblock_type 1-6 5 Quantizer_scale Motion_vector ( ) 3-9 Coded_block_pattern Block (i) Done

29 10. Where you can find MPEG? a. b. Question: If you are offered a job on designing MPEG decoder, how you can do? Show me the video frames from 1228 to 1338? IBM, Microsoft, Intel, NEC, Cisco, Eastman Kodak, ……, .com


Download ppt "MPEG-1 Video Coding Standard"

Similar presentations


Ads by Google