X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fnvenc.h;h=b29fbf282a154a5678222c22fb79597a3f531a13;hb=d24c9e55f64eebf67a9e488daa17332533481c20;hp=ab6825f633a316a1f5f8fbd549b86165c52af2dd;hpb=f082dcab7cdf94b6268917a6dc472d594d7538f0;p=ffmpeg diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index ab6825f633a..b29fbf282a1 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -28,7 +28,7 @@ typedef void ID3D11Device; #endif -#include "compat/nvenc/nvEncodeAPI.h" +#include #include "compat/cuda/dynlink_loader.h" #include "libavutil/fifo.h" @@ -40,6 +40,15 @@ typedef void ID3D11Device; #define RC_MODE_DEPRECATED 0x800000 #define RCD(rc_mode) ((rc_mode) | RC_MODE_DEPRECATED) +#define NVENCAPI_CHECK_VERSION(major, minor) \ + ((major) < NVENCAPI_MAJOR_VERSION || ((major) == NVENCAPI_MAJOR_VERSION && (minor) <= NVENCAPI_MINOR_VERSION)) + +// SDK 8.1 compile time feature checks +#if NVENCAPI_CHECK_VERSION(8, 1) +#define NVENC_HAVE_BFRAME_REF_MODE +#define NVENC_HAVE_QP_MAP_MODE +#endif + typedef struct NvencSurface { NV_ENC_INPUT_PTR input_surface; @@ -143,6 +152,8 @@ typedef struct NvencContext int64_t initial_pts[2]; int first_packet_output; + int support_dyn_bitrate; + void *nvencoder; int preset; @@ -174,6 +185,7 @@ typedef struct NvencContext int cqp; int weighted_pred; int coder; + int b_ref_mode; } NvencContext; int ff_nvenc_encode_init(AVCodecContext *avctx);