Transcription of DirectX Video Acceleration Specification for Windows Media ...
1 DirectX Video Acceleration Specification for Windows Media Video v8, v9 and vA. Decoding (Including SMPTE 421M "VC-1"). Gary J. Sullivan microsoft Corporation December 2007 , updated August 2010 and August 2012. Applies to: DirectX Video Acceleration Summary: Defines extensions to DirectX Video Acceleration (DXVA) to support decoding of Windows Media Video (WMV) 8, WMV 9, and SMPTE VC-1. The information contained in this document represents the current view of microsoft Corporation on the issues discussed as of the date of publication. Because microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of microsoft , and microsoft cannot guarantee the accuracy of any information presented after the date of publication. microsoft MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AS TO THE INFORMATION IN THIS.
2 DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of microsoft Corporation. microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from microsoft , the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place or event is intended or should be inferred.
3 microsoft does not make any representation or warranty regarding specifications in this document or any product or item developed based on these specifications. microsoft disclaims all express and implied warranties, including but not limited to the implied warranties or merchantability, fitness for a particular purpose and freedom from infringement. Without limiting the generality of the foregoing, microsoft does not make any warranty of any kind that any item developed based on these specifications, or any portion of a Specification , will not infringe any copyright, patent, trade secret or other intellectual property right of any person or entity in any country. It is your responsibility to seek licenses for such intellectual property rights where appropriate. microsoft shall not be liable for any damages arising out of or in connection with the use of these specifications, including liability for lost profit, business interruption, or any other damages whatsoever.
4 Some states do not allow the exclusion or limitation of liability or consequential or incidental damages; the above limitation may not apply to you. 2012 microsoft . All rights reserved. microsoft , MS-DOS, Windows , Windows Media , Windows NT, Windows Server, Windows Vista, Active Directory, ActiveSync, ActiveX, Direct3D, DirectDraw, DirectInput, DirectMusic, DirectPlay, DirectShow, DirectSound, DirectX , Expression, FrontPage, HighMAT, Internet Explorer, JScript, microsoft Press, MSN, NetShow, Outlook, PlaysForSure logo, powerpoint , SideShow, Visual Basic, Visual C++, Visual InterDev, Visual J++, Visual Studio, WebTV, Win32, and Win32s are either registered trademarks or trademarks of microsoft Corporation in the and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.
5 Contents 3. introduction .. 6. Document Conventions .. 7. Numbers .. 7. Function and Operator Definitions .. 7. Overview of WMV 8 and WMV 9 .. 7. Sampling Structure .. 7. Prediction Mode Indication and Motion Compensation .. 7. WMV 8 Motion Compensation .. 7. WMV 9 Prediction Mode .. 8. WMV 9 Motion Compensation .. 8. Reference Picture Dynamic Range Adjustment .. 8. Reference Picture Scaling and Offset Compensation .. 9. Bi-Directional Prediction .. 9. Two-Stage Quarter-Sample Motion Compensation with Rounding Control .. 9. Four Motion Vectors per Macroblock .. 10. Advanced Profile 4:2:0 Interlace Support .. 10. Residual Difference Coding .. 10. Deblocking and Deringing 11. WMV 8 In-Loop Deblocking Filter .. 11. WMV 8 Out-of-Loop Deblocking Filter .. 11. WMV 8 Out-of-Loop Deringing Filter .. 11. WMV 9 In-Loop Blocking Filter.
6 11. WMV 9 Out-of-Loop Blocking Filter .. 11. WMV 9 Out-of-Loop Deringing Filter .. 11. Uncompressed Surface Memory Requirements .. 12. Post-Processing Only .. 12. Motion Compensation with In-Loop and Out-of-Loop Filtering .. 12. Motion Compensation with In-Loop and Out-of-Loop Filtering for WMV 8 .. 12. Motion Compensation with In-Loop and Out-of-Loop Filtering for WMV 9 .. 12. WMV 9 Picture Upsampling .. 13. DXVA Data Structures and Operation .. 13. Configuration Parameters .. 13. Degrees of Post-Processing Support .. 14. Alternative Configuration for Long-Term Reference Support .. 15. Picture Parameters Data 16. Picture Structure .. 16. WMV Use of bSecondField Member .. 16. Macroblock Width and Height .. 17. Inverse-Scan Method .. 17. Flags Conveyed in bBidirectionalAveragingMode .. 17. Picture Width and Height.
7 17. Lack of Backward Prediction in WMV 8 .. 19. Backward Prediction in WMV 9 .. 19. Motion Compensation 19. WMV 8 Half-Sample Motion Compensation .. 22. WMV 8 Quarter-Sample Motion 22. WMV 8 Quarter-Sample Luma Motion Compensation .. 22. WMV 8 Quarter-Sample Chroma Motion 22. WMV 9 Bidirectional Prediction .. 23. WMV 9 Four Motion Vectors per Macroblock (4-MV) .. 23. DirectX Video Acceleration for Windows Media Video Decoding 4. WMV 9 Quarter-Sample Motion 23. WMV 9 Luma Motion Compensation .. 23. WMV 9 Quarter-Sample Chroma Motion 27. WMV 9 Half-Sample Chroma Motion Compensation .. 28. WMV 9 Chroma Motion Vector Clipping .. 28. Bilinear Interpolation for Motion Compensation .. 29. Dynamic Range Adjustment of Reference Pictures in WMV 9 Simple and Main Profiles .. 30. Intensity Scaling and Offset Factors in 31.
8 WMV 8 and WMV 9 Post-Processing Picture Index .. 33. Workaround for Older DXVA 1 Drivers .. 34. DXVA 1 Software Decoder Workaround .. 35. DXVA 1 Accelerator Workaround .. 35. Mapping DXVA 2 to DXVA 1 Drivers .. 35. Indicators for Deblocking, Deringing, Reduced Dynamic Range, and Overlapped Butterfly Operators .. 36. WMV 9 Out-of-Loop 37. Use of bPicDeblockConfined, bPicSpatialResid8, bPicOverflowBlocks, and bMV_RPS; and Off-Host Bitstream Parsing Considerations .. 38. Reference Picture Flag with Host-Based Bitstream Parsing .. 38. Use of bPicDeblockConfined and Detection of Picture Type Information with Off- Host Bitstream Parsing .. 39. Use of bPicSpatialResid8 with Off-Host Bitstream Parsing .. 41. Use of bPicOverflowBlocks with Off-Host Bitstream Parsing .. 41. Use of bPicScanFixed and bPicScanMethod with Off-Host Bitstream Parsing42.
9 Derivation of Other Sequence and Entry-Point Parameters with Off-Host Bitstream Parsing .. 42. Use of bMV_RPS for REFDIST in B Field Pictures with Off-Host Bitstream Parsing .. 42. Macroblock Control Commands .. 43. Progressive and Interlaced Motion .. 43. Frame Motion in WMV 43. Frame and Field Motion in WMV 9 .. 43. Frame and Field IDCT .. 44. Frame Residual in WMV 8 .. 44. Frame and Field Residual in WMV 9 .. 44. Host Residual Difference Flag .. 44. Residual Difference Data Offset .. 45. Units of Motion Vector Values .. 45. Four Motion Vectors Per Macroblock in WMV 9 .. 46. Values of Non-Relevant Motion Vectors .. 46. WMV 9 Intra/Inter Flags at 8x8 Level .. 46. Overlapped Butterfly Operators .. 46. Residual Difference Data .. 49. Residual Difference Data When HostResidDiff = 49. Residual Difference Data When HostResidDiff = 50.
10 Deblocking and Deringing Filter Control .. 56. WMV 8 In-Loop Deblocking Filter .. 56. WMV 8 Out-of-Loop Deblocking Filter .. 58. WMV 8 Out-of-Loop Deringing Filter Control .. 60. Threshold Determination .. 61. Index Acquisition .. 61. Adaptive Smoothing .. 62. Adaptive 62. 2012 microsoft . All rights reserved. DirectX Video Acceleration for Windows Media Video Decoding 5. Clipping the Filtered Values .. 63. WMV 9 In-Loop Filtering .. 63. WMV 9 Out-of-Loop Deblocking Filter .. 69. WMV 9 Out-of-Loop Deringing Filter .. 69. WMV 9 Out-of-Loop Dynamic Range Expansion .. 69. Out-of-Loop Dynamic Range Expansion for WMV 9 Simple and Main Profiles .. 70. Out-of-Loop Dynamic Range Expansion for WMV 9 Advanced Profile .. 70. WMV 9 Out-of-Loop 71. WMV 9 Off-Host Bitstream Parsing .. 72. Status Reporting Data Structure .. 76.