From 81d1e7bf28af977bc785a6c66f66ad810cb5343d Mon Sep 17 00:00:00 2001 From: paulwilkins Date: Fri, 8 Apr 2016 10:28:40 +0100 Subject: [PATCH] Adjust motion component of prediction decay. Adjust the motion decay component to account for image size. This has very little impact for smaller image sizes. Average bdrate results for our HD test sets:- Hdres set: opsnr +0,92%, Fast SSIM +1.6% Netflix hd set: opsnr + 1.5%, Fast SSIM +3.1% There are a couple of notable -ve clips such as cyclist and sunflower which seem to be better with a shorter interval but also a few very big wins such as Jets >12% psnr 22% Fast SSIM and from the Netflix Netflix set PierSeaside 9.7% psnr and 18.2% Fast SSIM. Change-Id: Ie43aaedaa74331ed83d624a13548094ac64fed9e --- vp9/encoder/vp9_firstpass.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 2572dd44a..e9fe98b20 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -1371,7 +1371,6 @@ void vp9_init_second_pass(VP9_COMP *cpi) { } #define SR_DIFF_PART 0.0015 -#define MOTION_AMP_PART 0.003 #define INTRA_PART 0.005 #define DEFAULT_DECAY_LIMIT 0.75 #define LOW_SR_DIFF_TRHESH 0.1 @@ -1386,8 +1385,10 @@ static double get_sr_decay_rate(const VP9_COMP *cpi, double sr_decay = 1.0; double modified_pct_inter; double modified_pcnt_intra; - const double motion_amplitude_factor = - frame->pcnt_motion * ((frame->mvc_abs + frame->mvr_abs) / 2); + const double motion_amplitude_part = + frame->pcnt_motion * + ((frame->mvc_abs + frame->mvr_abs) / + (cpi->initial_height + cpi->initial_width)); modified_pct_inter = frame->pcnt_inter; if ((frame->intra_error / DOUBLE_DIVIDE_CHECK(frame->coded_error)) < @@ -1400,7 +1401,7 @@ static double get_sr_decay_rate(const VP9_COMP *cpi, if ((sr_diff > LOW_SR_DIFF_TRHESH)) { sr_diff = VPXMIN(sr_diff, SR_DIFF_MAX); sr_decay = 1.0 - (SR_DIFF_PART * sr_diff) - - (MOTION_AMP_PART * motion_amplitude_factor) - + motion_amplitude_part - (INTRA_PART * modified_pcnt_intra); } return VPXMAX(sr_decay, VPXMIN(DEFAULT_DECAY_LIMIT, modified_pct_inter));