]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nvenc.h
qsvdec: do not sync PIX_FMT_QSV surfaces
[ffmpeg] / libavcodec / nvenc.h
index 866099789cffbb3e662fc0504c9670caf01a73c1..dfd03b5ebd7cfd44f5c3a2ccb23bc524f1c9beda 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef AVCODEC_NVENC_H
 #define AVCODEC_NVENC_H
 
-#include <cuda.h>
 #include <nvEncodeAPI.h>
 
 #include "config.h"
 
 #include "avcodec.h"
 
+#if CONFIG_CUDA
+#include <cuda.h>
+#else
+
+#if defined(_WIN32)
+#define CUDAAPI __stdcall
+#else
+#define CUDAAPI
+#endif
+
+typedef enum cudaError_enum {
+    CUDA_SUCCESS = 0
+} CUresult;
+typedef int CUdevice;
+typedef void* CUcontext;
+typedef void* CUdeviceptr;
+#endif
+
 #define MAX_REGISTERED_FRAMES 64
 
 typedef struct NVENCFrame {
@@ -74,6 +91,9 @@ typedef struct NVENCLibraryContext
 
 enum {
     PRESET_DEFAULT,
+    PRESET_SLOW,
+    PRESET_MEDIUM,
+    PRESET_FAST,
     PRESET_HP,
     PRESET_HQ,
     PRESET_BD ,
@@ -92,9 +112,17 @@ enum {
     NV_ENC_H264_PROFILE_CONSTRAINED_HIGH,
 };
 
+enum {
+    NV_ENC_HEVC_PROFILE_MAIN,
+    NV_ENC_HEVC_PROFILE_MAIN_10,
+    NV_ENC_HEVC_PROFILE_REXT,
+};
+
 enum {
     NVENC_LOWLATENCY = 1,
-    NVENC_LOSSLESS,
+    NVENC_LOSSLESS   = 2,
+    NVENC_ONE_PASS   = 4,
+    NVENC_TWO_PASSES = 8,
 };
 
 enum {
@@ -142,6 +170,17 @@ typedef struct NVENCContext {
     int rc;
     int device;
     int flags;
+    int async_depth;
+    int rc_lookahead;
+    int aq;
+    int no_scenecut;
+    int b_adapt;
+    int temporal_aq;
+    int zerolatency;
+    int nonref_p;
+    int strict_gop;
+    int aq_strength;
+    int quality;
 } NVENCContext;
 
 int ff_nvenc_encode_init(AVCodecContext *avctx);