FFmpeg
|
Data Structures | |
struct | CUVIDDECODECREATEINFO |
struct | CUVIDH264DPBENTRY |
struct | CUVIDH264MVCEXT |
struct | CUVIDH264SVCEXT |
struct | CUVIDH264PICPARAMS |
struct | CUVIDMPEG2PICPARAMS |
struct | CUVIDMPEG4PICPARAMS |
struct | CUVIDVC1PICPARAMS |
struct | CUVIDJPEGPICPARAMS |
struct | CUVIDHEVCPICPARAMS |
struct | CUVIDVP8PICPARAMS |
struct | CUVIDVP9PICPARAMS |
struct | CUVIDPICPARAMS |
struct | CUVIDPROCPARAMS |
Macros | |
#define | I_VOP 0 |
#define | P_VOP 1 |
#define | B_VOP 2 |
#define | S_VOP 3 |
Functions | |
CUresult CUDAAPI | cuvidCreateDecoder (CUvideodecoder *phDecoder, CUVIDDECODECREATEINFO *pdci) |
In order to minimize decode latencies, there should be always at least 2 pictures in the decode queue at any time, in order to make sure that all decode engines are always busy. More... | |
CUresult CUDAAPI | cuvidDestroyDecoder (CUvideodecoder hDecoder) |
Destroy the decoder object. More... | |
CUresult CUDAAPI | cuvidDecodePicture (CUvideodecoder hDecoder, CUVIDPICPARAMS *pPicParams) |
Decode a single picture (field or frame) More... | |
CUresult CUDAAPI | cuvidMapVideoFrame (CUvideodecoder hDecoder, int nPicIdx, unsigned int *pDevPtr, unsigned int *pPitch, CUVIDPROCPARAMS *pVPP) |
Post-process and map a video frame for use in cuda. More... | |
CUresult CUDAAPI | cuvidUnmapVideoFrame (CUvideodecoder hDecoder, unsigned int DevPtr) |
Unmap a previously mapped video frame. More... | |
CUresult CUDAAPI | cuvidCtxLockCreate (CUvideoctxlock *pLock, CUcontext ctx) |
Context-locking: to facilitate multi-threaded implementations, the following 4 functions provide a simple mutex-style host synchronization. More... | |
CUresult CUDAAPI | cuvidCtxLockDestroy (CUvideoctxlock lck) |
CUresult CUDAAPI | cuvidCtxLock (CUvideoctxlock lck, unsigned int reserved_flags) |
CUresult CUDAAPI | cuvidCtxUnlock (CUvideoctxlock lck, unsigned int reserved_flags) |
#define I_VOP 0 |
Definition at line 331 of file cuviddec.h.
#define P_VOP 1 |
Definition at line 332 of file cuviddec.h.
#define B_VOP 2 |
Definition at line 333 of file cuviddec.h.
#define S_VOP 3 |
Definition at line 334 of file cuviddec.h.
enum cudaVideoCodec |
Video Codec Enums
Definition at line 64 of file cuviddec.h.
Video Surface Formats Enums
Enumerator | |
---|---|
cudaVideoSurfaceFormat_NV12 |
NV12 (currently the only supported output format) |
Definition at line 89 of file cuviddec.h.
Deinterlacing Modes Enums
Enumerator | |
---|---|
cudaVideoDeinterlaceMode_Weave |
Weave both fields (no deinterlacing) |
cudaVideoDeinterlaceMode_Bob |
Drop one field. |
cudaVideoDeinterlaceMode_Adaptive |
Adaptive deinterlacing. |
Definition at line 97 of file cuviddec.h.
Chroma Formats Enums
Enumerator | |
---|---|
cudaVideoChromaFormat_Monochrome |
MonoChrome. |
cudaVideoChromaFormat_420 |
4:2:0 |
cudaVideoChromaFormat_422 |
4:2:2 |
cudaVideoChromaFormat_444 |
4:4:4 |
Definition at line 107 of file cuviddec.h.
enum cudaVideoCreateFlags |
Decoder Flags Enums
Definition at line 118 of file cuviddec.h.
CUresult CUDAAPI cuvidCreateDecoder | ( | CUvideodecoder * | phDecoder, |
CUVIDDECODECREATEINFO * | pdci | ||
) |
In order to minimize decode latencies, there should be always at least 2 pictures in the decode queue at any time, in order to make sure that all decode engines are always busy.
Overall data flow:
NOTE:
Create the decoder object
Referenced by cuvid_test_dummy_decoder().
CUresult CUDAAPI cuvidDestroyDecoder | ( | CUvideodecoder | hDecoder | ) |
Destroy the decoder object.
Referenced by cuvid_decode_end(), cuvid_handle_video_sequence(), and cuvid_test_dummy_decoder().
CUresult CUDAAPI cuvidDecodePicture | ( | CUvideodecoder | hDecoder, |
CUVIDPICPARAMS * | pPicParams | ||
) |
Decode a single picture (field or frame)
Referenced by cuvid_handle_picture_decode().
CUresult CUDAAPI cuvidMapVideoFrame | ( | CUvideodecoder | hDecoder, |
int | nPicIdx, | ||
unsigned int * | pDevPtr, | ||
unsigned int * | pPitch, | ||
CUVIDPROCPARAMS * | pVPP | ||
) |
Post-process and map a video frame for use in cuda.
Referenced by cuvid_output_frame().
CUresult CUDAAPI cuvidUnmapVideoFrame | ( | CUvideodecoder | hDecoder, |
unsigned int | DevPtr | ||
) |
Unmap a previously mapped video frame.
Referenced by cuvid_output_frame().
CUresult CUDAAPI cuvidCtxLockCreate | ( | CUvideoctxlock * | pLock, |
CUcontext | ctx | ||
) |
Context-locking: to facilitate multi-threaded implementations, the following 4 functions provide a simple mutex-style host synchronization.
If a non-NULL context is specified in CUVIDDECODECREATEINFO, the codec library will acquire the mutex associated with the given context before making any cuda calls. A multi-threaded application could create a lock associated with a context handle so that multiple threads can safely share the same cuda context:
NOTE: This is a safer alternative to cuCtxPushCurrent and cuCtxPopCurrent, and is not related to video decoder in any way (implemented as a critical section associated with cuCtx{Push|Pop}Current calls).
CUresult CUDAAPI cuvidCtxLockDestroy | ( | CUvideoctxlock | lck | ) |
CUresult CUDAAPI cuvidCtxLock | ( | CUvideoctxlock | lck, |
unsigned int | reserved_flags | ||
) |
CUresult CUDAAPI cuvidCtxUnlock | ( | CUvideoctxlock | lck, |
unsigned int | reserved_flags | ||
) |