提交 f35e37a9 编写于 作者: J jpark37

obs-ffmpeg: Use NVENC preset lookahead length

If the preset specifies the lookahead length, use it. Force to previous
setting of 8 otherwise.
上级 68262859
......@@ -468,10 +468,14 @@ static bool init_encoder(struct nvenc_data *enc, obs_data_t *settings)
enc->bframes = bf;
/* lookahead */
const bool use_profile_lookahead = config->rcParams.enableLookahead;
lookahead = nv_get_cap(enc, NV_ENC_CAPS_SUPPORT_LOOKAHEAD) &&
(lookahead || config->rcParams.enableLookahead);
if (lookahead)
enc->rc_lookahead = 8;
(lookahead || use_profile_lookahead);
if (lookahead) {
enc->rc_lookahead = use_profile_lookahead
? config->rcParams.lookaheadDepth
: 8;
}
int buf_count = max(4, config->frameIntervalP * 2 * 2);
if (lookahead) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册