diff options
author | Andrey Turkin <andrey.turkin@gmail.com> | 2016-05-29 15:23:26 +0300 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2016-05-31 16:04:53 +0200 |
commit | 0d021cc8b30a6f81c27fbeca7f99f1ee7a20acf8 (patch) | |
tree | 98ff47c1f0a27f999e2b6979b6ed9da88c8bea73 /libavcodec/nvenc_h264.c | |
parent | f052ef30ef6534c811b9f349e8f17e32afbc9148 (diff) | |
download | ffmpeg-0d021cc8b30a6f81c27fbeca7f99f1ee7a20acf8.tar.gz |
avcodec/nvenc: rework library load and GPU selection
Use explicit nvenc capability checks instead to determine usable devices
instead of SM versions.
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/nvenc_h264.c')
-rw-r--r-- | libavcodec/nvenc_h264.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/nvenc_h264.c b/libavcodec/nvenc_h264.c index 2fab3bfae5..cdb80f2a27 100644 --- a/libavcodec/nvenc_h264.c +++ b/libavcodec/nvenc_h264.c @@ -79,7 +79,9 @@ static const AVOption options[] = { { "surfaces", "Number of concurrent surfaces", OFFSET(nb_surfaces), AV_OPT_TYPE_INT, { .i64 = 32 }, 0, INT_MAX, VE }, { "cbr", "Use cbr encoding mode", OFFSET(cbr), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "2pass", "Use 2pass encoding mode", OFFSET(twopass), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, - { "gpu", "Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on.", OFFSET(gpu), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, + { "gpu", "Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on.", OFFSET(device), AV_OPT_TYPE_INT, { .i64 = ANY_DEVICE }, -2, INT_MAX, VE, "gpu" }, + { "any", "Pick the first device available", 0, AV_OPT_TYPE_CONST, { .i64 = ANY_DEVICE }, 0, 0, VE, "gpu" }, + { "list", "List the available devices", 0, AV_OPT_TYPE_CONST, { .i64 = LIST_DEVICES }, 0, 0, VE, "gpu" }, { "delay", "Delay frame output by the given amount of frames", OFFSET(async_depth), AV_OPT_TYPE_INT, { .i64 = INT_MAX }, 0, INT_MAX, VE }, { NULL } }; |