NVENC: Delay frame output as long as possible

This gives the driver/GPU some time to streamline frame-copying and in turn brings a massive performance gain.
master
BtbN 2015-12-08 12:36:56 +01:00
parent 2d9f782ecb
commit 22d20427e2
1 changed files with 1 additions and 1 deletions

View File

@ -590,7 +590,7 @@ bool NVENCEncoder::Encode(LPVOID picIn, List<DataPacket> &packets, List<PacketTy
}
}
if (!outputSurfaceQueueReady.empty())
if (!outputSurfaceQueueReady.empty() && (!picIn || outputSurfaceQueue.size() + outputSurfaceQueueReady.size() >= maxSurfaceCount - 1))
{
NVENCEncoderOutputSurface *qSurf = outputSurfaceQueueReady.front();
outputSurfaceQueueReady.pop();