obs-qsv11: Fix unusual CBR bitrate issues

For some reason, using MFX_SCENARIO_GAME_STREAMING causes the keyframe
quants to be higher than other frames, which is not desirable. In turn,
this causes bitrate to be higher than the target bitrate for a sustained
period of time after each keyframe.

Not setting the scenario removes this behavior and returns CBR to
somewhat reasonable levels of consistency.

Co-authored by: Chris (Flaeri) <flaeri@otterbro.com>
This commit is contained in:
Ryan Foster
2023-09-18 13:04:04 -04:00
parent 62500b5129
commit 03b70f0672
@@ -345,15 +345,10 @@ mfxStatus QSV_Encoder_Internal::InitParams(qsv_param_t *pParams,
if (pParams->nLADEPTH &&
m_mfxEncParams.mfx.LowPower == MFX_CODINGOPTION_ON) {
m_co2.LookAheadDepth = pParams->nLADEPTH;
m_co3.ScenarioInfo = MFX_SCENARIO_GAME_STREAMING;
}
// CQM to follow UI setting
if (pParams->bCQM && !pParams->bRepeatHeaders) {
m_co3.AdaptiveCQM = MFX_CODINGOPTION_ON;
if (m_co3.ScenarioInfo != MFX_SCENARIO_GAME_STREAMING) {
m_co3.ScenarioInfo =
MFX_SCENARIO_GAME_STREAMING;
}
} else {
m_co3.AdaptiveCQM = MFX_CODINGOPTION_OFF;
}