Reduce entropy cost update frequency for coeff
A speed feature option is introduced to reduce entropy cost update
frequency for coeff. This change is applicable for speed preset 6.
Instruction Count BD-Rate Loss(%)
cpu-used Reduction(%) avg.psnr ovr.psnr ssim
6 0.755 0.0971 0.0938 0.0999
STATS_CHANGED
Change-Id: I75025ad29c884b12e54e83f271add36c0f779b31
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 12cfc08..5bc6357 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -1371,6 +1371,9 @@
if (mi_col != tile_info->mi_col_start) break;
AOM_FALLTHROUGH_INTENDED;
case COST_UPD_SB: // SB level
+ if (cpi->sf.inter_sf.coeff_cost_upd_level == INTERNAL_COST_UPD_SBROW &&
+ mi_col != tile_info->mi_col_start)
+ break;
av1_fill_coeff_costs(&x->coeff_costs, xd->tile_ctx, num_planes);
break;
default: assert(0);
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c
index 1378f99..ebbdb2e 100644
--- a/av1/encoder/speed_features.c
+++ b/av1/encoder/speed_features.c
@@ -707,6 +707,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;
}
if (is_720p_or_larger) {
@@ -1591,6 +1592,7 @@
inter_sf->use_dist_wtd_comp_flag = DIST_WTD_COMP_ENABLED;
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->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 b56d97a..d237374 100644
--- a/av1/encoder/speed_features.h
+++ b/av1/encoder/speed_features.h
@@ -774,6 +774,9 @@
// Clip the frequency of updating the mv cost.
INTERNAL_COST_UPDATE_TYPE mv_cost_upd_level;
+ // Clip the frequency of updating the coeff cost.
+ INTERNAL_COST_UPDATE_TYPE coeff_cost_upd_level;
+
// Prune inter modes based on tpl stats
// 0 : no pruning
// 1 - 3 indicate increasing aggressiveness in order.