Turn off kf q adjustment in vbr/cq mode.
This is a temporary fix to mitigate the slowdown effect
from the patch that introduced this feature.
In q (constant quality) mode the slowdown is less pronounced.
STATS_CHANGED
Change-Id: Idc5a2c457492f7d0edf38cebd0c983e3692b8812
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 43b927d..2b4245b 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3634,11 +3634,16 @@
// gfu_boost);
cpi->rc.gfu_boost = (cpi->rc.gfu_boost + gfu_boost) / 2;
} else if (frame_is_intra_only(cm)) {
- const int kf_boost =
- get_kf_boost_from_r0(cpi->rd.r0, cpi->rc.frames_to_key);
- // printf("old kf boost %d new kf boost %d [%d]\n", cpi->rc.kf_boost,
- // kf_boost, cpi->rc.frames_to_key);
- cpi->rc.kf_boost = (cpi->rc.kf_boost + kf_boost) / 2;
+ // TODO(debargha): Turn off q adjustment for kf temporarily to
+ // reduce impact on speed of encoding. Need to investigate how
+ // to mitigate the issue.
+ if (cpi->oxcf.rc_mode == AOM_Q) {
+ const int kf_boost =
+ get_kf_boost_from_r0(cpi->rd.r0, cpi->rc.frames_to_key);
+ // printf("old kf boost %d new kf boost %d [%d]\n", cpi->rc.kf_boost,
+ // kf_boost, cpi->rc.frames_to_key);
+ cpi->rc.kf_boost = (cpi->rc.kf_boost + kf_boost) / 2;
+ }
}
cpi->rd.mc_count_base =
(double)mc_count_base / (cm->mi_rows * cm->mi_cols);