Refactor av1_rc_pick_q_and_bounds()
Clean up unnecessary dependency on gf_group.index.
Change-Id: Ibd2fdfa8da6ebcf3f0d5e33400edc50588340cd4
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 469e6a8..aed8250 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3688,8 +3688,8 @@
process_tpl_stats_frame(cpi);
// Decide q and q bounds.
- *q = av1_rc_pick_q_and_bounds(cpi, cm->width, cm->height, bottom_index,
- top_index);
+ *q = av1_rc_pick_q_and_bounds(cpi, cm->width, cm->height, cpi->gf_group.index,
+ bottom_index, top_index);
if (!frame_is_intra_only(cm)) {
set_high_precision_mv(cpi, (*q) < HIGH_PRECISION_MV_QTHRESH,
@@ -4034,7 +4034,8 @@
// Now decide the use of superres based on 'q'.
int bottom_index, top_index;
const int q = av1_rc_pick_q_and_bounds(
- cpi, cpi->oxcf.width, cpi->oxcf.height, &bottom_index, &top_index);
+ cpi, cpi->oxcf.width, cpi->oxcf.height, cpi->gf_group.index,
+ &bottom_index, &top_index);
const int qthresh = (frame_is_intra_only(&cpi->common))
? oxcf->superres_kf_qthresh
@@ -4055,7 +4056,8 @@
// Now decide the use of superres based on 'q'.
int bottom_index, top_index;
const int q = av1_rc_pick_q_and_bounds(
- cpi, cpi->oxcf.width, cpi->oxcf.height, &bottom_index, &top_index);
+ cpi, cpi->oxcf.width, cpi->oxcf.height, cpi->gf_group.index,
+ &bottom_index, &top_index);
const int qthresh = 128;
if (q <= qthresh) {