OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing

Similar documents
Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing

Intel SDK for OpenCL* - Sample for OpenCL* and Intel Media SDK Interoperability

Bitonic Sorting. Intel SDK for OpenCL* Applications Sample Documentation. Copyright Intel Corporation. All Rights Reserved

Intel Cache Acceleration Software for Windows* Workstation

How to Create a.cibd File from Mentor Xpedition for HLDRC

How to Create a.cibd/.cce File from Mentor Xpedition for HLDRC

Drive Recovery Panel

Intel Atom Processor E3800 Product Family Development Kit Based on Intel Intelligent System Extended (ISX) Form Factor Reference Design

Intel RealSense Depth Module D400 Series Software Calibration Tool

Theory and Practice of the Low-Power SATA Spec DevSleep

Bitonic Sorting Intel OpenCL SDK Sample Documentation

Intel RealSense D400 Series Calibration Tools and API Release Notes

Intel Atom Processor D2000 Series and N2000 Series Embedded Application Power Guideline Addendum January 2012

Intel Atom Processor E6xx Series Embedded Application Power Guideline Addendum January 2012

INTEL PERCEPTUAL COMPUTING SDK. How To Use the Privacy Notification Tool

Intel Core TM i7-4702ec Processor for Communications Infrastructure

Intel Core TM Processor i C Embedded Application Power Guideline Addendum

MICHAL MROZEK ZBIGNIEW ZDANOWICZ

Intel Open Source HD Graphics, Intel Iris Graphics, and Intel Iris Pro Graphics

Desktop 4th Generation Intel Core, Intel Pentium, and Intel Celeron Processor Families and Intel Xeon Processor E3-1268L v3

High Dynamic Range Tone Mapping Post Processing Effect Multi-Device Version

Ernesto Su, Hideki Saito, Xinmin Tian Intel Corporation. OpenMPCon 2017 September 18, 2017

Intel Cache Acceleration Software - Workstation

Intel USB 3.0 extensible Host Controller Driver

2013 Intel Corporation

Krzysztof Laskowski, Intel Pavan K Lanka, Intel

Intel Open Source HD Graphics Programmers' Reference Manual (PRM)

Intel Stereo 3D SDK Developer s Guide. Alpha Release

Using the Intel VTune Amplifier 2013 on Embedded Platforms

Collecting OpenCL*-related Metrics with Intel Graphics Performance Analyzers

Intel Integrated Native Developer Experience 2015 (OS X* host)

Intel Graphics Virtualization Technology. Kevin Tian Graphics Virtualization Architect

Product Change Notification

Product Change Notification

Product Change Notification

Product Change Notification

Product Change Notification

Product Change Notification

Intel Manycore Platform Software Stack (Intel MPSS)

Installation Guide and Release Notes

Product Change Notification

Product Change Notification

Intel Embedded Media and Graphics Driver v1.12 for Intel Atom Processor N2000 and D2000 Series

Intel Media Server Studio 2017 R3 Essentials Edition for Linux* Release Notes

Product Change Notification

Intel Galileo Firmware Updater Tool

Product Change Notification

Product Change Notification

Product Change Notification

Customizing an Android* OS with Intel Build Tool Suite for Android* v1.1 Process Guide

Intel Dynamic Platform and Thermal Framework (Intel DPTF), Client Version 8.X

Product Change Notification

The Intel SSD Pro 2500 Series Guide for Microsoft edrive* Activation

Product Change Notification

Product Change Notification

Product Change Notification

Intel Manageability Commander User Guide

Product Change Notification

Product Change Notification

Product Change Notification

Product Change Notification

Product Change Notification

Product Change Notification

True Scale Fabric Switches Series

Product Change Notification

Intel Desktop Board DZ68DB

Product Change Notification

Software Evaluation Guide for WinZip* esources-performance-documents.html

Intel Parallel Studio XE 2011 for Windows* Installation Guide and Release Notes

SDK API Reference Manual for VP8. API Version 1.12

Product Change Notification

Product Change Notification

Product Change Notification

Intel Media Server Studio Professional Edition for Linux*

LED Manager for Intel NUC

Product Change Notification

HPCG on Intel Xeon Phi 2 nd Generation, Knights Landing. Alexander Kleymenov and Jongsoo Park Intel Corporation SC16, HPCG BoF

Product Change Notification

Product Change Notification

Reference Boot Loader from Intel

Intel Open Source HD Graphics. Programmer's Reference Manual

Intel Cache Acceleration Software (Intel CAS) for Linux* v2.9 (GA)

Product Change Notification

Product Change Notification

Intel vpro Technology Virtual Seminar 2010

Product Change Notification

Evolving Small Cells. Udayan Mukherjee Senior Principal Engineer and Director (Wireless Infrastructure)

Product Change Notification

Data Plane Development Kit

Intel Xeon Phi Coprocessor. Technical Resources. Intel Xeon Phi Coprocessor Workshop Pawsey Centre & CSIRO, Aug Intel Xeon Phi Coprocessor

Intel vpro Technology Virtual Seminar 2010

OMNI-PATH FABRIC TOPOLOGIES AND ROUTING

Product Change Notification

Product Change Notification

Installation Guide and Release Notes

Product Change Notification

Arnon Peleg Visual Computing Products Management

Intel Parallel Studio XE 2011 SP1 for Linux* Installation Guide and Release Notes

Product Change Notification

Bring Intelligence to the Edge with Intel Movidius Neural Compute Stick

Transcription:

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing Intel SDK for OpenCL* Applications Sample Documentation Copyright 2010 2012 Intel Corporation All Rights Reserved Document Number: 327281-001US Revision: 1.0 World Wide Web: http://www.intel.com Document Number: 327281-001US

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing Disclaimer and Legal Information 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. A "Mission Critical Application" is any application in which failure of the Intel Product could result, directly or indirectly, in personal injury or death. SHOULD YOU PURCHASE OR USE INTEL'S PRODUCTS FOR ANY SUCH MISSION CRITICAL APPLICATION, YOU SHALL INDEMNIFY AND HOLD INTEL AND ITS SUBSIDIARIES, SUBCONTRACTORS AND AFFILIATES, AND THE DIRECTORS, OFFICERS, AND EMPLOYEES OF EACH, HARMLESS AGAINST ALL CLAIMS COSTS, DAMAGES, AND EXPENSES AND REASONABLE ATTORNEYS' FEES ARISING OUT OF, DIRECTLY OR INDIRECTLY, ANY CLAIM OF PRODUCT LIABILITY, PERSONAL INJURY, OR DEATH ARISING IN ANY WAY OUT OF SUCH MISSION CRITICAL APPLICATION, WHETHER OR NOT INTEL OR ITS SUBCONTRACTOR WAS NEGLIGENT IN THE DESIGN, MANUFACTURE, OR WARNING OF THE INTEL PRODUCT OR ANY OF ITS PARTS. 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 go to: http://www.intel.com/design/literature.htm. Intel processor numbers are not a measure of performance. Processor numbers differentiate features within each processor family, not across different processor families. Go to: http://www.intel.com/products/processor_number/. Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. Intel, Intel logo, Intel Core, VTune, Xeon are trademarks of Intel Corporation in the U.S. 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. Microsoft product screen shot(s) reprinted with permission from Microsoft Corporation. Copyright 2010-2012 Intel Corporation. All rights reserved. 2 Document Number: 327281-001US

Intel SDK for OpenCL* Applications Sample Documentation 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 SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. 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 3

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing Contents About the OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing Sample5 Path... 5 Introduction... 5 Motivation... 6 Algorithm... 6 Implementation Details... 6 OpenCL* Implementation... 6 Future Work and Enhancements... 7 Project Structure... 7 Additional Requirements... 8 Controlling the Sample... 8 References... 8 4 Document Number: 327281-001US

Intel SDK for OpenCL* Applications Sample Documentation About the OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing Sample The OpenCL* and Microsoft DirectX* Video Acceleration (DXVA*) Surface Sharing sample demonstrates how to use Microsoft DXVA* and Intel SDK for OpenCL* Applications together for video post processing and real-time rendering. Path Location Executable <INSTALL_DIR>\samples\DXVASurfaceShari ng Win32\Release\DXVASurfaceSharing.exe 32- bit executable x64\release\dxvasurfacesharing.exe 64-bit executable Win32\Debug\DXVASurfaceSharing.exe 32-bit debug executable x64\debug\dxvasurfacesharing.exe 64-bit debug executable Introduction Microsoft DXVA* provides a hardware-accelerated environment used in video decoding and rendering applications. The OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing sample uses OpenCL* for video post processing and DXVA* to render the video in real-time. 5

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing Motivation The OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing sample demonstrates an OpenCL* implementation of video post processing on a shared DXVA* surface, showing how to: Share a DXVA* surface with OpenCL. Perform a few basic image post processing filters. Algorithm The algorithm consists of the following stages: 1. Create a simulated video frame and a shared DXVA* surface. 2. Use OpenCL* to write simulated video frame into DXVA* surface; convert from BGRA source frame to NV12 format. 3. Use OpenCL* to apply selected video filters on shared DXVA* surface. 4. Render the frame to screen via DXVA. Implementation Details The OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing sample demonstrates creating a shared DXVA* surface and then using OpenCL* to perform video post processing on a simulated video frame before rendering to the screen with DXVA. OpenCL* Implementation The first part of the application reads from a BMP image which is used as a simulated video frame. This image is in BGRA format and is passed to an OpenCL* kernel along with a shared DXVA* surface. This kernel does a conversion from BGRA to NV12 image format and writes the results to the DXVA* surface. The next stage of the application runs any image filter kernels that have been set to enabled. The included 6 Document Number: 327281-001US

Intel SDK for OpenCL* Applications Sample Documentation image filters are invert, which inverts the image colors and Gaussian which applies a simple Gaussian blur to the image. After the image filter kernels are finished executing the DXVA* surface is released back to DXVA* and it is then rendered to the screen. simple_write_shared.cl Accepts a buffer which is assumed 32bit BGRA image. As well as the Y and UV planes of a NV12 format shared DXVA* surface. Kernel reads a pixel from buffer, converts it from RGB to YUV format and then writes the resultant values out to the Y and UV surfaces. simple_invert_shared.cl Accepts a pair of 2 image2d planes as read only for Y and UV planes, also takes 2 image2d planes as write only for output Y and UV planes. This kernel reads in the pixel values, inverts them via subtracting the pixel values from 1.0, and then writing out the result. simple_gauss_shared.cl Accepts a pair of 2 image2d planes as read only for Y and UV planes, also takes 2 image2d planes as write only for output Y and UV planes. This kernel implements a simple version of a Gaussian image blur filter. Future Work and Enhancements The OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing sample currently contains three kernels. These kernels operate on a single pixel at a time. Their performance can be improved in future versions through changes and optimizations to process multiple pixels at a time. As a further improvement the underlying algorithm for the Gaussian blur kernel could be changed to a version that is more efficient with pixel reads. Project Structure The OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing sample project has the following structure: DXVASurfaceSharing.h Includes and headers for DXVA* sharing sample. Also contains variable and function declarations for DXVA* sharing sample. 7

OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing DXVASurfaceSharing.cpp file contains function definitions for OpenCL* DXVA* Surface sharing sample. Additional Requirements To build and run DXVA* Surface Sharing sample you need to install Microsoft Windows* SDK 7.0 or later on your system. To run this sample, you must have the Intel Processor Graphics enabled OpenCL* device available only on the 3 rd Generation Intel Core Processor Family. Controlling the Sample The sample can be controlled in the following ways 1. F1: enables/disables invert filter 2. F2: enables/disables Gaussian filter 3. F7: Enables/Disables simple frames per second calculation References [1] http://software.intel.com/en-us/articles/media/ [2] http://software.intel.com/en-us/articles/intel-media-sdk-30-beta/ [3] http://www.khronos.org/registry/cl/specs/opencl-1.1.pdf 8 Document Number: 327281-001US