cpi->mode_chosen_counts[i] = 0;
}
- // Initialize cpi->max_mv_magnitude if appropriate.
- if ((cpi->common.frame_type == KEY_FRAME) || cpi->common.intra_only ||
- (cpi->common.show_frame == 0)) {
- cpi->max_mv_magnitude = 0;
- }
-
// best quality defaults
sf->RD = 1;
sf->search_method = NSTEP;
#else
sf->static_segmentation = 0;
#endif
- sf->auto_mv_step_size = 1;
sf->use_avoid_tested_higherror = 1;
sf->adaptive_rd_thresh = 1;
sf->last_chroma_intra_mode = TM_PRED;
sf->last_chroma_intra_mode = H_PRED;
sf->use_rd_breakout = 1;
sf->skip_encode_sb = 1;
+ sf->auto_mv_step_size = 1;
}
if (speed == 2) {
sf->adjust_thresholds_by_speed = 1;
sf->using_small_partition_info = 1;
sf->disable_splitmv =
(MIN(cpi->common.width, cpi->common.height) >= 720)? 1 : 0;
+ sf->auto_mv_step_size = 1;
}
if (speed == 3) {
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_TYPES;
sf->use_rd_breakout = 1;
sf->skip_encode_sb = 1;
sf->disable_splitmv = 1;
+ sf->auto_mv_step_size = 1;
}
if (speed == 4) {
sf->comp_inter_joint_search_thresh = BLOCK_SIZE_TYPES;
FLAG_SKIP_COMP_REFMISMATCH;
sf->use_rd_breakout = 1;
sf->optimize_coefficients = 0;
+ sf->auto_mv_step_size = 1;
// sf->reduce_first_step_size = 1;
// sf->reference_masking = 1;
int undershoot_seen = 0;
SPEED_FEATURES *sf = &cpi->sf;
+ unsigned int max_mv_def = MIN(cpi->common.width, cpi->common.height);
#if RESET_FOREACH_FILTER
int q_low0;
int q_high0;
// Set default state for segment based loop filter update flags
xd->lf.mode_ref_delta_update = 0;
+ // Initialize cpi->mv_step_param to default based on max resolution
+ cpi->mv_step_param = vp9_init_search_range(cpi, max_mv_def);
+ // Initialize cpi->max_mv_magnitude and cpi->mv_step_param if appropriate.
+ if (sf->auto_mv_step_size) {
+ if ((cpi->common.frame_type == KEY_FRAME) || cpi->common.intra_only) {
+ // initialize max_mv_magnitude for use in the first INTER frame
+ // after a key/intra-only frame
+ cpi->max_mv_magnitude = max_mv_def;
+ } else {
+ if (cm->show_frame)
+ // allow mv_steps to correspond to twice the max mv magnitude found
+ // in the previous frame, capped by the default max_mv_magnitude based
+ // on resolution
+ cpi->mv_step_param = vp9_init_search_range(
+ cpi, MIN(max_mv_def, 2 * cpi->max_mv_magnitude));
+ cpi->max_mv_magnitude = 0;
+ }
+ }
// Set various flags etc to special state if it is a key frame
if (cm->frame_type == KEY_FRAME) {