Commit 9293bce0 authored by Yaowu Xu's avatar Yaowu Xu

Remove experiment speed_refs

Change-Id: Ie4e2f04a6fa27480e500469a0d822e539b7cb066
parent 9befd171
......@@ -2218,11 +2218,6 @@ static void encode_sb(const AV1_COMP *const cpi, ThreadData *td,
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) return;
#if CONFIG_SPEED_REFS
// First scanning pass of an SB is dry run only.
if (cpi->sb_scanning_pass_idx == 0) assert(dry_run == DRY_RUN_NORMAL);
#endif // CONFIG_SPEED_REFS
if (!dry_run && ctx >= 0) td->counts->partition[ctx][partition]++;
#if CONFIG_SUPERTX
......@@ -3726,17 +3721,6 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
}
#endif
#if CONFIG_SPEED_REFS
if (cpi->sb_scanning_pass_idx == 0) {
// NOTE: For the 1st pass of scanning, check all the subblocks of equal size
// only.
partition_none_allowed = (bsize == MIN_SPEED_REFS_BLKSIZE);
partition_horz_allowed = 0;
partition_vert_allowed = 0;
do_square_split = (bsize > MIN_SPEED_REFS_BLKSIZE);
}
#endif // CONFIG_SPEED_REFS
// PARTITION_NONE
if (partition_none_allowed) {
rd_pick_sb_modes(cpi, tile_data, x, mi_row, mi_col, &this_rdc,
......@@ -4573,11 +4557,6 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
}
#endif // CONFIG_EXT_PARTITION_TYPES
#if CONFIG_SPEED_REFS
// First scanning is done.
if (cpi->sb_scanning_pass_idx == 0 && bsize == cm->sb_size) return;
#endif // CONFIG_SPEED_REFS
// TODO(jbb): This code added so that we avoid static analysis
// warning related to the fact that best_rd isn't used after this
// point. This code should be refactored so that the duplicate
......@@ -4630,22 +4609,6 @@ static void rd_pick_partition(const AV1_COMP *const cpi, ThreadData *td,
}
}
#if CONFIG_SPEED_REFS
static void restore_mi(const AV1_COMP *const cpi, MACROBLOCK *const x,
int mi_row, int mi_col) {
const AV1_COMMON *cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
set_mode_info_offsets(cpi, x, xd, mi_row, mi_col);
int x_idx, y;
for (y = 0; y < mi_size_high[cm->sb_size]; y++)
for (x_idx = 0; x_idx < mi_size_wide[cm->sb_size]; x_idx++)
if (mi_col + x_idx < cm->mi_cols && mi_row + y < cm->mi_rows) {
memset(xd->mi + y * cm->mi_stride + x_idx, 0, sizeof(*xd->mi));
memset(x->mbmi_ext + y * cm->mi_cols + x_idx, 0, sizeof(*x->mbmi_ext));
}
}
#endif // CONFIG_SPEED_REFS
static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
TileDataEnc *tile_data, int mi_row,
TOKENEXTRA **tp) {
......@@ -4802,35 +4765,12 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
rd_auto_partition_range(cpi, tile_info, xd, mi_row, mi_col,
&x->min_partition_size, &x->max_partition_size);
}
#if CONFIG_SPEED_REFS
// NOTE: Two scanning passes for the current superblock - the first pass
// is only targeted to collect stats.
int m_search_count_backup = *(x->m_search_count_ptr);
for (int sb_pass_idx = 0; sb_pass_idx < 2; ++sb_pass_idx) {
cpi->sb_scanning_pass_idx = sb_pass_idx;
if (frame_is_intra_only(cm) && sb_pass_idx == 0) continue;
rd_pick_partition(cpi, td, tile_data, tp, mi_row, mi_col, cm->sb_size,
&dummy_rdc,
#if CONFIG_SUPERTX
&dummy_rate_nocoef,
#endif // CONFIG_SUPERTX
INT64_MAX, pc_root);
if (sb_pass_idx == 0) {
av1_zero(x->pred_mv);
pc_root->index = 0;
restore_mi(cpi, x, mi_row, mi_col);
*(x->m_search_count_ptr) = m_search_count_backup;
}
}
#else // !CONFIG_SPEED_REFS
rd_pick_partition(cpi, td, tile_data, tp, mi_row, mi_col, cm->sb_size,
&dummy_rdc,
#if CONFIG_SUPERTX
&dummy_rate_nocoef,
#endif // CONFIG_SUPERTX
INT64_MAX, pc_root);
#endif // CONFIG_SPEED_REFS
}
}
}
......
......@@ -53,10 +53,6 @@
extern "C" {
#endif
#if CONFIG_SPEED_REFS
#define MIN_SPEED_REFS_BLKSIZE BLOCK_16X16
#endif // CONFIG_SPEED_REFS
typedef struct {
int nmv_vec_cost[NMV_CONTEXTS][MV_JOINTS];
int nmv_costs[NMV_CONTEXTS][2][MV_VALS];
......@@ -629,10 +625,6 @@ typedef struct AV1_COMP {
tran_low_t *tcoeff_buf[MAX_MB_PLANE];
#endif
#if CONFIG_SPEED_REFS
int sb_scanning_pass_idx;
#endif // CONFIG_SPEED_REFS
#if CONFIG_EXT_REFS
int extra_arf_allowed;
int bwd_ref_allowed;
......
......@@ -10448,10 +10448,6 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
*returnrate_nocoef = INT_MAX;
#endif // CONFIG_SUPERTX
#if CONFIG_SPEED_REFS
memset(x->mbmi_ext->ref_mvs, 0, sizeof(x->mbmi_ext->ref_mvs));
#endif // CONFIG_SPEED_REFS
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) {
x->pred_mv_sad[ref_frame] = INT_MAX;
x->mbmi_ext->mode_context[ref_frame] = 0;
......
......@@ -196,7 +196,6 @@ set(CONFIG_RESTRICT_COMPRESSED_HDR 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SBL_SYMBOL 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SEGMENT_ZEROMV 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SMOOTH_HV 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SPEED_REFS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_STRIPED_LOOP_RESTORATION 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_SUPERTX 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_TEMPMV_SIGNALING 1 CACHE NUMBER "AV1 experiment flag.")
......
......@@ -269,7 +269,6 @@ EXPERIMENT_LIST="
wedge
compound_segment
ext_refs
speed_refs
gf_groups
global_motion
new_quant
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment