summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorDeepa K G <deepa.kg@ittiam.com>2019-01-29 19:58:05 +0530
committerDeepa K G <deepa.kg@ittiam.com>2019-04-18 04:47:17 +0000
commit640735025e578b68d5c7444a41b11b7bd35e32c4 (patch)
tree3a35c024d85f6087dfd17ad18f9c7be551bfd0a3 /vp9
parente718cade1dc7179daede6b695166702dbf6ab8b4 (diff)
downloadlibvpx-640735025e578b68d5c7444a41b11b7bd35e32c4.tar
libvpx-640735025e578b68d5c7444a41b11b7bd35e32c4.tar.gz
libvpx-640735025e578b68d5c7444a41b11b7bd35e32c4.tar.bz2
libvpx-640735025e578b68d5c7444a41b11b7bd35e32c4.zip
Fix in key frame detection
The frame next to scene cut frame does not usually have a high second ref useage. Thus the sec ref useage of the frame next to scene cut frame is tested against a threshold for scene cut detection. With this change scene cut detection is improved for contents where genuine scene cuts were being missed. Change-Id: I11190d848fa1c1dcd63aab81da799354371e2a30
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_firstpass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index ae84dd5f1..28570f7d0 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -2820,7 +2820,7 @@ static int test_candidate_kf(TWO_PASS *twopass,
// 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) &&
- (this_frame->pcnt_second_ref < SECOND_REF_USEAGE_THRESH) &&
+ (next_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)) ||