Commit 10a0380a authored by RogerZhou's avatar RogerZhou Committed by Roger Zhou

Fixed build conflict (amvr,intrabc).

Change-Id: Ibfeb424bf0ebab7bbeb69f6f6df24a4f4924ec97
parent 43edb760
......@@ -723,7 +723,7 @@ typedef struct macroblockd {
int lossless[MAX_SEGMENTS];
int corrupted;
#if CONFIG_AMVR
int cur_frame_mv_precision_level;
int cur_frame_force_integer_mv;
// same with that in AV1_COMMON
#endif
struct aom_internal_error_info *error_info;
......@@ -1457,7 +1457,7 @@ static INLINE MOTION_MODE motion_mode_allowed(
const MODE_INFO *mi) {
const MB_MODE_INFO *mbmi = &mi->mbmi;
#if CONFIG_AMVR
if (xd->cur_frame_mv_precision_level == 0) {
if (xd->cur_frame_force_integer_mv == 0) {
#endif
#if CONFIG_GLOBAL_MOTION
const TransformationType gm_type = gm_params[mbmi->ref_frame[0]].wmtype;
......@@ -1476,7 +1476,7 @@ static INLINE MOTION_MODE motion_mode_allowed(
if (!has_second_ref(mbmi) && mbmi->num_proj_ref[0] >= 1 &&
!av1_is_scaled(&(xd->block_refs[0]->sf))) {
#if CONFIG_AMVR
if (xd->cur_frame_mv_precision_level) {
if (xd->cur_frame_force_integer_mv) {
return OBMC_CAUSAL;
}
#endif
......
......@@ -235,7 +235,7 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
for (j = 0; j < MV_OFFSET_BITS; ++j)
comp->bits[j] = av1_mode_mv_merge_probs(pre_comp->bits[j], c->bits[j]);
#if CONFIG_AMVR
if (cm->cur_frame_mv_precision_level == 0) {
if (cm->cur_frame_force_integer_mv == 0) {
#endif
for (j = 0; j < CLASS0_SIZE; ++j)
aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->class0_fp[j],
......
......@@ -243,7 +243,7 @@ static uint8_t scan_row_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
#if CONFIG_GLOBAL_MOTION && USE_CUR_GM_REFMV
gm_mv_candidates, cm->global_motion,
#endif // CONFIG_GLOBAL_MOTION && USE_CUR_GM_REFMV
col_offset + i, weight, cm->cur_frame_mv_precision_level,
col_offset + i, weight, cm->cur_frame_force_integer_mv,
xd->mi[0]->mbmi.sb_type, mi_row, mi_col, xd->plane[0].subsampling_x,
xd->plane[0].subsampling_y);
#else
......@@ -313,7 +313,7 @@ static uint8_t scan_col_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
#if CONFIG_GLOBAL_MOTION && USE_CUR_GM_REFMV
gm_mv_candidates, cm->global_motion,
#endif // CONFIG_GLOBAL_MOTION && USE_CUR_GM_REFMV
col_offset, weight, cm->cur_frame_mv_precision_level,
col_offset, weight, cm->cur_frame_force_integer_mv,
xd->mi[0]->mbmi.sb_type, mi_row, mi_col, xd->plane[0].subsampling_x,
xd->plane[0].subsampling_y);
#else
......@@ -361,9 +361,8 @@ static uint8_t scan_blk_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd,
#if CONFIG_GLOBAL_MOTION && USE_CUR_GM_REFMV
gm_mv_candidates, cm->global_motion,
#endif // CONFIG_GLOBAL_MOTION && USE_CUR_GM_REFMV
mi_pos.col, 2, cm->cur_frame_mv_precision_level,
xd->mi[0]->mbmi.sb_type, mi_row, mi_col, xd->plane[0].subsampling_x,
xd->plane[0].subsampling_y);
mi_pos.col, 2, cm->cur_frame_force_integer_mv, xd->mi[0]->mbmi.sb_type,
mi_row, mi_col, xd->plane[0].subsampling_x, xd->plane[0].subsampling_y);
#else
newmv_count += add_ref_mv_candidate(
candidate_mi, candidate, rf, refmv_count, ref_mv_stack,
......@@ -593,7 +592,7 @@ static int add_col_ref_mv(const AV1_COMMON *cm,
int_mv this_refmv = prev_frame_mvs->mv[ref];
#if CONFIG_AMVR
lower_mv_precision(&this_refmv.as_mv, cm->allow_high_precision_mv,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&this_refmv.as_mv, cm->allow_high_precision_mv);
#endif
......@@ -1246,22 +1245,21 @@ void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd,
mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
zeromv[1].as_int =
(rf[1] != NONE_FRAME)
? gm_get_motion_vector(&cm->global_motion[rf[1]],
cm->allow_high_precision_mv, bsize, mi_col,
mi_row, 0
zeromv[1].as_int = (rf[1] != NONE_FRAME)
? gm_get_motion_vector(&cm->global_motion[rf[1]],
cm->allow_high_precision_mv,
bsize, mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
,
cm->cur_frame_force_integer_mv
#endif
)
.as_int
: 0;
)
.as_int
: 0;
} else {
zeromv[0].as_int = zeromv[1].as_int = 0;
}
......
......@@ -262,9 +262,10 @@ typedef struct AV1Common {
int allow_high_precision_mv;
#if CONFIG_AMVR
int seq_mv_precision_level; // 0 the default in AOM, 1 only integer, 2
// adaptive
int cur_frame_mv_precision_level; // 0 the default in AOM, 1 only integer
int seq_force_integer_mv; // 0 - Not to force. MV can be in 1/4 or 1/8
// 1 - force to integer
// 2 - adaptive
int cur_frame_force_integer_mv; // 0 the default in AOM, 1 only integer
#endif
int allow_screen_content_tools;
......
......@@ -183,7 +183,7 @@ static INLINE void av1_make_inter_predictor(
&final_warp_params));
if (do_warp
#if CONFIG_AMVR
&& xd->cur_frame_mv_precision_level == 0
&& xd->cur_frame_force_integer_mv == 0
#endif
) {
const struct macroblockd_plane *const pd = &xd->plane[plane];
......
......@@ -3072,12 +3072,12 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#if CONFIG_AMVR
if (cm->allow_screen_content_tools) {
if (aom_rb_read_bit(rb)) {
cm->seq_mv_precision_level = 2;
cm->seq_force_integer_mv = 2;
} else {
cm->seq_mv_precision_level = aom_rb_read_bit(rb) ? 0 : 1;
cm->seq_force_integer_mv = aom_rb_read_bit(rb);
}
} else {
cm->seq_mv_precision_level = 0;
cm->seq_force_integer_mv = 0;
}
#endif
#if CONFIG_TEMPMV_SIGNALING
......@@ -3206,13 +3206,20 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#endif
#if CONFIG_AMVR
if (cm->seq_mv_precision_level == 2) {
cm->cur_frame_mv_precision_level = aom_rb_read_bit(rb) ? 0 : 1;
if (cm->seq_force_integer_mv == 2) {
cm->cur_frame_force_integer_mv = aom_rb_read_bit(rb);
} else {
cm->cur_frame_mv_precision_level = cm->seq_mv_precision_level;
cm->cur_frame_force_integer_mv = cm->seq_force_integer_mv;
}
#endif
if (cm->cur_frame_force_integer_mv) {
cm->allow_high_precision_mv = 0;
} else {
cm->allow_high_precision_mv = aom_rb_read_bit(rb);
}
#else
cm->allow_high_precision_mv = aom_rb_read_bit(rb);
#endif
cm->interp_filter = read_frame_interp_filter(rb);
#if CONFIG_TEMPMV_SIGNALING
if (frame_might_use_prev_frame_mvs(cm))
......@@ -3394,7 +3401,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
}
}
#if CONFIG_AMVR
xd->cur_frame_mv_precision_level = cm->cur_frame_mv_precision_level;
xd->cur_frame_force_integer_mv = cm->cur_frame_force_integer_mv;
#endif
for (i = 0; i < MAX_SEGMENTS; ++i) {
......@@ -3567,7 +3574,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
#if !CONFIG_NEW_MULTISYMBOL
#if CONFIG_AMVR
if (cm->cur_frame_mv_precision_level == 0) {
if (cm->cur_frame_force_integer_mv == 0) {
#endif
for (int i = 0; i < NMV_CONTEXTS; ++i)
read_mv_probs(&fc->nmvc[i], cm->allow_high_precision_mv, &r);
......
......@@ -1134,8 +1134,12 @@ static void read_intrabc_info(AV1_COMMON *const cm, MACROBLOCKD *const xd,
mi_col, NULL, NULL, inter_mode_ctx);
int_mv nearestmv, nearmv;
av1_find_best_ref_mvs(0, ref_mvs, &nearestmv, &nearmv);
#if CONFIG_AMVR
av1_find_best_ref_mvs(0, ref_mvs, &nearestmv, &nearmv, 0);
#else
av1_find_best_ref_mvs(0, ref_mvs, &nearestmv, &nearmv);
#endif
int_mv dv_ref = nearestmv.as_int == 0 ? nearmv : nearestmv;
if (dv_ref.as_int == 0) av1_find_ref_dv(&dv_ref, mi_row, mi_col);
xd->corrupted |=
......@@ -1834,7 +1838,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
(void)mi_col;
(void)bsize;
#if CONFIG_AMVR
if (cm->cur_frame_mv_precision_level) {
if (cm->cur_frame_force_integer_mv) {
allow_hp = MV_SUBPEL_NONE;
}
#endif
......@@ -1879,7 +1883,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
mi_col, mi_row, block
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -1889,7 +1893,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
mi_col, mi_row, block
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -2073,7 +2077,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
mi_col, mi_row, block
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -2082,7 +2086,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd,
mi_col, mi_row, block
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -2258,7 +2262,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
bsize, mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -2269,7 +2273,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int
......@@ -2281,9 +2285,9 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
if (rf[ref] == NONE_FRAME) continue;
#if CONFIG_AMVR
lower_mv_precision(&ref_mvs[rf[ref]][0].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
lower_mv_precision(&ref_mvs[rf[ref]][1].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&ref_mvs[rf[ref]][0].as_mv, allow_hp);
lower_mv_precision(&ref_mvs[rf[ref]][1].as_mv, allow_hp);
......@@ -2335,7 +2339,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
#if CONFIG_AMVR
av1_find_best_ref_mvs(allow_hp, ref_mvs[mbmi->ref_frame[ref]],
&nearestmv[ref], &nearmv[ref],
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
av1_find_best_ref_mvs(allow_hp, ref_mvs[mbmi->ref_frame[ref]],
&nearestmv[ref], &nearmv[ref]);
......@@ -2357,9 +2361,9 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
nearestmv[1] = xd->ref_mv_stack[ref_frame_type][0].comp_mv;
#if CONFIG_AMVR
lower_mv_precision(&nearestmv[0].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
lower_mv_precision(&nearestmv[1].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&nearestmv[0].as_mv, allow_hp);
lower_mv_precision(&nearestmv[1].as_mv, allow_hp);
......@@ -2374,7 +2378,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
#if CONFIG_AMVR
lower_mv_precision(&nearestmv[0].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&nearestmv[0].as_mv, allow_hp);
#endif
......@@ -2382,7 +2386,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
nearestmv[1] = xd->ref_mv_stack[ref_frame_type][0].comp_mv;
#if CONFIG_AMVR
lower_mv_precision(&nearestmv[1].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&nearestmv[1].as_mv, allow_hp);
#endif
......@@ -2398,7 +2402,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
nearmv[0] = xd->ref_mv_stack[ref_frame_type][ref_mv_idx].this_mv;
#if CONFIG_AMVR
lower_mv_precision(&nearmv[0].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&nearmv[0].as_mv, allow_hp);
#endif
......@@ -2408,7 +2412,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi,
nearmv[1] = xd->ref_mv_stack[ref_frame_type][ref_mv_idx].comp_mv;
#if CONFIG_AMVR
lower_mv_precision(&nearmv[1].as_mv, allow_hp,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&nearmv[1].as_mv, allow_hp);
#endif
......
......@@ -3993,11 +3993,11 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
aom_wb_write_bit(wb, cm->allow_screen_content_tools);
#if CONFIG_AMVR
if (cm->allow_screen_content_tools) {
if (cm->seq_mv_precision_level == 2) {
if (cm->seq_force_integer_mv == 2) {
aom_wb_write_bit(wb, 1);
} else {
aom_wb_write_bit(wb, 0);
aom_wb_write_bit(wb, cm->seq_mv_precision_level == 0);
aom_wb_write_bit(wb, cm->seq_force_integer_mv);
}
}
#endif
......@@ -4077,12 +4077,17 @@ static void write_uncompressed_header_frame(AV1_COMP *cpi,
#endif
#if CONFIG_AMVR
if (cm->seq_mv_precision_level == 2) {
aom_wb_write_bit(wb, cm->cur_frame_mv_precision_level == 0);
if (cm->seq_force_integer_mv == 2) {
aom_wb_write_bit(wb, cm->cur_frame_force_integer_mv);
}
#endif
if (cm->cur_frame_force_integer_mv) {
cm->allow_high_precision_mv = 0;
} else {
aom_wb_write_bit(wb, cm->allow_high_precision_mv);
}
#else
aom_wb_write_bit(wb, cm->allow_high_precision_mv);
#endif
fix_interp_filter(cm, cpi->td.counts);
write_frame_interp_filter(cm->interp_filter, wb);
#if CONFIG_TEMPMV_SIGNALING
......@@ -4270,11 +4275,11 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
aom_wb_write_bit(wb, cm->allow_screen_content_tools);
#if CONFIG_AMVR
if (cm->allow_screen_content_tools) {
if (cm->seq_mv_precision_level == 2) {
if (cm->seq_force_integer_mv == 2) {
aom_wb_write_bit(wb, 1);
} else {
aom_wb_write_bit(wb, 0);
aom_wb_write_bit(wb, cm->seq_mv_precision_level == 0);
aom_wb_write_bit(wb, cm->seq_force_integer_mv == 0);
}
}
#endif
......@@ -4356,8 +4361,8 @@ static void write_uncompressed_header_obu(AV1_COMP *cpi,
#endif
#if CONFIG_AMVR
if (cm->seq_mv_precision_level == 2) {
aom_wb_write_bit(wb, cm->cur_frame_mv_precision_level == 0);
if (cm->seq_force_integer_mv == 2) {
aom_wb_write_bit(wb, cm->cur_frame_force_integer_mv == 0);
}
#endif
aom_wb_write_bit(wb, cm->allow_high_precision_mv);
......
......@@ -3341,7 +3341,7 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
seg_skip = segfeature_active(seg, segment_id, SEG_LVL_SKIP);
}
#if CONFIG_AMVR
xd->cur_frame_mv_precision_level = cm->cur_frame_mv_precision_level;
xd->cur_frame_force_integer_mv = cm->cur_frame_force_integer_mv;
#endif
if (cm->delta_q_present_flag) {
......
......@@ -171,7 +171,7 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w,
int i;
int nmv_ctx = 0;
#if CONFIG_AMVR
if (cm->cur_frame_mv_precision_level) {
if (cm->cur_frame_force_integer_mv) {
return;
}
#endif
......@@ -195,7 +195,7 @@ void av1_encode_mv(AV1_COMP *cpi, aom_writer *w, const MV *mv, const MV *ref,
const MV diff = { mv->row - ref->row, mv->col - ref->col };
const MV_JOINT_TYPE j = av1_get_mv_joint(&diff);
#if CONFIG_AMVR
if (cpi->common.cur_frame_mv_precision_level) {
if (cpi->common.cur_frame_force_integer_mv) {
usehp = MV_SUBPEL_NONE;
}
#endif
......@@ -324,7 +324,7 @@ void av1_update_mv_count(ThreadData *td) {
const MB_MODE_INFO_EXT *mbmi_ext = td->mb.mbmi_ext;
#if CONFIG_AMVR
MvSubpelPrecision precision = 1;
if (xd->cur_frame_mv_precision_level) {
if (xd->cur_frame_force_integer_mv) {
precision = MV_SUBPEL_NONE;
}
#endif
......
......@@ -280,15 +280,14 @@ int av1_get_active_map(AV1_COMP *cpi, unsigned char *new_map_16x16, int rows,
static void set_high_precision_mv(AV1_COMP *cpi, int allow_high_precision_mv
#if CONFIG_AMVR
,
int cur_frame_mv_precision_level
int cur_frame_force_integer_mv
#endif
) {
MACROBLOCK *const mb = &cpi->td.mb;
cpi->common.allow_high_precision_mv = allow_high_precision_mv;
#if CONFIG_AMVR
if (cpi->common.allow_high_precision_mv &&
cur_frame_mv_precision_level == 0) {
if (cpi->common.allow_high_precision_mv && cur_frame_force_integer_mv == 0) {
#else
if (cpi->common.allow_high_precision_mv) {
#endif
......@@ -2559,7 +2558,7 @@ void av1_change_config(struct AV1_COMP *cpi, const AV1EncoderConfig *oxcf) {
cpi->common.ans_window_size_log2 = cpi->oxcf.ans_window_size_log2;
#endif // CONFIG_ANS && ANS_MAX_SYMBOLS
#if CONFIG_AMVR
cm->seq_mv_precision_level = 2;
cm->seq_force_integer_mv = 2;
#endif
}
......@@ -4145,7 +4144,7 @@ static void set_size_dependent_vars(AV1_COMP *cpi, int *q, int *bottom_index,
if (!frame_is_intra_only(cm)) {
#if CONFIG_AMVR
set_high_precision_mv(cpi, (*q) < HIGH_PRECISION_MV_QTHRESH,
cpi->common.cur_frame_mv_precision_level);
cpi->common.cur_frame_force_integer_mv);
#else
set_high_precision_mv(cpi, (*q) < HIGH_PRECISION_MV_QTHRESH);
#endif
......@@ -6481,17 +6480,16 @@ int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags,
#if CONFIG_AMVR
cpi->cur_poc++;
if (oxcf->pass != 1 && cpi->common.allow_screen_content_tools) {
if (cpi->common.seq_mv_precision_level == 2) {
if (cpi->common.seq_force_integer_mv == 2) {
struct lookahead_entry *previous_entry =
cpi->lookahead->buf + cpi->previsous_index;
cpi->common.cur_frame_mv_precision_level = is_integer_mv(
cpi->common.cur_frame_force_integer_mv = is_integer_mv(
cpi, cpi->source, &previous_entry->img, cpi->previsou_hash_table);
} else {
cpi->common.cur_frame_mv_precision_level =
cpi->common.seq_mv_precision_level;
cpi->common.cur_frame_force_integer_mv = cpi->common.seq_force_integer_mv;
}
} else {
cpi->common.cur_frame_mv_precision_level = 0;
cpi->common.cur_frame_force_integer_mv = 0;
}
#endif
......
......@@ -50,7 +50,7 @@ static unsigned int do_16x16_motion_iteration(AV1_COMP *cpi, const MV *ref_mv,
// Try sub-pixel MC
// if (bestsme > error_thresh && bestsme < INT_MAX)
#if CONFIG_AMVR
if (cpi->common.cur_frame_mv_precision_level == 1) {
if (cpi->common.cur_frame_force_integer_mv == 1) {
x->best_mv.as_mv.row *= 8;
x->best_mv.as_mv.col *= 8;
} else {
......
......@@ -706,7 +706,7 @@ void av1_initialize_rd_consts(AV1_COMP *cpi) {
for (nmv_ctx = 0; nmv_ctx < NMV_CONTEXTS; ++nmv_ctx) {
#if CONFIG_AMVR
if (cm->cur_frame_mv_precision_level) {
if (cm->cur_frame_force_integer_mv) {
av1_build_nmv_cost_table(x->nmv_vec_cost[nmv_ctx], x->nmvcost[nmv_ctx],
&cm->fc->nmvc[nmv_ctx], MV_SUBPEL_NONE);
} else {
......
......@@ -5730,7 +5730,7 @@ static int check_best_zero_mv(
mi_col, mi_row, block
#if CONFIG_AMVR
,
cpi->common.cur_frame_mv_precision_level
cpi->common.cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -6102,11 +6102,11 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
x->mv_limits = tmp_mv_limits;
#if CONFIG_AMVR
if (cpi->common.cur_frame_mv_precision_level) {
if (cpi->common.cur_frame_force_integer_mv) {
x->best_mv.as_mv.row *= 8;
x->best_mv.as_mv.col *= 8;
}
if (bestsme < INT_MAX && cpi->common.cur_frame_mv_precision_level == 0)
if (bestsme < INT_MAX && cpi->common.cur_frame_force_integer_mv == 0)
#else
if (bestsme < INT_MAX)
#endif
......@@ -6456,7 +6456,7 @@ static void setup_buffer_inter(
#if CONFIG_AMVR
av1_find_best_ref_mvs(cm->allow_high_precision_mv, candidates,
&frame_nearest_mv[ref_frame], &frame_near_mv[ref_frame],
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
av1_find_best_ref_mvs(cm->allow_high_precision_mv, candidates,
&frame_nearest_mv[ref_frame],
......@@ -6607,11 +6607,11 @@ static void single_motion_search(const AV1_COMP *const cpi, MACROBLOCK *x,
x->mv_limits = tmp_mv_limits;
#if CONFIG_AMVR
if (cpi->common.cur_frame_mv_precision_level) {
if (cpi->common.cur_frame_force_integer_mv) {
x->best_mv.as_mv.row *= 8;
x->best_mv.as_mv.col *= 8;
}
if (bestsme < INT_MAX && cpi->common.cur_frame_mv_precision_level == 0) {
if (bestsme < INT_MAX && cpi->common.cur_frame_force_integer_mv == 0) {
#else
if (bestsme < INT_MAX) {
#endif
......@@ -6914,11 +6914,11 @@ static void compound_single_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
x->mv_limits = tmp_mv_limits;
#if CONFIG_AMVR
if (cpi->common.cur_frame_mv_precision_level) {
if (cpi->common.cur_frame_force_integer_mv) {
x->best_mv.as_mv.row *= 8;
x->best_mv.as_mv.col *= 8;
}
if (bestsme < INT_MAX && cpi->common.cur_frame_mv_precision_level == 0) {
if (bestsme < INT_MAX && cpi->common.cur_frame_force_integer_mv == 0) {
#else
if (bestsme < INT_MAX) {
#endif
......@@ -8482,7 +8482,7 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
#if CONFIG_AMVR
lower_mv_precision(&cur_mv[0].as_mv, cm->allow_high_precision_mv,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&cur_mv[0].as_mv, cm->allow_high_precision_mv);
#endif
......@@ -8496,7 +8496,7 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
#if CONFIG_AMVR
lower_mv_precision(&cur_mv[1].as_mv, cm->allow_high_precision_mv,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&cur_mv[1].as_mv, cm->allow_high_precision_mv);
#endif
......@@ -8517,7 +8517,7 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
#if CONFIG_AMVR
lower_mv_precision(&cur_mv[0].as_mv, cm->allow_high_precision_mv,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&cur_mv[0].as_mv, cm->allow_high_precision_mv);
#endif
......@@ -8540,7 +8540,7 @@ static int64_t handle_inter_mode(const AV1_COMP *const cpi, MACROBLOCK *x,
#if CONFIG_AMVR
lower_mv_precision(&cur_mv[1].as_mv, cm->allow_high_precision_mv,
cm->cur_frame_mv_precision_level);
cm->cur_frame_force_integer_mv);
#else
lower_mv_precision(&cur_mv[1].as_mv, cm->allow_high_precision_mv);
#endif
......@@ -9000,7 +9000,11 @@ static int64_t rd_pick_intrabc_mode_sb(const AV1_COMP *cpi, MACROBLOCK *x,
NULL, NULL, mbmi_ext->mode_context);
int_mv nearestmv, nearmv;
#if CONFIG_AMVR
av1_find_best_ref_mvs(0, candidates, &nearestmv, &nearmv, 0);
#else
av1_find_best_ref_mvs(0, candidates, &nearestmv, &nearmv);
#endif
int_mv dv_ref = nearestmv.as_int == 0 ? nearmv : nearestmv;
if (dv_ref.as_int == 0) av1_find_ref_dv(&dv_ref, mi_row, mi_col);
......@@ -9529,7 +9533,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -9548,7 +9552,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -9646,7 +9650,7 @@ void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -10828,22 +10832,21 @@ PALETTE_EXIT:
mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
zeromv[1].as_int =
comp_pred_mode
? gm_get_motion_vector(&cm->global_motion[refs[1]],
cm->allow_high_precision_mv, bsize, mi_col,
mi_row, 0
zeromv[1].as_int = comp_pred_mode
? gm_get_motion_vector(&cm->global_motion[refs[1]],
cm->allow_high_precision_mv,
bsize, mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
,
cm->cur_frame_force_integer_mv
#endif
)
.as_int
: 0;
)
.as_int
: 0;
#else
zeromv[0].as_int = 0;
zeromv[1].as_int = 0;
......@@ -10940,7 +10943,7 @@ PALETTE_EXIT:
mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif
)
.as_int;
......@@ -11088,7 +11091,7 @@ void av1_rd_pick_inter_mode_sb_seg_skip(const AV1_COMP *cpi,
cm->allow_high_precision_mv, bsize, mi_col, mi_row, 0
#if CONFIG_AMVR
,
cm->cur_frame_mv_precision_level
cm->cur_frame_force_integer_mv
#endif