Merge "Bug fix for second reference stats."

This commit is contained in:
Paul Wilkins 2017-12-12 11:56:10 +00:00 committed by Gerrit Code Review
commit 94eaecaa91

View File

@ -2543,8 +2543,11 @@ static void define_gf_group(VP9_COMP *cpi, FIRSTPASS_STATS *this_frame) {
// Update the accumulator for second ref error difference.
// This is intended to give an indication of how much the coded error is
// increasing over time.
sr_accumulator += (next_frame.sr_coded_error - next_frame.coded_error);
sr_accumulator = VPXMAX(0.0, sr_accumulator);
if (i == 1) {
sr_accumulator += next_frame.coded_error;
} else {
sr_accumulator += (next_frame.sr_coded_error - next_frame.coded_error);
}
}
// Break out conditions.