ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
ASSERT_GE(effective_datarate_[0], cfg_.rc_target_bitrate * 0.75)
<< " The datarate for the file is lower than target by too much!";
- ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.35)
+ ASSERT_LE(effective_datarate_[0], cfg_.rc_target_bitrate * 1.36)
<< " The datarate for the file is greater than target by too much!";
}
} else {
thresholds[1] = (5 * threshold_base) >> 1;
}
+ if (cpi->sf.disable_16x16part_nonkey) thresholds[2] = INT64_MAX;
}
}
}
}
+ if (sf->disable_golden_ref && (x->content_state_sb != kVeryHighSad ||
+ cpi->rc.avg_frame_low_motion < 60))
+ usable_ref_frame = LAST_FRAME;
+
if (!((cpi->ref_frame_flags & flag_list[GOLDEN_FRAME]) &&
!svc_force_zero_mode[GOLDEN_FRAME - 1] && !force_skip_low_temp_var))
use_golden_nonzeromv = 0;
sf->nonrd_keyframe = 0;
sf->svc_use_lowres_part = 0;
sf->re_encode_overshoot_rt = 0;
+ sf->disable_16x16part_nonkey = 0;
+ sf->disable_golden_ref = 0;
if (speed >= 1) {
sf->allow_txfm_domain_distortion = 1;
if (speed >= 9) {
sf->mv.enable_adaptive_subpel_force_stop = 1;
sf->mv.adapt_subpel_force_stop.mv_thresh = 2;
+ if (cpi->rc.avg_frame_low_motion < 40)
+ sf->mv.adapt_subpel_force_stop.mv_thresh = 1;
sf->mv.adapt_subpel_force_stop.force_stop_below = 1;
sf->mv.adapt_subpel_force_stop.force_stop_above = 2;
+ // Disable partition blocks below 16x16, except for low-resolutions.
+ if (cm->frame_type != KEY_FRAME && cm->width >= 320 && cm->height >= 240)
+ sf->disable_16x16part_nonkey = 1;
+ // Allow for disabling GOLDEN reference, for CBR mode.
+ if (cpi->oxcf.rc_mode == VPX_CBR) sf->disable_golden_ref = 1;
}
if (sf->use_altref_onepass) {
// Enable re-encoding on scene change with potential high overshoot,
// for real-time encoding flow.
int re_encode_overshoot_rt;
+
+ // Disable partitioning of 16x16 blocks.
+ int disable_16x16part_nonkey;
+
+ // Allow for disabling golden reference.
+ int disable_golden_ref;
} SPEED_FEATURES;
struct VP9_COMP;