rtc: Fix to disabling aq-mode=3 at high Q
Only allow the disabling of aq-mode=3 at high Q
for nonrd_pick_mode, as there is possible issue
with doing this for rd pickmode (i.e., speed 6 -rt mode).
Change-Id: I94108aafffbc0213f7c79557f962479a4fc1144c
diff --git a/av1/encoder/aq_cyclicrefresh.c b/av1/encoder/aq_cyclicrefresh.c
index 9b3b078..3a55bb2 100644
--- a/av1/encoder/aq_cyclicrefresh.c
+++ b/av1/encoder/aq_cyclicrefresh.c
@@ -325,11 +325,12 @@
int qp_thresh = AOMMIN(20, rc->best_quality << 1);
int qp_max_thresh = 118 * MAXQ >> 7;
cr->apply_cyclic_refresh = 1;
+ // Disabling for high QP is only done nonrd_pick_mode for now.
if (frame_is_intra_only(cm) || is_lossless_requested(&cpi->oxcf) ||
cpi->svc.temporal_layer_id > 0 ||
rc->avg_frame_qindex[INTER_FRAME] < qp_thresh ||
- (rc->avg_frame_qindex[INTER_FRAME] > qp_max_thresh &&
- rc->frames_since_key > 20)) {
+ (cpi->sf.use_nonrd_pick_mode && rc->frames_since_key > 20 &&
+ rc->avg_frame_qindex[INTER_FRAME] > qp_max_thresh)) {
cr->apply_cyclic_refresh = 0;
return;
}