summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDebargha Mukherjee <debargha@google.com>2015-07-10 09:49:17 -0700
committerpaulwilkins <paulwilkins@google.com>2015-07-14 18:32:38 +0100
commit3c5244886a804c8c05898ca8d78c3356f6c40507 (patch)
treefa92079c19a89123d97dd6d567b07e285aa1762a /test
parentcda17e12ed6483359d126b0fee3013774443d3df (diff)
downloadlibvpx-3c5244886a804c8c05898ca8d78c3356f6c40507.tar
libvpx-3c5244886a804c8c05898ca8d78c3356f6c40507.tar.gz
libvpx-3c5244886a804c8c05898ca8d78c3356f6c40507.tar.bz2
libvpx-3c5244886a804c8c05898ca8d78c3356f6c40507.zip
Fixes part of merge regression from adding arf parameters.
From Change Ibf0c30b72074b3f71918ab278ccccc02a95a70a0 There is still an issue relating to one animated test clip with repeat patterns where this change effectively increase the default maximum arf interval by +1. This can be examined seperately. Change-Id: Idd01d5480fc45202d8a059a0c3afc0997cc5bdd1
Diffstat (limited to 'test')
-rw-r--r--test/vp9_arf_freq_test.cc29
1 files changed, 15 insertions, 14 deletions
diff --git a/test/vp9_arf_freq_test.cc b/test/vp9_arf_freq_test.cc
index 92c236f5b..07968bcd6 100644
--- a/test/vp9_arf_freq_test.cc
+++ b/test/vp9_arf_freq_test.cc
@@ -21,8 +21,8 @@ namespace {
const unsigned int kFrames = 100;
const int kBitrate = 500;
-#define ARF_NOT_SEEN 1000001
-#define ARF_SEEN_ONCE 1000000
+#define ARF_NOT_SEEN 1000001
+#define ARF_SEEN_ONCE 1000000
typedef struct {
const char *filename;
@@ -108,7 +108,7 @@ class ArfFreqTest
}
virtual void BeginPassHook(unsigned int) {
- min_arf_ = ARF_NOT_SEEN;
+ min_run_ = ARF_NOT_SEEN;
run_of_visible_frames_ = 0;
}
@@ -137,15 +137,15 @@ class ArfFreqTest
if (frames == 1) {
run_of_visible_frames_++;
} else if (frames == 2) {
- if (min_arf_ == ARF_NOT_SEEN) {
- min_arf_ = ARF_SEEN_ONCE;
- } else if (min_arf_ == ARF_SEEN_ONCE ||
- run_of_visible_frames_ < min_arf_) {
- min_arf_ = run_of_visible_frames_;
+ if (min_run_ == ARF_NOT_SEEN) {
+ min_run_ = ARF_SEEN_ONCE;
+ } else if (min_run_ == ARF_SEEN_ONCE ||
+ run_of_visible_frames_ < min_run_) {
+ min_run_ = run_of_visible_frames_;
}
run_of_visible_frames_ = 1;
} else {
- min_arf_ = 0;
+ min_run_ = 0;
run_of_visible_frames_ = 1;
}
}
@@ -166,8 +166,8 @@ class ArfFreqTest
}
}
- int GetMinArfDistance() const {
- return min_arf_;
+ int GetMinVisibleRun() const {
+ return min_run_;
}
int GetMinArfDistanceRequested() const {
@@ -185,7 +185,7 @@ class ArfFreqTest
private:
int min_arf_requested_;
- int min_arf_;
+ int min_run_;
int run_of_visible_frames_;
};
@@ -214,9 +214,10 @@ TEST_P(ArfFreqTest, MinArfFreqTest) {
}
ASSERT_NO_FATAL_FAILURE(RunLoop(video));
- const int min_arf_dist = GetMinArfDistance();
+ const int min_run = GetMinVisibleRun();
const int min_arf_dist_requested = GetMinArfDistanceRequested();
- if (min_arf_dist != ARF_NOT_SEEN && min_arf_dist != ARF_SEEN_ONCE) {
+ if (min_run != ARF_NOT_SEEN && min_run != ARF_SEEN_ONCE) {
+ const int min_arf_dist = min_run + 1;
EXPECT_GE(min_arf_dist, min_arf_dist_requested);
}
delete(video);