ref: 0df9a18edfe5969a3981ac65b7034480f36e8fe9
parent: 1e2cfa3f0f75c971ccceb9be0e818b207c86303b
author: Jingning Han <jingning@google.com>
date: Wed May 8 09:16:10 EDT 2019
Fix key frame detection This solves the regression issue seen in certain animation clips. BUG=b/132108583 Change-Id: Ib28413c95160a5f15fbcf9ea6a322fd4f69a57ce
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2827,7 +2827,7 @@
// See above for an explanation of the test criteria.
// If so, then examine how well it predicts subsequent frames.
if (!detect_flash(twopass, -1) && !detect_flash(twopass, 0) &&
- (next_frame->pcnt_second_ref < SECOND_REF_USEAGE_THRESH) &&
+ (this_frame->pcnt_second_ref < SECOND_REF_USEAGE_THRESH) &&
((this_frame->pcnt_inter < VERY_LOW_INTER_THRESH) ||
(slide_transition(this_frame, last_frame, next_frame)) ||
(intra_step_transition(this_frame, last_frame, next_frame)) ||