[FFmpeg-devel] [PATCH] (for discussion): ffmpeg_filter: initialize cuvid for filter_complex

Miroslav Slugeň thunder.m at email.cz
Mon Feb 13 23:24:25 EET 2017


Dne 13.2.2017 v 11:18 Timo Rothenpieler napsal(a):
>>> That's what it looks like for me:
>>> https://bpaste.net/show/890855410dac
>>>
>>> Happens on two independend machines, on both Windows using MSVC and
>>> Linux with gcc.
>>> Both machines are definitely nowehre near out of memory, on either
>>> system or device memory.
>>> _______________________________________________
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> Can't reproduce it on two my systems with same sample and same command
>> line.
>>
>> First 1000 lines:
>> 375.26: https://bpaste.net/show/bed97b3e0287
>> 378.09: https://bpaste.net/show/912c042036cd
>>
>> Configuration1:
>> Debian Jessie Linux desktop 4.8.0-0.bpo.2-amd64 #1 SMP Debian
>> 4.8.15-2~bpo8+2 (2017-01-17) x86_64 GNU/Linux
>> GeForce GTX 1060, drivers 375.26
>>
>> Configuration2:
>> Debian Jessie Linux pascal 4.7.0-0.bpo.1-amd64 #1 SMP Debian
>> 4.7.8-1~bpo8+1 (2016-10-19) x86_64 GNU/Linux
>> GeForce GTX 1080, drivers 378.09
> That's not built from the right branch.
> Most notably: On the filter-merge branch, the cuvid pfnSequenceCallback
> happens before the "Nvenc initialized successfully", on your log Nvenc
> still gets initialized first.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
It is problem in NVENC.

You create first frame before initialization of NVENC in CUVID, so this 
first frame is not accesible to NVENC until 
dl_fn->cuda_dl->cuCtxPushCurrent(ctx->cu_context) is called in NVENC.

This trivial patch should fix your problem.

M.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg_new_filter_hwaccel_fix.diff
Type: text/x-patch
Size: 485 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170213/07f40a0e/attachment.bin>


More information about the ffmpeg-devel mailing list