NVDECODEAPI_PG | Jan 2019
Programming Guide
NVIDIA VIDEO DECODER
INTERFACE
NVIDIA VIDEO DECODER INTERFACE NVDECODEAPI_PG | 2
DOCUMENT CHANGE HISTORY
NVDECODEAPI_PG
Version
Date
Authors
Description of Change
1.0
2016/6/10
VU/CC
Initial release
2.0
2017/2/15
SM
Update for SDK 8.0
3.0
2018/1/10
SM
Update for SDK 8.1
4.0
2018/4/10
SM
Update for SDK 8.2
5.0
2019/1/10
SM
Update for SDK 9.0
NVIDIA VIDEO DECODER INTERFACE NVDECODEAPI_PG | 3
TABLE OF CONTENTS
Chapter 1. Overview ...................................................................................... 5
1.1 Supported Codecs ..................................................................................... 6
Chapter 2. Video Decoder Capabilities .............................................................. 7
Chapter 3. Video Decoder Pipeline ................................................................... 9
Chapter 4. Using NVIDIA Video Decoder (NVDECODE API) ................................ 10
4.1 Querying decode capabailities ...................................................................... 10
4.2 Creating a Decoder ................................................................................... 11
4.3 Decoding the frame/field ............................................................................ 13
4.4 Preparing the decoded frame for further processing ........................................... 14
4.5 Querying the decoding status ...................................................................... 15
4.6 Reconfiguring the decoder .......................................................................... 16
4.7 Destroying the decoder .............................................................................. 17
4.8 Writing an Efficient Decode Application ........................................................... 17
NVIDIA VIDEO DECODER INTERFACE NVDECODEAPI_PG | 5
Chapter 1.
OVERVIEW
NVIDIA GPUs - beginning with the Fermi generation - contain a video decoder engine
(referred to as NVDEC in this document) which provides fully-accelerated hardware
video decoding capability. NVDEC can be used for decoding bitstreams of various
formats: H.264, HEVC (H.265), VP8, VP9, MPEG-1, MPEG-2, MPEG-4 and VC-1. NVDEC
runs completely independent of compute/graphics engine.
NVIDIA provides software API and libraries for programming NVDEC. The software
API, hereafter referred to as NVDECODE API lets developers access the video decoding
features of NVDEC and interoperate NVDEC with other engines on the GPU.
NVDEC decodes the compressed video streams and copies the resulting YUV frames to
video memory. With frames in video memory, video post processing can be done using
CUDA. Decoded video frames can either be presented to the display with graphics
interoperability for video playback, or can be passed directly to a dedicated hardware
encoder (NVENC) for high-performance video transcoding, or can also be used for GPU
accelerated inferencing.