Minor tpl model changes
Change-Id: If5096980b76e8ac218d8b3aa94b6514f37ece31f
diff --git a/av1/common/enums.h b/av1/common/enums.h
index d7df402..9a78f66 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -522,7 +522,7 @@
#define DELTA_Q_SMALL 3
#define DELTA_Q_PROBS (DELTA_Q_SMALL)
#define DEFAULT_DELTA_Q_RES_PERCEPTUAL 4
-#define DEFAULT_DELTA_Q_RES_OBJECTIVE 8
+#define DEFAULT_DELTA_Q_RES_OBJECTIVE 4
#define DELTA_LF_SMALL 3
#define DELTA_LF_PROBS (DELTA_LF_SMALL)
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 2ce47dc..7c98a35 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -3820,13 +3820,14 @@
mc_saved_base != 0.0
? ((double)mc_saved - mc_saved_base) / mc_saved_base
: 0.0;
- offset = -(int)rint(mc_saved_beta * 4.0);
+ offset = -(int)rint(mc_saved_beta * 2.0);
+ // printf("mc_saved_beta %g, offset %d\n", mc_saved_beta, offset);
}
aom_clear_system_state();
- offset = AOMMIN(offset, DEFAULT_DELTA_Q_RES_OBJECTIVE * 2);
- offset = AOMMAX(offset, -DEFAULT_DELTA_Q_RES_OBJECTIVE * 2);
+ offset = AOMMIN(offset, DEFAULT_DELTA_Q_RES_OBJECTIVE * 3 - 1);
+ offset = AOMMAX(offset, -DEFAULT_DELTA_Q_RES_OBJECTIVE * 3 + 1);
int qindex = cm->base_qindex + offset;
qindex = AOMMIN(qindex, MAXQ);
qindex = AOMMAX(qindex, MINQ);
@@ -3864,7 +3865,7 @@
assert(cpi->oxcf.enable_tpl_model);
// Setup deltaq based on tpl stats
current_qindex =
- get_q_for_deltaq_objective(cpi, sb_size, 1, mi_row, mi_col);
+ get_q_for_deltaq_objective(cpi, sb_size, 2, mi_row, mi_col);
}
const int qmask = ~(delta_q_info->delta_q_res - 1);