nvenc: Minimize the surface allocation
authorBen Chang <benc@nvidia.com>
Sat, 24 Jun 2017 12:17:14 +0000 (12:17 +0000)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 24 Jun 2017 12:35:52 +0000 (12:35 +0000)
commit7cb053e4ddf258e2dbf52ccc586548680742d758
treef3b08d74bc31a0d935bf9a2b70d657e0c583fd8f
parent2e8d88ad5281ab923e1d9772eb99fdfb483435c2
nvenc: Minimize the surface allocation

The previous default sets the allocated surfaces to 32 unless it is
user-overridden or the lookahead parameter is set.

Change the surfaces calculation for default, B-frames and lookahead scenario.
libavcodec/nvenc.c
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c