git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f58e011
)
avcodec/nvenc: change flag of cuCtxCreate to avoid CPU spins
author
Agatha Hu
<ahu@nvidia.com>
Fri, 11 Sep 2015 02:54:08 +0000
(10:54 +0800)
committer
Timo Rothenpieler
<timo@rothenpieler.org>
Fri, 11 Sep 2015 08:11:29 +0000
(10:11 +0200)
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
libavcodec/nvenc.c
patch
|
blob
|
history
diff --git
a/libavcodec/nvenc.c
b/libavcodec/nvenc.c
index
5490652
..
3174b01
100644
(file)
--- a/
libavcodec/nvenc.c
+++ b/
libavcodec/nvenc.c
@@
-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);