]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/nvenc.c
avcodec/libx264: use AV_OPT_TYPE_BOOL for fastfirstpass option
[ffmpeg] / libavcodec / nvenc.c
index 54906526eb59798187636d2faf1d406eed7abcf1..3174b01c2a2129192c8478d4e346dd37c3da5714 100644 (file)
@@ -580,7 +580,7 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
     }
 
     ctx->cu_context = NULL;
-    cu_res = dl_fn->cu_ctx_create(&ctx->cu_context, 0, dl_fn->nvenc_devices[ctx->gpu]);
+    cu_res = dl_fn->cu_ctx_create(&ctx->cu_context, 4, dl_fn->nvenc_devices[ctx->gpu]); // CU_CTX_SCHED_BLOCKING_SYNC=4, avoid CPU spins
 
     if (cu_res != CUDA_SUCCESS) {
         av_log(avctx, AV_LOG_FATAL, "Failed creating CUDA context for NVENC: 0x%x\n", (int)cu_res);