Am 26.01.2018 um 10:06 schrieb Ben Chang:
Thanks for the review Mark.On Thu, Jan 25, 2018 at 4:13 PM, Mark Thompson <s...@jkqxz.net> wrote:diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 4a91d99..2da251b 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -420,6 +420,12 @@ static av_cold int nvenc_check_device(AVCodecContext*avctx, int idx)goto fail; } + cu_res = dl_fn->cuda_dl->cuCtxSetLimit(CU_LIMIT_STACK_SIZE, 128); + if (cu_res != CUDA_SUCCESS) { + av_log(avctx, AV_LOG_FATAL, "Failed reducing CUDA context stacklimit for NVENC: 0x%x\n", (int)cu_res);+ goto fail; + } + ctx->cu_context = ctx->cu_context_internal; if ((ret = nvenc_pop_context(avctx)) < 0)Does this actually have any effect? I was under the impression that the CUDA context created inside the NVENC encoder wouldn't actually be used for any CUDA operations at all (really just a GPU device handle).There are some cuda kernels in the driver that may be invoked depending on the nvenc operations specified in the commandline. My observation from looking at the nvcc statistics is that most stack frame size for these cuda kernels are 0 (highest observed was 120 bytes).
Wouldn't it affect potential future CUDA filters, which might make more use of the stack?
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel