diff options
author | angiebird <angiebird@google.com> | 2019-10-09 15:20:51 -0700 |
---|---|---|
committer | angiebird <angiebird@google.com> | 2019-10-10 15:44:51 -0700 |
commit | 47481291519e8469398c8a5afd7c2688f575061e (patch) | |
tree | 2b60b80ae55d4e0ee98b7462b745bd3e343a7032 /vp9 | |
parent | 16cf728c535400266828bef2b29a2b35e2ba6bc7 (diff) | |
download | libvpx-47481291519e8469398c8a5afd7c2688f575061e.tar libvpx-47481291519e8469398c8a5afd7c2688f575061e.tar.gz libvpx-47481291519e8469398c8a5afd7c2688f575061e.tar.bz2 libvpx-47481291519e8469398c8a5afd7c2688f575061e.zip |
Replace cpi by frame_info in get_sr_decay_rate()
Change-Id: I8ed925edb12345042cf3e446095b4ad4acfa11c4
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_firstpass.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c index 8a8ee7c73..0f28e7e7b 100644 --- a/vp9/encoder/vp9_firstpass.c +++ b/vp9/encoder/vp9_firstpass.c @@ -1747,15 +1747,16 @@ void vp9_init_second_pass(VP9_COMP *cpi) { #define LOW_CODED_ERR_PER_MB 10.0 #define NCOUNT_FRAME_II_THRESH 6.0 -static double get_sr_decay_rate(const VP9_COMP *cpi, +static double get_sr_decay_rate(const FRAME_INFO *frame_info, const FIRSTPASS_STATS *frame) { double sr_diff = (frame->sr_coded_error - frame->coded_error); double sr_decay = 1.0; double modified_pct_inter; double modified_pcnt_intra; const double motion_amplitude_part = - frame->pcnt_motion * ((frame->mvc_abs + frame->mvr_abs) / - (cpi->initial_height + cpi->initial_width)); + frame->pcnt_motion * + ((frame->mvc_abs + frame->mvr_abs) / + (frame_info->frame_height + frame_info->frame_width)); modified_pct_inter = frame->pcnt_inter; if ((frame->coded_error > LOW_CODED_ERR_PER_MB) && @@ -1779,7 +1780,7 @@ static double get_sr_decay_rate(const VP9_COMP *cpi, static double get_zero_motion_factor(const VP9_COMP *cpi, const FIRSTPASS_STATS *frame) { const double zero_motion_pct = frame->pcnt_inter - frame->pcnt_motion; - double sr_decay = get_sr_decay_rate(cpi, frame); + double sr_decay = get_sr_decay_rate(&cpi->frame_info, frame); return VPXMIN(sr_decay, zero_motion_pct); } @@ -1787,7 +1788,7 @@ static double get_zero_motion_factor(const VP9_COMP *cpi, static double get_prediction_decay_rate(const VP9_COMP *cpi, const FIRSTPASS_STATS *next_frame) { - const double sr_decay_rate = get_sr_decay_rate(cpi, next_frame); + const double sr_decay_rate = get_sr_decay_rate(&cpi->frame_info, next_frame); const double zero_motion_factor = (0.95 * pow((next_frame->pcnt_inter - next_frame->pcnt_motion), ZM_POWER_FACTOR)); |