ref: 009116cb6f7a75645c7c3092f97a5fa4cd42d15b
parent: 113f9721d144a1a143a77036db97549b73c66fe9
parent: 6fc07a217da53554e56321ead7437cc67f627492
author: Paul Wilkins <[email protected]>
date: Thu Sep 1 11:59:29 EDT 2016
Merge "Modified resize loop constraints."
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -1233,10 +1233,11 @@
} else {
// For very small rate targets where the fractional adjustment
// may be tiny make sure there is at least a minimum range.
- const int tolerance = (cpi->sf.recode_tolerance * frame_target) / 100;
- *frame_under_shoot_limit = VPXMAX(frame_target - tolerance - 200, 0);
+ const int tol_low = (cpi->sf.recode_tolerance_low * frame_target) / 100;
+ const int tol_high = (cpi->sf.recode_tolerance_high * frame_target) / 100;
+ *frame_under_shoot_limit = VPXMAX(frame_target - tol_low - 100, 0);
*frame_over_shoot_limit =
- VPXMIN(frame_target + tolerance + 200, cpi->rc.max_frame_bandwidth);
+ VPXMIN(frame_target + tol_high + 100, cpi->rc.max_frame_bandwidth);
}
}
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -187,6 +187,9 @@
sf->intra_uv_mode_mask[TX_32X32] = INTRA_DC_H_V;
sf->intra_y_mode_mask[TX_16X16] = INTRA_DC_H_V;
sf->intra_uv_mode_mask[TX_16X16] = INTRA_DC_H_V;
+
+ sf->recode_tolerance_low = 15;
+ sf->recode_tolerance_high = 30;
}
if (speed >= 2) {
@@ -206,6 +209,8 @@
sf->comp_inter_joint_search_thresh = BLOCK_SIZES;
sf->auto_min_max_partition_size = RELAXED_NEIGHBORING_MIN_MAX;
sf->allow_partition_search_skip = 1;
+ sf->recode_tolerance_low = 15;
+ sf->recode_tolerance_high = 45;
}
if (speed >= 3) {
@@ -608,7 +613,8 @@
sf->search_type_check_frequency = 50;
sf->encode_breakout_thresh = 0;
// Recode loop tolerance %.
- sf->recode_tolerance = 25;
+ sf->recode_tolerance_low = 12;
+ sf->recode_tolerance_high = 25;
sf->default_interp_filter = SWITCHABLE;
sf->simple_model_rd_from_var = 0;
sf->short_circuit_flat_blocks = 0;
--- a/vp9/encoder/vp9_speed_features.h
+++ b/vp9/encoder/vp9_speed_features.h
@@ -403,7 +403,8 @@
// This feature controls the tolerence vs target used in deciding whether to
// recode a frame. It has no meaning if recode is disabled.
- int recode_tolerance;
+ int recode_tolerance_low;
+ int recode_tolerance_high;
// This variable controls the maximum block size where intra blocks can be
// used in inter frames.