Remove use_fast_coef_costing speed features BUG=aomedia:2694 Change-Id: Ie992aaa6a57e3e1a811aafbae369dcc7a5ed791f
diff --git a/av1/encoder/intra_mode_search.c b/av1/encoder/intra_mode_search.c index 3cbb860..5845b7e 100644 --- a/av1/encoder/intra_mode_search.c +++ b/av1/encoder/intra_mode_search.c
@@ -333,9 +333,8 @@ if (i == CFL_SIGN_NEG) { mbmi->cfl_alpha_idx = 0; mbmi->cfl_alpha_signs = joint_sign; - av1_txfm_rd_in_plane( - x, cpi, &rd_stats, best_rd, 0, plane + 1, plane_bsize, tx_size, - cpi->sf.rd_sf.use_fast_coef_costing, FTXS_NONE, skip_trellis); + av1_txfm_rd_in_plane(x, cpi, &rd_stats, best_rd, 0, plane + 1, + plane_bsize, tx_size, FTXS_NONE, skip_trellis); if (rd_stats.rate == INT_MAX) break; } const int alpha_rate = mode_costs->cfl_cost[joint_sign][plane][0]; @@ -362,9 +361,8 @@ if (i == 0) { mbmi->cfl_alpha_idx = (c << CFL_ALPHABET_SIZE_LOG2) + c; mbmi->cfl_alpha_signs = joint_sign; - av1_txfm_rd_in_plane( - x, cpi, &rd_stats, best_rd, 0, plane + 1, plane_bsize, tx_size, - cpi->sf.rd_sf.use_fast_coef_costing, FTXS_NONE, skip_trellis); + av1_txfm_rd_in_plane(x, cpi, &rd_stats, best_rd, 0, plane + 1, + plane_bsize, tx_size, FTXS_NONE, skip_trellis); if (rd_stats.rate == INT_MAX) break; } const int alpha_rate = mode_costs->cfl_cost[joint_sign][plane][c];
diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c index 41da8f6..39ae43f 100644 --- a/av1/encoder/speed_features.c +++ b/av1/encoder/speed_features.c
@@ -821,7 +821,6 @@ sf->inter_sf.adaptive_rd_thresh = 4; - sf->rd_sf.use_fast_coef_costing = 1; sf->rd_sf.tx_domain_dist_level = 2; sf->rd_sf.tx_domain_dist_thres_level = 2; sf->winner_mode_sf.tx_size_search_level = 1; @@ -1137,7 +1136,6 @@ rd_sf->trellis_eob_fast = 0; rd_sf->use_mb_rd_hash = 1; rd_sf->optimize_b_precheck = 0; - rd_sf->use_fast_coef_costing = 0; rd_sf->simple_model_rd_from_var = 0; rd_sf->tx_domain_dist_level = 0; rd_sf->tx_domain_dist_thres_level = 0;
diff --git a/av1/encoder/speed_features.h b/av1/encoder/speed_features.h index fca3712..d118a96 100644 --- a/av1/encoder/speed_features.h +++ b/av1/encoder/speed_features.h
@@ -811,10 +811,6 @@ } TX_SPEED_FEATURES; typedef struct RD_CALC_SPEED_FEATURES { - // This feature controls whether we do the expensive context update and - // calculation in the rd coefficient costing loop. - int use_fast_coef_costing; - // Fast approximation of av1_model_rd_from_var_lapndz int simple_model_rd_from_var;
diff --git a/av1/encoder/tx_search.c b/av1/encoder/tx_search.c index 5fd6302..4dca06b 100644 --- a/av1/encoder/tx_search.c +++ b/av1/encoder/tx_search.c
@@ -31,7 +31,6 @@ int64_t best_rd; int exit_early; int incomplete_exit; - int use_fast_coef_costing; FAST_TX_SEARCH_MODE ftxs_mode; int skip_trellis; }; @@ -2083,13 +2082,11 @@ static INLINE int cost_coeffs(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size, const TX_TYPE tx_type, const TXB_CTX *const txb_ctx, - int use_fast_coef_costing, int reduced_tx_set_used) { #if TXCOEFF_COST_TIMER struct aom_usec_timer timer; aom_usec_timer_start(&timer); #endif - (void)use_fast_coef_costing; const int cost = av1_cost_coeffs_txb(x, plane, block, tx_size, tx_type, txb_ctx, reduced_tx_set_used); #if TXCOEFF_COST_TIMER @@ -2139,8 +2136,7 @@ int block, int blk_row, int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size, const TXB_CTX *const txb_ctx, - FAST_TX_SEARCH_MODE ftxs_mode, - int use_fast_coef_costing, int skip_trellis, + FAST_TX_SEARCH_MODE ftxs_mode, int skip_trellis, int64_t ref_best_rd, RD_STATS *best_rd_stats) { const AV1_COMMON *cm = &cpi->common; MACROBLOCKD *xd = &x->e_mbd; @@ -2305,9 +2301,8 @@ av1_optimize_b(cpi, x, plane, block, tx_size, tx_type, txb_ctx, cpi->sf.rd_sf.trellis_eob_fast, &rate_cost); } else { - rate_cost = - cost_coeffs(x, plane, block, tx_size, tx_type, txb_ctx, - use_fast_coef_costing, cm->features.reduced_tx_set_used); + rate_cost = cost_coeffs(x, plane, block, tx_size, tx_type, txb_ctx, + cm->features.reduced_tx_set_used); } // If rd cost based on coeff rate alone is already more than best_rd, @@ -2506,8 +2501,7 @@ RD_STATS this_rd_stats; const int skip_trellis = 0; search_tx_type(cpi, x, 0, block, blk_row, blk_col, plane_bsize, tx_size, - txb_ctx, ftxs_mode, 0, skip_trellis, ref_rdcost, - &this_rd_stats); + txb_ctx, ftxs_mode, skip_trellis, ref_rdcost, &this_rd_stats); av1_merge_rd_stats(rd_stats, &this_rd_stats); @@ -2776,8 +2770,7 @@ const int skip_trellis = 0; av1_txfm_rd_in_plane(x, cpi, rd_stats, ref_best_rd, AOMMIN(no_skip_txfm_rd, skip_txfm_rd), AOM_PLANE_Y, bs, - mbmi->tx_size, cpi->sf.rd_sf.use_fast_coef_costing, - FTXS_NONE, skip_trellis); + mbmi->tx_size, FTXS_NONE, skip_trellis); } static AOM_INLINE void choose_smallest_tx_size(const AV1_COMP *const cpi, @@ -2792,8 +2785,7 @@ // TODO(any) : Pass this_rd based on skip/non-skip cost const int skip_trellis = 0; av1_txfm_rd_in_plane(x, cpi, rd_stats, ref_best_rd, 0, 0, bs, mbmi->tx_size, - cpi->sf.rd_sf.use_fast_coef_costing, FTXS_NONE, - skip_trellis); + FTXS_NONE, skip_trellis); } // Search for the best uniform transform size and type for current coding block. @@ -2897,9 +2889,8 @@ TXB_CTX txb_ctx; get_txb_ctx(plane_bsize, tx_size, plane, a, l, &txb_ctx); search_tx_type(cpi, x, plane, block, blk_row, blk_col, plane_bsize, tx_size, - &txb_ctx, args->ftxs_mode, args->use_fast_coef_costing, - args->skip_trellis, args->best_rd - args->current_rd, - &this_rd_stats); + &txb_ctx, args->ftxs_mode, args->skip_trellis, + args->best_rd - args->current_rd, &this_rd_stats); if (plane == AOM_PLANE_Y && xd->cfl.store_y) { assert(!is_inter || plane_bsize < BLOCK_8X8); @@ -2971,8 +2962,7 @@ mbmi->tx_size = tx_size; av1_txfm_rd_in_plane(x, cpi, rd_stats, ref_best_rd, AOMMIN(no_this_rd, skip_txfm_rd), AOM_PLANE_Y, bs, - tx_size, cpi->sf.rd_sf.use_fast_coef_costing, ftxs_mode, - skip_trellis); + tx_size, ftxs_mode, skip_trellis); if (rd_stats->rate == INT_MAX) return INT64_MAX; int64_t rd; @@ -3478,9 +3468,7 @@ chroma_ref_best_rd != INT64_MAX) chroma_ref_best_rd = ref_best_rd - AOMMIN(this_rd, skip_txfm_rd); av1_txfm_rd_in_plane(x, cpi, &this_rd_stats, chroma_ref_best_rd, 0, plane, - plane_bsize, uv_tx_size, - cpi->sf.rd_sf.use_fast_coef_costing, FTXS_NONE, - skip_trellis); + plane_bsize, uv_tx_size, FTXS_NONE, skip_trellis); if (this_rd_stats.rate == INT_MAX) { is_cost_valid = 0; break; @@ -3505,8 +3493,8 @@ void av1_txfm_rd_in_plane(MACROBLOCK *x, const AV1_COMP *cpi, RD_STATS *rd_stats, int64_t ref_best_rd, int64_t current_rd, int plane, BLOCK_SIZE plane_bsize, - TX_SIZE tx_size, int use_fast_coef_costing, - FAST_TX_SEARCH_MODE ftxs_mode, int skip_trellis) { + TX_SIZE tx_size, FAST_TX_SEARCH_MODE ftxs_mode, + int skip_trellis) { assert(IMPLIES(plane == 0, x->e_mbd.mi[0]->tx_size == tx_size)); if (!cpi->oxcf.txfm_cfg.enable_tx64 && @@ -3528,7 +3516,6 @@ args.cpi = cpi; args.best_rd = ref_best_rd; args.current_rd = current_rd; - args.use_fast_coef_costing = use_fast_coef_costing; args.ftxs_mode = ftxs_mode; args.skip_trellis = skip_trellis; av1_init_rd_stats(&args.rd_stats);
diff --git a/av1/encoder/tx_search.h b/av1/encoder/tx_search.h index 7c29345..6086775 100644 --- a/av1/encoder/tx_search.h +++ b/av1/encoder/tx_search.h
@@ -149,9 +149,6 @@ * \param[in] plane_bsize Size of the current macroblock considering sup-sampling * \param[in] tx_size The given transform size - * \param[in] use_fast_coef_costing - Binary flag indicating if trellis optimization - should be skipped * \param[in] ftxs_mode Transform search mode specifying desired speed and quality tradeoff * \param[in] skip_trellis Binary flag indicating if trellis optimization @@ -162,8 +159,8 @@ void av1_txfm_rd_in_plane(MACROBLOCK *x, const AV1_COMP *cpi, RD_STATS *rd_stats, int64_t ref_best_rd, int64_t current_rd, int plane, BLOCK_SIZE plane_bsize, - TX_SIZE tx_size, int use_fast_coef_costing, - FAST_TX_SEARCH_MODE ftxs_mode, int skip_trellis); + TX_SIZE tx_size, FAST_TX_SEARCH_MODE ftxs_mode, + int skip_trellis); /*!\brief Recursive transform size and type search. *