summaryrefslogtreecommitdiffstats
path: root/libavcodec/nvenc_hevc.c
diff options
context:
space:
mode:
authorAndrey Turkin <andrey.turkin@gmail.com>2016-05-29 15:23:26 +0300
committerTimo Rothenpieler <timo@rothenpieler.org>2016-05-31 16:04:53 +0200
commit0d021cc8b30a6f81c27fbeca7f99f1ee7a20acf8 (patch)
tree98ff47c1f0a27f999e2b6979b6ed9da88c8bea73 /libavcodec/nvenc_hevc.c
parentf052ef30ef6534c811b9f349e8f17e32afbc9148 (diff)
downloadffmpeg-streaming-0d021cc8b30a6f81c27fbeca7f99f1ee7a20acf8.zip
ffmpeg-streaming-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_hevc.c')
-rw-r--r--libavcodec/nvenc_hevc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/nvenc_hevc.c b/libavcodec/nvenc_hevc.c
index a1c88db..cef19f7 100644
--- a/libavcodec/nvenc_hevc.c
+++ b/libavcodec/nvenc_hevc.c
@@ -76,7 +76,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 },
+ { "any", "Pick the first device available", 0, AV_OPT_TYPE_CONST, { .i64 = ANY_DEVICE }, 0, 0, VE, "device" },
+ { "list", "List the available devices", 0, AV_OPT_TYPE_CONST, { .i64 = LIST_DEVICES }, 0, 0, VE, "device" },
{ "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 }
};
OpenPOWER on IntegriCloud