summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.h
diff options
context:
space:
mode:
authorAndrey Turkin <andrey.turkin@gmail.com>2016-05-25 17:05:50 +0300
committerTimo Rothenpieler <timo@rothenpieler.org>2016-05-31 15:48:43 +0200
commitfaffff88c21c24765e5a3c87ffc657b191c4efc0 (patch)
treed5733322f520eae43f93241adb04a2e3b9718dc7 /libavcodec/nvenc.h
parente1de62c5be1fb8bc498891d113ffe758fb9e33c6 (diff)
avcodec/nvenc: use AVOptions to select presets
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r--libavcodec/nvenc.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index fdb63505ef..5b81fc8667 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -104,6 +104,28 @@ typedef struct NvencDynLoadFunctions
} NvencDynLoadFunctions;
+enum {
+ PRESET_DEFAULT = 0,
+ PRESET_SLOW,
+ PRESET_MEDIUM,
+ PRESET_FAST,
+ PRESET_HP,
+ PRESET_HQ,
+ PRESET_BD ,
+ PRESET_LOW_LATENCY_DEFAULT ,
+ PRESET_LOW_LATENCY_HQ ,
+ PRESET_LOW_LATENCY_HP,
+ PRESET_LOSSLESS_DEFAULT, // lossless presets must be the last ones
+ PRESET_LOSSLESS_HP,
+};
+
+enum {
+ NVENC_LOWLATENCY = 1,
+ NVENC_LOSSLESS = 2,
+ NVENC_ONE_PASS = 4,
+ NVENC_TWO_PASSES = 8,
+};
+
typedef struct NvencContext
{
AVClass *avclass;
@@ -137,13 +159,14 @@ typedef struct NvencContext
void *nvencoder;
- char *preset;
+ int preset;
char *profile;
char *level;
char *tier;
int cbr;
int twopass;
int gpu;
+ int flags;
int buffer_delay;
} NvencContext;