Reduce entropy cost update frequency for mode
A speed feature option is introduced to reduce entropy cost update
frequency for mode. This change is applicable for speed preset 6.
Instruction Count BD-Rate Loss(%)
cpu-used Reduction(%) avg.psnr ovr.psnr ssim
6 0.474 0.0599 0.0567 0.0601
STATS_CHANGED
Change-Id: Ib12b7198445467ec99b4a3624d31a0a73b8b77cc
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 557585a..edbba09 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -1388,6 +1388,9 @@
if (mi_col != tile_info->mi_col_start) break;
AOM_FALLTHROUGH_INTENDED;
case COST_UPD_SB: // SB level
+ if (cpi->sf.inter_sf.mode_cost_upd_level == INTERNAL_COST_UPD_SBROW &&
+ mi_col != tile_info->mi_col_start)
+ break;
av1_fill_mode_rates(cm, &x->mode_costs, xd->tile_ctx);
break;
default: assert(0);
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 66f2792..44a3fde 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -708,6 +708,7 @@
if (!is_720p_or_larger) {
sf->inter_sf.mv_cost_upd_level = INTERNAL_COST_UPD_SBROW_SET;
sf->inter_sf.coeff_cost_upd_level = INTERNAL_COST_UPD_SBROW;
+ sf->inter_sf.mode_cost_upd_level = INTERNAL_COST_UPD_SBROW;
}
if (is_720p_or_larger) {
@@ -1591,6 +1592,7 @@
inter_sf->reuse_inter_intra_mode = 0;
inter_sf->mv_cost_upd_level = INTERNAL_COST_UPD_SB;
inter_sf->coeff_cost_upd_level = INTERNAL_COST_UPD_SB;
+ inter_sf->mode_cost_upd_level = INTERNAL_COST_UPD_SB;
inter_sf->prune_inter_modes_based_on_tpl = 0;
inter_sf->prune_nearmv_using_neighbors = 0;
inter_sf->prune_comp_search_by_single_result = 0;
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h
index cb947fb..89138c2 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -774,6 +774,9 @@
// Clip the frequency of updating the coeff cost.
INTERNAL_COST_UPDATE_TYPE coeff_cost_upd_level;
+ // Clip the frequency of updating the mode cost.
+ INTERNAL_COST_UPDATE_TYPE mode_cost_upd_level;
+
// Prune inter modes based on tpl stats
// 0 : no pruning
// 1 - 3 indicate increasing aggressiveness in order.