Development of a Transcoding Algorithm from MPEG to

  • Slides: 19
Download presentation
Development of a Transcoding Algorithm from MPEG to H. 263 Nick Feamster January 26,

Development of a Transcoding Algorithm from MPEG to H. 263 Nick Feamster January 26, 1998 1

Development of a Transcoding Algorithm from MPEG to H. 263 Motivation: MPEG - High

Development of a Transcoding Algorithm from MPEG to H. 263 Motivation: MPEG - High bitrate - DVD, Digital Television - 1. 5 Mbps, 30 fps Transcode H. 263 - Low bitrate - Wireless, etc. - 500 kbps, 10 fps January 26, 1998 2

Transcoding Issues MPEG vs. H. 263 - I, P, B Frames - I, P

Transcoding Issues MPEG vs. H. 263 - I, P, B Frames - I, P Frames - Restricted Motion Vectors - Unrestricted Motion Vectors on boundaries - More I macroblocks per frame on boundaries - Fewer I macroblocks per frame January 26, 1999 3

Computation vs. Quality Goal: A fast transcoding algorithm which preserves picture quality. Method: Make

Computation vs. Quality Goal: A fast transcoding algorithm which preserves picture quality. Method: Make use of available decoded information to avoid unnecessary computation. January 26, 1999 4

MPEG vs. H. 263 January 26, 1999 5

MPEG vs. H. 263 January 26, 1999 5

MPEG vs. H. 263 Conclusion: 1. 5 Mbps MPEG Source minimizes loss due to

MPEG vs. H. 263 Conclusion: 1. 5 Mbps MPEG Source minimizes loss due to recoding. January 26, 1999 6

Initial Method Drop B Frames MPEG Decode H. 263 Motion Estimation H. 263 Encode

Initial Method Drop B Frames MPEG Decode H. 263 Motion Estimation H. 263 Encode • 9 -10 Seconds per frame • Too much computation for real time transcoding January 26, 1999 7

Alternative: Reuse Information Drop B Frames MPEG Decode H. 263 Motion Estimation H. 263

Alternative: Reuse Information Drop B Frames MPEG Decode H. 263 Motion Estimation H. 263 Encode Motion Vectors What is the best way to do this? January 26, 1999 8

Issue: MPEG I Frames Problem: Each MPEG GOP has an I frame with no

Issue: MPEG I Frames Problem: Each MPEG GOP has an I frame with no motion vectors. Solution: Copy motion vectors from preceding MPEG P frame. MV’s from Yes Drop B frames MPEG Decode I frame? MPEG: I B B PBB I H. 263: I P P P frame No H. 263 Encode MV’s from current frame P January 26, 1999 9

Issue: Small MV Errors Problem: Quantization losses result in motion estimation discrepancies Solution: Half

Issue: Small MV Errors Problem: Quantization losses result in motion estimation discrepancies Solution: Half pel search to refine motion vectors January 26, 1999 10

Issue: MPEG Intra Macroblocks • Often more useful to code an H. 263 macroblock

Issue: MPEG Intra Macroblocks • Often more useful to code an H. 263 macroblock as an intra block, even if the block is coded inter in MPEG Solution: Use the minimum error threshold specified by the H. 263 encoder to correct modes. January 26, 1999 11

Resulting Method MV’s from P frame Yes Drop B frames MPEG Decode I frame?

Resulting Method MV’s from P frame Yes Drop B frames MPEG Decode I frame? Half Pel Correct Mode Correct H. 263 Encode No MV’s from current frame January 26, 1999 12

Other Considerations • Boundary Error – 0. 5 d. B loss, worst case (sequence

Other Considerations • Boundary Error – 0. 5 d. B loss, worst case (sequence dependent) – Much of this loss can be recovered with mode correction and half pel search – At a lower spatial resolution, boundary motion vectors take on increasing importance. January 26, 1999 13

H. 263 Boundary Motion Vectors January 26, 1999 14

H. 263 Boundary Motion Vectors January 26, 1999 14

Other Considerations • MPEG I Frames – Tried weighted average of neighboring P frame

Other Considerations • MPEG I Frames – Tried weighted average of neighboring P frame MV’s based on overlap, not as effective as simple replacement. – Replacement works well on sequences with correlated motion vectors – High quality P frame from MPEG I frame ® Less degradation of subsequent P frame quality January 26, 1999 15

Results Sequence Carousel (30 IP) Bus (30 IP) Girl (18 IP) Bus (10 IP)

Results Sequence Carousel (30 IP) Bus (30 IP) Girl (18 IP) Bus (10 IP) Carousel (10 IP) Football (10 IP) Method 1 (sec) 323 254 106 80 90 92 Method 2 (sec) 26 26 15 9 8 8 ~ 10 x Efficiency Improvement January 26, 1999 16

Results Carousel Bus Girl January 26, 1999 17

Results Carousel Bus Girl January 26, 1999 17

Conclusions • Reusing motion vector information from decoded MPEG stream saves 85 -90% of

Conclusions • Reusing motion vector information from decoded MPEG stream saves 85 -90% of computation time with an average of 1. 4 d. B loss. • Much of the loss can be attributed to motion vector errors resulting from requantization of the original frame pixel values. Frame A’ MPEG MV(A) MPEG H. 263 Method 1 MV(A’) H. 263 Method 2 January 26, 1999 18

Future Work • Algorithmic research (motion vector search for I frames, etc. ) •

Future Work • Algorithmic research (motion vector search for I frames, etc. ) • Real-time implementation • Allow MPEG interlace as transcoder input January 26, 1999 19