diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-01-30 22:06:47 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-02-12 10:19:40 +0100 |
commit | 118beda355076acf03611e5c8bc147a9c634e54f (patch) | |
tree | f234664983a377ded267f53cf10e5f19b8fb06bb /libavcodec/nvenc.h | |
parent | 28259c13db784d4b4175ca323dc1eeffec7f919b (diff) | |
download | ffmpeg-118beda355076acf03611e5c8bc147a9c634e54f.tar.gz |
nvenc: merge input and output surface structs
An input frame always corresponds to exactly one output packet, so there
is no point in complicating the situation by managing them separately.
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r-- | libavcodec/nvenc.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index 7b1e8a5596..6edca75195 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -27,17 +27,12 @@ #include "avcodec.h" -typedef struct NVENCInputSurface { - NV_ENC_INPUT_PTR in; +typedef struct NVENCFrame { + NV_ENC_INPUT_PTR in; + NV_ENC_OUTPUT_PTR out; NV_ENC_BUFFER_FORMAT format; int locked; -} NVENCInputSurface; - -typedef struct NVENCOutputSurface { - NV_ENC_OUTPUT_PTR out; - NVENCInputSurface *in; - int busy; -} NVENCOutputSurface; +} NVENCFrame; typedef CUresult(CUDAAPI *PCUINIT)(unsigned int Flags); typedef CUresult(CUDAAPI *PCUDEVICEGETCOUNT)(int *count); @@ -107,8 +102,7 @@ typedef struct NVENCContext { CUcontext cu_context; int nb_surfaces; - NVENCInputSurface *in; - NVENCOutputSurface *out; + NVENCFrame *frames; AVFifoBuffer *timestamps; AVFifoBuffer *pending, *ready; |