diff options
author | paulwilkins <paulwilkins@google.com> | 2016-08-08 15:08:21 +0100 |
---|---|---|
committer | paulwilkins <paulwilkins@google.com> | 2016-08-31 12:45:49 +0100 |
commit | 6fc07a217da53554e56321ead7437cc67f627492 (patch) | |
tree | c121964ec4d254a53a7f4e07379788114283cf82 /vp9/encoder/vp9_ratectrl.c | |
parent | 66b2266a221a619ba87600310143229f09c46511 (diff) | |
download | libvpx-6fc07a217da53554e56321ead7437cc67f627492.tar libvpx-6fc07a217da53554e56321ead7437cc67f627492.tar.gz libvpx-6fc07a217da53554e56321ead7437cc67f627492.tar.bz2 libvpx-6fc07a217da53554e56321ead7437cc67f627492.zip |
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
Diffstat (limited to 'vp9/encoder/vp9_ratectrl.c')
-rw-r--r-- | vp9/encoder/vp9_ratectrl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 5daad7458..223c01f0a 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -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); } } |