Intel® Media SDK 2014 Developer's Guide
Total Page:16
File Type:pdf, Size:1020Kb
Intel® Media SDK 2014 Developer’s Guide Hardware Accelerated Video on Intel Platforms LEGAL DISCLAIMER INFORMATION IN THIS DOCUMENT IS PROVIDED IN CONNECTION WITH INTEL PRODUCTS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. EXCEPT AS PROVIDED IN INTEL'S TERMS AND CONDITIONS OF SALE FOR SUCH PRODUCTS, INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO SALE AND/OR USE OF INTEL PRODUCTS INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS OTHERWISE AGREED IN WRITING BY INTEL, THE INTEL PRODUCTS ARE NOT DESIGNED NOR INTENDED FOR ANY APPLICATION IN WHICH THE FAILURE OF THE INTEL PRODUCT COULD CREATE A SITUATION WHERE PERSONAL INJURY OR DEATH MAY OCCUR. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. The information here is subject to change without notice. Do not finalize a design with this information. The products described in this document may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an order number and are referenced in this document, or other Intel literature, may be obtained by calling 1-800-548-4725, or by visiting Intel's Web Site. MPEG is an international standard for video compression/decompression promoted by ISO. Implementations of MPEG CODECs, or MPEG enabled platforms may require licenses from various entities, including Intel Corporation. Intel, the Intel logo, Intel Core are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others. OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos. Copyright © 2008-2014, Intel Corporation. All Rights reserved. Optimization Notice Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. ii *Other names and brands may be claimed as the property of others Intel® Media Developer’s Guide Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 *Other names and brands may be claimed as the property of others iii This page left intentionally blank. iv *Other names and brands may be claimed as the property of others Contents 1 About this Document ......................................................................................................... 1 1.1 Overview ................................................................................................. 1 1.2 Intended Audience ...................................................................................... 1 1.3 Document Conventions, Symbols, and Terms ........................................................ 1 1.4 Related Information..................................................................................... 3 1.5 Specifications ............................................................................................ 3 1.6 What’s New? ............................................................................................. 4 1.6.1 New in Intel® Media SDK 2014 .............................................................. 4 1.7 Accelerating video operations with the Intel® Media Software Development Kit ................ 4 1.8 Tips For Distributing Intel® Media SDK applications .................................................. 8 1.9 Developing Microsoft* Windows 8/8.1 Store Applications.......................................... 8 2 Installing Intel® Media SDK and running the samples ...................................................................... 9 2.1 Understanding Intel® Media SDK Distribution Components ......................................... 9 2.1.1 Supported Processors and Operating Systems ........................................... 9 2.1.2 Installing the graphics driver and Intel® Media SDK ....................................... 9 2.1.3 Verifying successful installation ........................................................... 11 2.2 Using the Intel® Media SDK samples .................................................................. 11 2.2.1 Sample Overview ........................................................................... 11 2.2.2 Building the sample applications .......................................................... 11 2.2.3 Console Applications ........................................................................ 11 2.2.4 Microsoft* DirectShow* and Microsoft* Media Foundation* Transform Samples .... 13 2.2.5 Using the Framework Plugin Samples – Tips and Tricks ................................ 14 2.2.6 Intel Media SDK Tutorials .................................................................. 14 3 Working with containers .................................................................................................... 16 3.1 Creating Elementary Streams from Existing Content .............................................. 16 3.2 Creating Container Files from Elementary Streams ................................................ 18 3.3 Muxing and Demuxing ................................................................................. 19 3.4 Decoder Bitstream Repositioning .................................................................... 20 4 Developing Intel® Media SDK Applications ................................................................................ 21 4.1 Intel® Media SDK application design fundamentals ................................................. 21 4.2 Intel® Media SDK function groups..................................................................... 21 4.3 Working with Intel® Media SDK Video Sessions ..................................................... 22 4.3.1 The dispatcher, software implementation, and software fallback ..................... 22 4.3.2 Under the hood of the dispatcher ......................................................... 24 4.3.3 Intel® Media SDK sessions under the hood ............................................... 26 4.3.4 Creating Sessions ........................................................................... 27 4.3.5 Query version and implementation ....................................................... 28 4.3.6 Join/clone/disjoin session ................................................................... 29 4.4 Core Functions: Interacting with the asynchronous acceleration infrastructure ................ 31 4.4.1 IOPattern: System, Video, and Opaque memory ......................................... 31 4.4.2 Surface reordering and locking ............................................................ 32 4.4.3 Surface Allocation with QueryIOSurf ..................................................... 33 4.4.4 Finding unlocked buffers ................................................................... 34 4.5 Decode overview ....................................................................................... 35 4.6 Encode overview ....................................................................................... 36 4.7 Decode and Encode parameterer validation......................................................... 37 *Other names and brands may be claimed as the property of others v 4.8 Encode Bitstream Buffer Allocation with GetVideoParam ......................................... 37 4.9 Encode Quality and Performance settings .......................................................... 37 4.9.1 Rate Control Methods ...................................................................... 38 4.10 Mandatory VPP Filters ................................................................................. 39 4.10.1 Surface format conversion ................................................................. 40 4.10.2 Tips for Deinterlacing Content ............................................................. 41 4.10.3 VPP Scaling .................................................................................. 41 4.10.4 Performing Frame Rate Conversion ....................................................... 43 4.11 Hint-based VPP filters ................................................................................. 43 4.11.1 DoNotUse and DoUse lists ................................................................. 44 4.12 User Modules: Adding custom