Commit 6fc07a21 authored by paulwilkins's avatar paulwilkins

Modified resize loop constraints.

Using a tighter resize constraint on undershoot seems to help
results (especially SSIM) as significant undershoot on a frame
seems to have more of a damaging impact than overshoot.

This patch has been tuned so that in local testing using the
derf set it is encode speed neutral for speed  setting 2.

Average quality result for speed 2 (psnr,ssim) were  as follows:-

 lowres  0.039,  0.453
 midres  0.249, 0.853
 hdres  0.159, 0.659
 NetFlix -0.241, 0.360

Change-Id: Ie8d3a0d7d6f7ea89d9965d1821be17f8bda85062
parent 66b2266a
......@@ -1233,10 +1233,11 @@ void vp9_rc_compute_frame_size_bounds(const VP9_COMP *cpi, int frame_target,
} 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);
}
}
......
......@@ -187,6 +187,9 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
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 @@ static void set_good_speed_feature(VP9_COMP *cpi, VP9_COMMON *cm,
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 @@ void vp9_set_speed_features_framesize_independent(VP9_COMP *cpi) {
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;
......
......@@ -403,7 +403,8 @@ typedef struct SPEED_FEATURES {
// 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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment