[FFmpeg-devel] [PATCH] NVENC Surface Allocation Reduction

Ben Chang benc at nvidia.com
Mon Apr 24 23:01:44 EEST 2017


[sorry for re-sending; but still looking for review. Thanks!]


Hi,



This patch aims to reduce the number of input/output surfaces NVENC allocates per session. Previous default sets allocated surfaces to 32 (unless there is user specified param or lookahead involved). Having large number of surfaces consumes extra video memory (esp for higher resolution encoding), and perf return saturates at a certain point. The patch changes the surfaces calculation for default, B-frames, lookahead scenario respectively.



The other change involves surface selection. Previously, if a session allocates x surfaces, only x-1 surfaces are used (due to combination of output delay and lock toggle logic). To prevent unused surfaces, changing surface rotation to using predefined fifo.



Testing done:

-Ensure the above changes have no perf impact and does not change bitstream



Thanks,

Ben


-----------------------------------------------------------------------------------
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: NVENC_surface_allocation_reduction.patch
Type: application/octet-stream
Size: 9559 bytes
Desc: NVENC_surface_allocation_reduction.patch
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170424/edea7842/attachment.obj>


More information about the ffmpeg-devel mailing list