Merge pull request #459 from BtbN/nvenc_delay_perf
Delay NVENC Frame output to enhance performancemaster
commit
e4e06afc0a
|
@ -209,7 +209,7 @@ void NVENCEncoder::init()
|
|||
encoderPreset = NV_ENC_PRESET_HQ_GUID;
|
||||
is2PassRC = false;
|
||||
}
|
||||
if (height > 720 || (height == 720 && fps > 30))
|
||||
if (height > 720 || (height == 720 && fps > 60))
|
||||
{
|
||||
encoderPreset = NV_ENC_PRESET_LOW_LATENCY_HQ_GUID;
|
||||
is2PassRC = false;
|
||||
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue