ref: f659c7e99ee931e3611ec61609b96b5564ea2229
parent: c5a89b46b996e7ccc2f561dc085f72526cae1dcf
parent: 81d1e7bf28af977bc785a6c66f66ad810cb5343d
author: Paul Wilkins <[email protected]>
date: Mon Apr 11 06:27:29 EDT 2016
Merge "Adjust motion component of prediction decay."
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -1378,7 +1378,6 @@
}
#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
@@ -1393,8 +1392,10 @@
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)) <
@@ -1407,7 +1408,7 @@
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));