ref: 51ebb9a39671f3a9743fb4cd0b155d577d2f8a65
parent: 3c37e7d2faeeacc4294555d1550a103d9fda6753
author: James Zern <jzern@google.com>
date: Wed Aug 8 10:16:08 EDT 2012
EncoderTest: check that timestamps are monotonic Change-Id: I813fa94c83df6282f382b24bbaccb1fe2fa94276
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -94,6 +94,8 @@
void EncoderTest::RunLoop(VideoSource *video) {
for (unsigned int pass = 0; pass < passes_; pass++) {
+ last_pts_ = 0;
+
if (passes_ == 1)
cfg_.g_pass = VPX_RC_ONE_PASS;
else if (pass == 0)
@@ -120,6 +122,8 @@
if (pkt->kind != VPX_CODEC_CX_FRAME_PKT)
continue;
+ ASSERT_GE(pkt->data.frame.pts, last_pts_);
+ last_pts_ = pkt->data.frame.pts;
FramePktHook(pkt);
}
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -138,7 +138,7 @@
// classes directly, so that tests can be parameterized differently.
class EncoderTest {
protected:
- EncoderTest() : abort_(false), flags_(0) {}
+ EncoderTest() : abort_(false), flags_(0), last_pts_(0) {}
virtual ~EncoderTest() {}
@@ -177,6 +177,7 @@
unsigned long deadline_;
TwopassStatsStore stats_;
unsigned long flags_;
+ vpx_codec_pts_t last_pts_;
};
} // namespace libvpx_test
--
⑨