| Index: webrtc/modules/video_processing/test/deflickering_test.cc
|
| diff --git a/webrtc/modules/video_processing/test/deflickering_test.cc b/webrtc/modules/video_processing/test/deflickering_test.cc
|
| index 5ff5692cce9cb04b621ed8bd2daa120d16475302..6e65aced28b5db4571e0d57e3f8680ed4240b9d7 100644
|
| --- a/webrtc/modules/video_processing/test/deflickering_test.cc
|
| +++ b/webrtc/modules/video_processing/test/deflickering_test.cc
|
| @@ -13,10 +13,10 @@
|
|
|
| #include <memory>
|
|
|
| +#include "webrtc/base/timeutils.h"
|
| #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
| #include "webrtc/modules/video_processing/include/video_processing.h"
|
| #include "webrtc/modules/video_processing/test/video_processing_unittest.h"
|
| -#include "webrtc/system_wrappers/include/tick_util.h"
|
| #include "webrtc/test/testsupport/fileutils.h"
|
|
|
| namespace webrtc {
|
| @@ -50,9 +50,9 @@ TEST_F(VideoProcessingTest, Deflickering) {
|
| printf("\nRun time [us / frame]:\n");
|
| std::unique_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
|
| for (uint32_t run_idx = 0; run_idx < NumRuns; run_idx++) {
|
| - TickTime t0;
|
| - TickTime t1;
|
| - TickInterval acc_ticks;
|
| + int64_t t0;
|
| + int64_t t1;
|
| + int64_t acc_ticks = 0;
|
| uint32_t timeStamp = 1;
|
|
|
| frameNum = 0;
|
| @@ -63,12 +63,12 @@ TEST_F(VideoProcessingTest, Deflickering) {
|
| height_, 0, kVideoRotation_0, &video_frame_));
|
| video_frame_.set_timestamp(timeStamp);
|
|
|
| - t0 = TickTime::Now();
|
| + t0 = rtc::TimeNanos();
|
| VideoProcessing::FrameStats stats;
|
| vp_->GetFrameStats(video_frame_, &stats);
|
| EXPECT_GT(stats.num_pixels, 0u);
|
| ASSERT_EQ(0, vp_->Deflickering(&video_frame_, &stats));
|
| - t1 = TickTime::Now();
|
| + t1 = rtc::TimeNanos();
|
| acc_ticks += (t1 - t0);
|
|
|
| if (run_idx == 0) {
|
| @@ -80,11 +80,13 @@ TEST_F(VideoProcessingTest, Deflickering) {
|
| }
|
| ASSERT_NE(0, feof(source_file_)) << "Error reading source file";
|
|
|
| - printf("%u\n", static_cast<int>(acc_ticks.Microseconds() / frameNum));
|
| - if (acc_ticks.Microseconds() < min_runtime || run_idx == 0) {
|
| - min_runtime = acc_ticks.Microseconds();
|
| + int64_t acc_us = acc_ticks / rtc::kNumNanosecsPerMicrosec;
|
| + printf("%u\n", static_cast<int>(
|
| + acc_us / frameNum));
|
| + if (acc_us < min_runtime || run_idx == 0) {
|
| + min_runtime = acc_us;
|
| }
|
| - avg_runtime += acc_ticks.Microseconds();
|
| + avg_runtime += acc_us;
|
|
|
| rewind(source_file_);
|
| }
|
|
|