Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing

Similar documents
OpenCL* and Microsoft DirectX* Video Acceleration Surface Sharing

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

Bitonic Sorting Intel OpenCL SDK Sample Documentation

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

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

Intel Stereo 3D SDK Developer s Guide. Alpha Release

Collecting OpenCL*-related Metrics with Intel Graphics Performance Analyzers

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

Intel Cache Acceleration Software for Windows* Workstation

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

LED Manager for Intel NUC

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

Drive Recovery Panel

Intel Media Server Studio Professional Edition for Linux*

Installation Guide and Release Notes

Intel vpro Technology Virtual Seminar 2010

Intel vpro Technology Virtual Seminar 2010

SDK API Reference Manual for VP8. API Version 1.12

Intel Desktop Board DZ68DB

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

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

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

MICHAL MROZEK ZBIGNIEW ZDANOWICZ

Installation Guide and Release Notes

Optimizing Film, Media with OpenCL & Intel Quick Sync Video

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

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

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

Intel Parallel Studio XE 2015 Composer Edition for Linux* Installation Guide and Release Notes

Intel Core TM i7-4702ec Processor for Communications Infrastructure

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

Introduction. How it works

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

Intel Core TM Processor i C Embedded Application Power Guideline Addendum

Solid-State Drive System Optimizations In Data Center Applications

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

Intel Integrated Native Developer Experience 2015 Build Edition for OS X* Installation Guide and Release Notes

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

Intel RealSense Depth Module D400 Series Software Calibration Tool

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

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

Theory and Practice of the Low-Power SATA Spec DevSleep

Optimizing the operations with sparse matrices on Intel architecture

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

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

Software Occlusion Culling

Installation Guide and Release Notes

6th Generation Intel Core Processor Series

Software Evaluation Guide for ImTOO* YouTube* to ipod* Converter Downloading YouTube videos to your ipod

Intel Desktop Board D945GCLF2

Intel RealSense D400 Series Calibration Tools and API Release Notes

Using Web Workers to Improve the Performance of Metro HTML5- JavaScript* Apps

The Intel Processor Diagnostic Tool Release Notes

Maximize Performance and Scalability of RADIOSS* Structural Analysis Software on Intel Xeon Processor E7 v2 Family-Based Platforms

IEEE1588 Frequently Asked Questions (FAQs)

Case Study: Optimizing King of Soldier* with Intel Graphics Performance Analyzers on Intel HD Graphics 4000

Intel Desktop Board D946GZAB

Krzysztof Laskowski, Intel Pavan K Lanka, Intel

Intel Desktop Board DG41CN

Intel Desktop Board D975XBX2

OpenCL* Device Fission for CPU Performance

Installation Guide and Release Notes

Intel Platform Controller Hub EG20T

Also a new Metro style sample application which showcases media files transcoding with parameter control using Metro design language is introduced.

Intel Platform Controller Hub EG20T

Intel Desktop Board DG31PR

Using the Intel VTune Amplifier 2013 on Embedded Platforms

Intel Integrated Native Developer Experience 2015 Build Edition for OS X* Installation Guide and Release Notes

More performance options

Intel Desktop Board DG41RQ

OpenMP * 4 Support in Clang * / LLVM * Andrey Bokhanko, Intel

Intel G31/P31 Express Chipset

Intel Desktop Board D945GCCR

Intel Graphics Virtualization Technology. Kevin Tian Graphics Virtualization Architect

Using Intel Inspector XE 2011 with Fortran Applications

Software Evaluation Guide for CyberLink MediaEspresso *

Intel Cache Acceleration Software - Workstation

Intel & Lustre: LUG Micah Bhakti

Intel Parallel Amplifier Sample Code Guide

Intel 945(GM/GME)/915(GM/GME)/ 855(GM/GME)/852(GM/GME) Chipsets VGA Port Always Enabled Hardware Workaround

Vectorization Advisor: getting started

Intel s Architecture for NFV

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

Intel and Badaboom Video File Transcoding

Data Center Energy Efficiency Using Intel Intelligent Power Node Manager and Intel Data Center Manager

Intel Media Server Studio 2018 R1 Essentials Edition for Linux* Release Notes

Intel RealSense SDK Gesture Sequences Implemented in Unity* 3D

Intel Desktop Board DH61SA

Getting Started with Intel SDK for OpenCL Applications

Intel Desktop Board DP55SB

Intel Media Server Studio 2018 R1 - HEVC Decoder and Encoder Release Notes (Version )

Version 1.0. Intel-powered classmate PC Arcsoft WebCam Companion 3* Training Foils. *Other names and brands may be claimed as the property of others.

PARDISO - PARallel DIrect SOlver to solve SLAE on shared memory architectures

Intel Desktop Board D945GCLF

Intel USB 3.0 extensible Host Controller Driver

Intel Platform Controller Hub EG20T

Intel Xeon Processor E v3 Family

Device Firmware Update (DFU) for Windows

2013 Intel Corporation

Intel Desktop Board DH55TC

Transcription:

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

Sample for OpenCL* and 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. 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 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-2013 Intel Corporation. All rights reserved. 2 Document Number: 328784-001US

Intel OpenCL SDK 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

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

Intel OpenCL SDK Sample Documentation About the Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing The Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing demonstrates how to use Microsoft DirectX Video Acceleration* (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 Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing uses OpenCL for video post processing and DXVA to render the video in real-time. 5

Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing Motivation The Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing 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 Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing 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. It uses the cl_khr_dx9_media_sharing extension to avoid extra memory copying from the DXVA frame into Intel SDK for OpenCL Applications memory object. 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 6 Document Number: 328784-001US

Intel OpenCL SDK Sample Documentation 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 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 that 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 by 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 Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing 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. 7

Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing Project Structure The Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing project has the following structure: DXVASurfaceSharing.h includes and headers for DXVA sharing sample. Also contains variable and function declarations for DXVA sharing sample. DXVASurfaceSharing.cpp contains function definitions for the Sample for OpenCL* and DirectX* Video Acceleration Surface Sharing. Additional Requirements To build and run DXVA Surface Sharing sample you need to install Microsoft Windows* SDK 7.0 or higher on your system. To run this sample, you must have the Intel HD Graphics enabled OpenCL device available only on the 3 rd Generation Intel Core processors. 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://www.khronos.org/registry/cl/specs/opencl-1.2.pdf 8 Document Number: 328784-001US