Fix bug in ForcedKeyTestLarge
This patch fixes the bugs in application forced key frames
after the framework change of deciding the GOP structure
before frame processing.
BUG=aomedia:2808
BUG=aomedia:2809
BUG=aomedia:2810
STATS_CHANGED expected for forced KF
Change-Id: If3e0c4bab4e0c0104dd0a52314dd6e4cb7a95d40
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index 0425f55..0190b28 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -355,7 +355,7 @@
// so there isn't a forced key-frame pending.
return -1;
} else if (e->flags == AOM_EFLAG_FORCE_KF) {
- return (i + 1);
+ return i;
} else {
continue;
}
diff --git a/test/kf_test.cc b/test/kf_test.cc
index 4a8eb86..0b36881 100644
--- a/test/kf_test.cc
+++ b/test/kf_test.cc
@@ -180,8 +180,7 @@
bool is_kf_placement_violated_;
};
-// TODO(crbug.com/aomedia/2810): Fix and re-enable the test.
-TEST_P(ForcedKeyTestLarge, DISABLED_Frame1IsKey) {
+TEST_P(ForcedKeyTestLarge, Frame1IsKey) {
const aom_rational timebase = { 1, 30 };
const int lag_values[] = { 3, 15, 25, -1 };
@@ -201,8 +200,7 @@
// This class checks the presence and placement of application
// forced key frames.
-// TODO(crbug.com/aomedia/2808): Fix and re-enable the test.
-TEST_P(ForcedKeyTestLarge, DISABLED_ForcedFrameIsKey) {
+TEST_P(ForcedKeyTestLarge, ForcedFrameIsKey) {
const aom_rational timebase = { 1, 30 };
const int lag_values[] = { 3, 15, 25, -1 };
@@ -231,8 +229,7 @@
}
}
-// TODO(crbug.com/aomedia/2809): Fix and re-enable the test.
-TEST_P(ForcedKeyTestLarge, DISABLED_ForcedFrameIsKeyCornerCases) {
+TEST_P(ForcedKeyTestLarge, ForcedFrameIsKeyCornerCases) {
const aom_rational timebase = { 1, 30 };
const int kf_offsets[] = { -2, -1, 1, 2, 0 };
cfg_.g_lag_in_frames = 35;