summaryrefslogtreecommitdiffstats
path: root/libavcodec/nvenc.h
diff options
context:
space:
mode:
authorBen Chang <benc@nvidia.com>2017-06-24 12:14:22 +0000
committerLuca Barbato <lu_zero@gentoo.org>2017-06-24 12:35:46 +0000
commit2e8d88ad5281ab923e1d9772eb99fdfb483435c2 (patch)
tree08e2dc0a05ab98bc39eddf3a4941f79ed988e7e7 /libavcodec/nvenc.h
parentbb65eb62991e5165b9fad2702a8954a1fe3c6f1f (diff)
downloadffmpeg-streaming-2e8d88ad5281ab923e1d9772eb99fdfb483435c2.zip
ffmpeg-streaming-2e8d88ad5281ab923e1d9772eb99fdfb483435c2.tar.gz
nvenc: Use a fifo to manage the free surface pool
Previously, if a session allocates x surfaces, only x-1 surfaces are used (due to combination of output delay and lock toggle logic).
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r--libavcodec/nvenc.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 3602f16..b42b930 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -56,7 +56,6 @@ typedef struct NVENCFrame {
NV_ENC_OUTPUT_PTR out;
NV_ENC_BUFFER_FORMAT format;
- int locked;
} NVENCFrame;
typedef CUresult(CUDAAPI *PCUINIT)(unsigned int Flags);
@@ -145,7 +144,7 @@ typedef struct NVENCContext {
int nb_surfaces;
NVENCFrame *frames;
AVFifoBuffer *timestamps;
- AVFifoBuffer *pending, *ready;
+ AVFifoBuffer *pending, *ready, *unused_surface_queue;
struct {
CUdeviceptr ptr;
OpenPOWER on IntegriCloud