From 9b2378bdf7868c4ed955ec719a9a8eac1465f676 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Tue, 5 Feb 2019 11:41:06 -0800 Subject: [PATCH] Fix VPX_KF_DISABLED. VP9 encoder still inserts key frame periodically when VPX_KF_DISABLED is set in non SVC for 1-pass CBR. BUG=webm:1592 Change-Id: Ie99d7c5b95230d739e263a2d87879693c53f620e --- vp9/encoder/vp9_ratectrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 9df2eb333..e3422509d 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -2271,7 +2271,7 @@ void vp9_rc_get_one_pass_cbr_params(VP9_COMP *cpi) { RATE_CONTROL *const rc = &cpi->rc; int target; if ((cm->current_video_frame == 0) || (cpi->frame_flags & FRAMEFLAGS_KEY) || - rc->frames_to_key == 0) { + (cpi->oxcf.auto_key && rc->frames_to_key == 0)) { cm->frame_type = KEY_FRAME; rc->frames_to_key = cpi->oxcf.key_freq; rc->kf_boost = DEFAULT_KF_BOOST; -- 2.40.0