ref: d99abe9a9ad78b765386d0ee62559de184ba581e
parent: 689ac413314db76b92fe3f34792502d72e2ea0cd
parent: 25b7b6e20fed47e73b66c3b0c59c602bf19b76d8
author: Marco Paniconi <marpan@google.com>
date: Tue May 15 13:45:29 EDT 2018
Merge "vp9: Some speed feature settings for speed 9."
--- a/test/vp9_datarate_test.cc
+++ b/test/vp9_datarate_test.cc
@@ -266,7 +266,7 @@
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!";
}
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -583,6 +583,7 @@
} else {
thresholds[1] = (5 * threshold_base) >> 1;
}
+ if (cpi->sf.disable_16x16part_nonkey) thresholds[2] = INT64_MAX;
}
}
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1660,6 +1660,10 @@
}
}
+ 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;
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -375,6 +375,8 @@
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;
@@ -671,8 +673,15 @@
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) {
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -531,6 +531,12 @@
// 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;