PG-4118, Advanced GPU Accelerated Video Editing, by Steve Hoeg
-
Upload
amd-developer-central -
Category
Technology
-
view
732 -
download
3
description
Transcript of PG-4118, Advanced GPU Accelerated Video Editing, by Steve Hoeg
ADVANCED GPU ACCELERATED VIDEO EDITING STEVE HOEG
ENGINEERING MANAGER ADOBE PREMIERE PRO
2 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
3 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Benefits
y Faster performance
y ConHnuous playback y Higher bit depths y 10-‐bit display y Large frame sizes
y Improved quality
GPU
CPU
Scaling Performance
Effect Performance
4 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Pipeline
Disk IO CPU Processing Upload GPU
Processing Display/ Export
5 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Accelerated Effects § Intrinsics
§ Adjustment layers § Color space conversion § Debayering § Deinterlacing § ComposiHng § Blending modes § Nested Sequences § MulHcam § Time remapping
§ TransiHons § AddiHve dissolve § Cross dissolve § Dip to black § Dip to white § Film Dissolve § Push § Slide § Wipe
§ Effects § Alpha adjust § Basic 3D § Black & white § Brightness & contrast § Color balance § Color pass § Color replace § Crop § DirecHonal blur § Drop Shadow § Extract § Fast blur § Fast color corrector § Feather edges § Gamma correcHon § Garbage ma_e § Gaussian blur § Horizontal flip
§ Invert § Luma corrector § Luma curve § Lumetri § Noise § Proc amp § RGB color corrector § RGB curves § Sharpen § Three-‐way color corrector § Timecode § Tint § Track ma_e § Ultra keyer § VerHcal flip § Video limiter § Warp Stabilizer
6 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Supported AMD Cards § Radeon HD 6650M
§ Radeon HD 6730M
§ Radeon HD 6750
§ Radeon HD 6750M
§ Radeon HD 6770
§ Radeon HD 6770M
§ Radeon HD 6950
§ Radeon HD 6970
§ Radeon HD 7510M
§ Radeon HD 7530M
§ Radeon HD 7550M
§ Radeon HD 7570
§ Radeon HD 7570M
§ Radeon HD 7590M
§ Radeon HD 7610M
§ Radeon HD 7630M
§ Radeon HD 7650M
§ Radeon HD 7970
§ Radeon HD 8470
§ Radeon HD 8550M
§ Radeon HD 8570
§ Radeon HD 8570M
§ Radeon HD 8670
§ Radeon HD 8670M
§ Radeon HD 8690M
§ Radeon HD 8730M
§ Radeon HD 8740
§ Radeon HD 8750M
§ Radeon HD 8760
§ Radeon HD 8770
§ Radeon HD 8770M
§ Radeon HD 8790M
§ Radeon HD 8870
§ Radeon HD 8950
§ Radeon HD 8970
§ Radeon R7 260X
§ FirePro M2000
§ FirePro V3900
§ FirePro M4000
§ FirePro V4900
§ FirePro W5000
§ FirePro V5900
§ FirePro M5950
§ FirePro M6000
§ FirePro S7000
§ FirePro W7000
§ FirePro V7900
§ FirePro W8000
§ FirePro S9000
§ FirePro W9000
§ FirePro S10000
§ Radeon HD 7670
§ Radeon HD 7670M
§ Radeon HD 7690M
§ Radeon HD 7730M
§ Radeon HD 7750
§ Radeon HD 7750M
§ Radeon HD 7770
§ Radeon HD 7770M
§ Radeon HD 7790
§ Radeon HD 7850
§ Radeon HD 7850M
§ Radeon HD 7870
§ Radeon HD 7870M
§ Radeon HD 7870
§ Radeon HD 7970M
§ Radeon HD 7950
§ Radeon HD 7970
7 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
ImplementaHon
y Treat GPU as a co-‐processor y Subtree rendering for non-‐accelerated effects y Draw with OpenGL interop
§ clCreateFromGLBuffer § clEnqueueAcquireGLObjects
8 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Gaussian Blur
§ Smear vertically
§ Smear horizontally
y Recursive Gaussian computed using Deriche’s method
y ExecuHon Hme independent of blur radius, depends only on image size
y Example of algorithm tradiHonally inefficient on GPUs
9 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Manual Filter ConcatenaHon
y Host kernel for successive pointwise effects y Read once, apply mulHple filters, write once
Pixel pixel = ReadInput(); for (int i =0; i < filter_count; ++i) {
switch(filter[i].type) { case BlackAndWhite: pixel = BlackAndWhite(pixel); break; case FastColorCorrector: pixel = FastColorCorrector(pixel); break; . . . }
} Write(pixel);
10 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
MulHple GPUs
11 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Lumetri
12 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Debayering
13 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
PorHng to OpenCL
y Asynchronous & cached kernel loading y OpenCL Buffers vs Images
y Working with vendors
14 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
CUDA/OpenCL AbstracHons
CUdevice cl_device_id
CUcontext cl_context
CUcontext cl_command_queue
cuMemAlloc clCreateBuffer
cuLaunchGridAsync clEnqueueNDRangeKernel
cuGLCtxCreate clCreateContext
15 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
Tools
y Online vs offline compilaHon
y Most profiling sHll with event Hmers
y Debugging
16 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
GPU Plugins
typedef struct {
prSuiteError (*CreateInstance)( PrGPUFilterInstance* ioInstanceData); prSuiteError (*DisposeInstance)( PrGPUFilterInstance* ioInstanceData);
prSuiteError (*GetFrameDependencies)( PrGPUFilterInstance* inInstanceData, const PrGPUFilterRenderParams* inRenderParams, csSDK_int32* ioQueryIndex, PrGPUFilterFrameDependency* outFrameDependencies);
prSuiteError (*Precompute)( PrGPUFilterInstance* inInstanceData, const PrGPUFilterRenderParams* inRenderParams, csSDK_int32 inIndex, PPixHand inFrame);
prSuiteError (*Render)( PrGPUFilterInstance* inInstanceData, const PrGPUFilterRenderParams* inRenderParams, const PPixHand* inFrames, csSDK_size_t inFrameCount, PPixHand* outFrame);
} PrGPUFilter;
17 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
18 | ADVANCED GPU ACCELERATED VIDEO EDITING | NOVEMBER 19, 2013 | CONFIDENTIAL
DISCLAIMER & ATTRIBUTION
The informaHon presented in this document is for informaHonal purposes only and may contain technical inaccuracies, omissions and typographical errors.
The informaHon contained herein is subject to change and may be rendered inaccurate for many reasons, including but not limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases, product differences between differing manufacturers, soiware changes, BIOS flashes, firmware upgrades, or the like. AMD assumes no obligaHon to update or otherwise correct or revise this informaHon. However, AMD reserves the right to revise this informaHon and to make changes from Hme to Hme to the content hereof without obligaHon of AMD to noHfy any person of such revisions or changes.
AMD MAKES NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE CONTENTS HEREOF AND ASSUMES NO RESPONSIBILITY FOR ANY INACCURACIES, ERRORS OR OMISSIONS THAT MAY APPEAR IN THIS INFORMATION.
AMD SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AMD BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED HEREIN, EVEN IF AMD IS EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
ATTRIBUTION
© 2013 Advanced Micro Devices, Inc. All rights reserved. AMD, the AMD Arrow logo and combinaHons thereof are trademarks of Advanced Micro Devices, Inc. in the United States and/or other jurisdicHons. SPEC is a registered trademark of the Standard Performance EvaluaHon CorporaHon (SPEC). Other names are for informaHonal purposes only and may be trademarks of their respecHve owners.