PPT

3,346 views

Published on

  • Be the first to comment

  • Be the first to like this

PPT

  1. 1. H.264 to VC 1 Transcoding Vidhya Vijayakumar Multimedia Processing Lab MSEE, University of Texas @ Arlington [email_address] Guided by Dr. KR Rao
  2. 2. What is… <ul><li>H.264 </li></ul><ul><ul><li>The new industry standard </li></ul></ul><ul><ul><li>Massive quality, Minimal files </li></ul></ul><ul><ul><li>Scalable from 3G to HD and Beyond </li></ul></ul><ul><li>VC 1 </li></ul><ul><ul><li>Informal name of the SMPTE 421M video codec </li></ul></ul><ul><ul><li>Standard initially developed by Microsoft </li></ul></ul><ul><ul><li>Supported standard for HD DVDs, Blu-ray Discs, and Windows Media Video </li></ul></ul>
  3. 3. What is… <ul><li>Transcoding </li></ul><ul><ul><li>Converting a previously compressed video signal into another one with different format </li></ul></ul><ul><ul><ul><li>Change in bit rate, frame rate, frame size, or even compression standard </li></ul></ul></ul><ul><ul><li>2 Ways </li></ul></ul><ul><ul><ul><li>Decode fully and encode in target standard </li></ul></ul></ul><ul><ul><ul><li>Change the bit stream format from one standard to another without its undergoing the complete decoding and encoding process. </li></ul></ul></ul><ul><ul><li>Limitations </li></ul></ul><ul><ul><ul><li>Compression artifacts are cumulative </li></ul></ul></ul>
  4. 4. Why Trancode H.264 to VC-1? <ul><li>The two high definition DVD formats HD-DVD and Blue ray have mandated MPEG-2, H.264 and VC-1 as video compression formats </li></ul><ul><li>As H.264 based and VC-1 based content and products become available, transcoding in both directions will become widely used capabilities. </li></ul><ul><li>From an end user point of view, any VC-1 decoder can now become twice as powerful as it was earlier. </li></ul>
  5. 5. Why VC1? <ul><li>Requires less computational power and can be decoded at full 1080i/p resolution on today’s off-the-shelf PC </li></ul><ul><li>Advanced Profile delivers compression efficiencies far superior to MPEG-2 </li></ul><ul><li>Delivers HD content at bit rates as low as 6-8 Mbps </li></ul><ul><li>Better visual quality against H.264 and MPEG-2 demonstrated in independent tests </li></ul>
  6. 6. More of VC1… <ul><li>DCT-based video codec design </li></ul><ul><li>Coding tools for interlaced video sequences as well as progressive encoding </li></ul><ul><li>8-bit, 4:2:0 format </li></ul><ul><li>Uses block based transform and motion compensation with quantization and entropy coding. </li></ul>
  7. 7. Decoder – Simple & Main profile
  8. 8. Decoder – Advanced Profile
  9. 9. Block Transforms (Integer DCT) <ul><li>8x8 blocks can be encoded using </li></ul><ul><li>1_8x8 2_8x4 </li></ul><ul><li>2_4x8 4_4x4 </li></ul><ul><li>Frame / Macroblock/Block signaling </li></ul><ul><li>Block level for coarse and fine level specification </li></ul><ul><li>Frame level for overhead reduction </li></ul><ul><li>Only 8x8 used for I frames </li></ul>
  10. 10. 8x8 Integer DCT Matrices <ul><li>WMV 9 </li></ul><ul><li>H.264 HP </li></ul>
  11. 11. Key features of the Transforms <ul><li>The norms of vectors of the ratio 288:289:299 </li></ul><ul><li>The variation in the norm accounted for in the encoder itself </li></ul><ul><li>At the decoder, inverse transform (rows) -> rounding-> inverse transform (columns) ->rounding (to operate in the 16 bit range) </li></ul>
  12. 12. Quantization <ul><li>Same rule applied to all block sizes </li></ul><ul><li>Both types with (bit savings at low bit rates) and without dead zone available </li></ul><ul><li>Type used signaled at the frame level to the decoder </li></ul><ul><li>At the encoder side automatic switch from uniform quantization to dead zone quantization as Q – parameter increases </li></ul><ul><li>Other factors like noise and rate control can be used to control this switch </li></ul>
  13. 13. Loop Filtering <ul><li>Done to remove blocky artifacts and thus quality of current frame for future prediction </li></ul><ul><li>Operates on pixels on the border of blocks </li></ul><ul><li>The process involves a discontinuity measurement </li></ul><ul><li>Checks are computationally expensive so done only for one set of pixel per boundary </li></ul>
  14. 14. Motion Estimation and Compensation <ul><li>Max resolution of ¼ pixel (i.e. ¼, ½, ¾) allowed </li></ul><ul><li>16x 16 motion vectors used by default but 8x8 allowed </li></ul><ul><li>Bicubic filter with 4 taps/ Bilinear filters with 2 taps to generate subpixel precision. </li></ul><ul><li>4 combined modes </li></ul><ul><li>1.Mixed block size (16x16 and 8x8), ¼ p ,bicubic </li></ul><ul><li>2.16x16, ¼ p, bicubic </li></ul><ul><li>3.16x16, ½ p, bicubic </li></ul><ul><li>4.16x16, ½ p, bilinear </li></ul><ul><li>Bilinear filters for chroma components </li></ul>
  15. 15. Advanced entropy coding <ul><li>Simple VLC codes </li></ul><ul><li>Multiple code tables for encoding each particular alphabet out </li></ul><ul><li>A possible set of code tables is chosen (based on frame level quantization parameter) and signaled in the bitstream </li></ul><ul><li>Additional information e.g. motion vectors resolution coded using bitplane coding </li></ul>
  16. 16. Interlaced coding <ul><li>Supports field and frame coding </li></ul>
  17. 17. Advanced B frame coding <ul><li>B frames:- employ bi-directional prediction </li></ul><ul><li>Fractional position definition with respect to the reference frames for better scaling of motion vectors </li></ul><ul><li>Intra coded B frames for scene changes </li></ul><ul><li>Allow inter field reference </li></ul>
  18. 18. Overlap smoothing <ul><li>The deblocking filter smoothens out the block as well as true edges and it may be disabled in less complex profiles </li></ul><ul><li>A lapped transform (input spans to pixels from other blocks as well) is used at the edges </li></ul><ul><li>Used in spatial domain as pre and post processing </li></ul><ul><li>Used only at low bit rates where blocking artifacts are higher </li></ul><ul><li>Signaled at macroblock level so can be turned off in smooth regions </li></ul>
  19. 19. Low rate tools (<100 Kbps) <ul><li>Code frames at multiple resolutions (both in X and Y direction) </li></ul><ul><li>A frame can be downscaled at the encoder and then upscaled at the decoder for LBR transmission </li></ul><ul><li>The downscaling factor needs to remain same from the start of 1 I frame to the start of next I frame. </li></ul><ul><li>The frame must be upscaled prior to display (upscaling out of scope of the standard). </li></ul>
  20. 20. Fading compensation <ul><li>Large amount of bits required for scenes having effects like fade-to-black ,fade-from-black </li></ul><ul><li>Not possible to predict motion using normally used techniques. </li></ul><ul><li>Effective fading detection (original reference image- current video image > threshold = fading) </li></ul><ul><li>If detected then encoder computes fading parameters which specify a pixel-wise first order linear transform for the reference image. </li></ul><ul><li>Also signaled to the decoder </li></ul>
  21. 21. Profiles Advanced Main Simple Yes No No Display metadata Yes No No GOP Layer Yes No No Field and frame coding modes Yes Yes No Range adjustment Yes Yes No Intensity compensation Yes Yes No B frames Yes Yes No Adaptive macroblock quantization Yes Yes No Dynamic resolution change Yes Yes No Loop filter Yes Yes No Extended motion vectors Yes Yes No Start codes Yes Yes No ¼ pixel chrominance motion compensation Yes Yes Yes ¼ pixel luminance motion compensation Yes Yes Yes 4 motion vector per macroblock Yes Yes Yes Overlapped transform Yes Yes Yes 16-bit transform Yes Yes Yes Variable-sized transform Yes Yes Yes Baseline intra frame compression Advanced Main Simple
  22. 22. Comparison of H.264 and VC-1 Free. Reference encoder and decoder free as well. Plus JVT, M4IF mail- lists where one may receive answers on the AVC related questions. Not free. Reference decoder, which is not free by itself, comes with external documentation. FFMPeg project gives a free decoder. Documentation Similar Licensing costs Supports studio archiving requirements with 4:4:4 color space; separate black and white (BW) video mode Supports 4:2:0 compression / color space Example industry use Designed to meet a variety of industry needs with many profiles and levels, allowing for varying compression, quality and CPU usage levels, where the lowest level is for portable devices, designed with low CPU usage in mind, while the high levels are designed with very high quality and compression efficiency in mind Designed to offer very high image quality with excellent compression efficiency Goals H.264 VC 1 Overview
  23. 23. Comparison of H.264 and VC-1 6-tap filter for half pixel, averaging for quarter pixels bicubic, bilinear Sub pixel Interpolation methods Yes No B frame used for predicting other pictures Contiguous/non contiguous Contiguous (integer number of macro block rows only) Slice Yes VLC Only in High profile and above Yes Variable transform Size Only supported in Main and higher profiles No CABAC In-loop only In-loop and out-of-loop algorithms, overlap transform Deblocking filter SPS (sequence parameter set), PPS (picture parameters set), slice header, macroblock In advanced profile each Bit stream Data Unit has its own header. Simple and Main profile do not provide neither sequence nor entry point headers. Bitstream format NAL and byte stream single bit stream Bitstream formats H.264 VC-1 Features
  24. 24. Comparison of H.264 and VC-1 No data is encoded for macroblock Skipped Mb A field or frame Picture Two dimensional vector offset from current position to reference frame Motion vector 16x16 only Macroblock sizes Used for progressive or interlaced content Used for interlace content. Consists of bottom and top field Frame 4x4; 8x8 available in High Profile only 8x8, 4x8, 8x4, and 4x4 Integer transform 16x16, 16x8, 8x16, 8x8, 8x4, 4x8, and 4x4 16x16, 16x8, 8x16, and 8x8 Partition sizes H.264 VC-1 Feature
  25. 25. Graphically… <ul><li>8x8, 4x8, 8x4, 4x4 adaptive block size </li></ul><ul><li>Frequency-independent dequantization scaling </li></ul><ul><li>VLC-based entropy coding </li></ul><ul><li>4 tap bicubic filters for MC </li></ul><ul><li>Relatively-simple loop filter </li></ul><ul><li>Overlap intra filtering </li></ul><ul><li>Range reduction/expansion </li></ul><ul><li>Resolution red./exp. </li></ul><ul><li>8x8 and 4x4 adaptive block size </li></ul><ul><li>Frequency-dependent dequantization matrix </li></ul><ul><li>CABAC or VLC </li></ul><ul><li>Long filters for MC </li></ul><ul><li>Complex loop filter </li></ul><ul><li>Spatial intra prediction </li></ul><ul><li>Multi-picture arbitrary-order referencing </li></ul><ul><li>Intra PCM </li></ul>VC-1 H.264 Block motion 16-bit integer transforms Bit-exact spec Fading prediction Loop filter
  26. 26. Transcoding point of view Adaptive In High profile
  27. 27. Stepping forward… <ul><li>Algorithm to deduce the picture type in VC-1 from H.264 picture types </li></ul><ul><li>Algorithm to effectively handle transform size mismatch between H.264 and VC-1 </li></ul><ul><li>Algorithm to choose the best reference picture of H.264 to be used for MC in VC-1 </li></ul>
  28. 28. References <ul><li>An efficient algorithm for VC-1 to H.264 video transcoding in progressive compression - Jae-Beom Lee and Hari Kalva </li></ul><ul><li>http://www.avsforum.com/avs-vb/showthread.php?p =9931723&&#post9931723 </li></ul><ul><li>http://www.microsoft.com/windows/windowsmedia/howto/articles/vc1techoverview.aspx </li></ul><ul><li>Windows Media Video 9: overview and applications </li></ul><ul><li>Sridhar Srinivasan, Pohsiang (John) Hsu, TomHolcom b, Kunal Mukerjee, Shankar L. Regunathan, Bruce Lin, Jie Liang, Ming-Chieh Lee, Jordi Ribas-Corbera </li></ul><ul><li>Windows Digital Media Division, Microsoft Corporation, Redmond, WA 98052, USA, available online at www.sciencedirect.com </li></ul>
  29. 29. Thank You Vidhya Vijayakumar [email_address]

×