[FFmpeg-devel] [PATCH] avcodec/nvenc : fix hw accelerated transcode with bframes

Ganapathy Raman Kasi gkasi at nvidia.com
Fri Jun 2 20:47:43 EEST 2017


Hi,

HW accelerated transcode (h264_cuvid -> h264_nvenc with -hwaccel cuvid) was broken after the filtergraph initialization was changed to intialize decoder first followed by encoder (commit af1761f7b5b1b72197dc40934953b775c2d951cc). During initialzing encoder with bframes, local buffers are allocated internally in encoder which fails since no cuda context is bound to current cpu thread. Now pushing the correct cuda context before encoder initialization fixes the issue. Also adding push/pop cuda ctx during create/destroy/map/unmap resources and destroy encoder session.

Regards
Ganapathy


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avcodec-nvenc-fix-hw-accelerated-transcode-with-bframes.patch
Type: application/octet-stream
Size: 6213 bytes
Desc: avcodec-nvenc-fix-hw-accelerated-transcode-with-bframes.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170602/22724e28/attachment.obj>


More information about the ffmpeg-devel mailing list