Directx Video Acceleration Specification for Windows Media Video V8, V9 and Va Decoding (Including SMPTE 421M "VC-1")
Total Page:16
File Type:pdf, Size:1020Kb
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 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. 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. 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 U.S.A. and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Contents Contents ................................................................................................................................... 3 1.0 Introduction ........................................................................................................................ 6 1.1 Document Conventions ................................................................................................. 7 Numbers ......................................................................................................................... 7 Function and Operator Definitions .................................................................................. 7 2.0 Overview of WMV 8 and WMV 9 ........................................................................................ 7 2.1 Sampling Structure ........................................................................................................ 7 2.2 Prediction Mode Indication and Motion Compensation ................................................. 7 2.2.1 WMV 8 Motion Compensation ............................................................................... 7 2.2.2 WMV 9 Prediction Mode ........................................................................................ 8 2.2.3 WMV 9 Motion Compensation ............................................................................... 8 2.2.3.1 Reference Picture Dynamic Range Adjustment ............................................... 8 2.2.3.2 Reference Picture Scaling and Offset Compensation ...................................... 9 2.2.3.3 Bi-Directional Prediction ................................................................................... 9 2.2.3.4 Two-Stage Quarter-Sample Motion Compensation with Rounding Control ..... 9 2.2.3.5 Four Motion Vectors per Macroblock ............................................................. 10 2.2.3.6 Advanced Profile 4:2:0 Interlace Support ....................................................... 10 2.3 Residual Difference Coding ......................................................................................... 10 2.4 Deblocking and Deringing Filters................................................................................. 11 2.4.1 WMV 8 In-Loop Deblocking Filter ........................................................................ 11 2.4.2 WMV 8 Out-of-Loop Deblocking Filter ................................................................. 11 2.4.3 WMV 8 Out-of-Loop Deringing Filter ................................................................... 11 2.4.4 WMV 9 In-Loop Blocking Filter ............................................................................ 11 2.4.5 WMV 9 Out-of-Loop Blocking Filter ..................................................................... 11 2.4.6 WMV 9 Out-of-Loop Deringing Filter ................................................................... 11 2.5 Uncompressed Surface Memory Requirements .......................................................... 12 2.5.1 Post-Processing Only .......................................................................................... 12 2.5.2 Motion Compensation with In-Loop and Out-of-Loop Filtering ............................ 12 2.5.2.1 Motion Compensation with In-Loop and Out-of-Loop Filtering for WMV 8 ..... 12 2.5.2.2 Motion Compensation with In-Loop and Out-of-Loop Filtering for WMV 9 ..... 12 2.6 WMV 9 Picture Upsampling ........................................................................................ 13 3.0 DXVA Data Structures and Operation .............................................................................. 13 3.1 Configuration Parameters ........................................................................................... 13 3.1.1 Degrees of Post-Processing Support .................................................................. 14 3.1.2 Alternative Configuration for Long-Term Reference Support ............................... 15 3.2 Picture Parameters Data Structure .............................................................................. 16 3.2.1 Picture Structure .................................................................................................. 16 3.2.2 WMV Use of bSecondField Member ................................................................... 16 3.2.3 Macroblock Width and Height .............................................................................. 17 3.2.4 Inverse-Scan Method .......................................................................................... 17 3.2.5 Flags Conveyed in bBidirectionalAveragingMode ............................................... 17 3.2.6 Picture Width and Height ..................................................................................... 17 3.2.7 Lack of Backward Prediction in WMV 8 ............................................................... 19 3.2.8 Backward Prediction in WMV 9 ........................................................................... 19 3.2.9 Motion Compensation Padding ............................................................................ 19 3.2.10 WMV 8 Half-Sample Motion Compensation ...................................................... 22 3.2.11 WMV 8 Quarter-Sample Motion Compensation ................................................. 22 3.2.11.1 WMV 8 Quarter-Sample Luma Motion Compensation ................................. 22 3.2.11.2 WMV 8 Quarter-Sample Chroma Motion Compensation.............................. 22 3.2.12 WMV 9 Bidirectional Prediction ......................................................................... 23 3.2.13 WMV 9 Four Motion Vectors per Macroblock (4-MV) ........................................ 23 DirectX Video Acceleration for Windows