#endif
#if defined(_WIN32)
-#include <windows.h>
-
-#define dlopen(filename, flags) LoadLibrary(TEXT(filename))
-#define dlsym(handle, symbol) GetProcAddress(handle, symbol)
-#define dlclose(handle) FreeLibrary(handle)
+#include "compat/w32dlfcn.h"
#else
#include <dlfcn.h>
#endif
return AVERROR(ENOSYS);
}
+ ret = nvenc_check_cap(avctx, NV_ENC_CAPS_SUPPORT_TEMPORAL_AQ);
+ if (ctx->temporal_aq > 0 && ret <= 0) {
+ av_log(avctx, AV_LOG_VERBOSE, "Temporal AQ not supported\n");
+ return AVERROR(ENOSYS);
+ }
+
return 0;
}
pic_params.pictureStruct = NV_ENC_PIC_STRUCT_FRAME;
}
- pic_params.encodePicFlags = 0;
+ if (ctx->forced_idr >= 0 && frame->pict_type == AV_PICTURE_TYPE_I) {
+ pic_params.encodePicFlags =
+ ctx->forced_idr ? NV_ENC_PIC_FLAG_FORCEIDR : NV_ENC_PIC_FLAG_FORCEINTRA;
+ } else {
+ pic_params.encodePicFlags = 0;
+ }
+
pic_params.inputTimeStamp = frame->pts;
nvenc_codec_specific_pic_params(avctx, &pic_params);