OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include <stdio.h> | 11 #include <stdio.h> |
12 #include <stdlib.h> | 12 #include <stdlib.h> |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 16 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
17 #include "webrtc/modules/video_processing/include/video_processing.h" | 17 #include "webrtc/modules/video_processing/include/video_processing.h" |
18 #include "webrtc/modules/video_processing/test/video_processing_unittest.h" | 18 #include "webrtc/modules/video_processing/test/video_processing_unittest.h" |
19 #include "webrtc/system_wrappers/include/tick_util.h" | 19 #include "webrtc/system_wrappers/include/tick_util.h" |
20 #include "webrtc/test/testsupport/fileutils.h" | 20 #include "webrtc/test/testsupport/fileutils.h" |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 | 23 |
24 #if defined(WEBRTC_IOS) | 24 #if defined(WEBRTC_IOS) |
25 TEST_P(VideoProcessingTest, DISABLED_Deflickering) { | 25 TEST_F(VideoProcessingTest, DISABLED_Deflickering) { |
26 #else | 26 #else |
27 TEST_P(VideoProcessingTest, Deflickering) { | 27 TEST_F(VideoProcessingTest, Deflickering) { |
28 #endif | 28 #endif |
29 enum { NumRuns = 30 }; | 29 enum { NumRuns = 30 }; |
30 uint32_t frameNum = 0; | 30 uint32_t frameNum = 0; |
31 const uint32_t frame_rate = 15; | 31 const uint32_t frame_rate = 15; |
32 | 32 |
33 int64_t min_runtime = 0; | 33 int64_t min_runtime = 0; |
34 int64_t avg_runtime = 0; | 34 int64_t avg_runtime = 0; |
35 | 35 |
36 // Close automatically opened Foreman. | 36 // Close automatically opened Foreman. |
37 fclose(source_file_); | 37 fclose(source_file_); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 ASSERT_EQ(0, fclose(deflickerFile)); | 91 ASSERT_EQ(0, fclose(deflickerFile)); |
92 // TODO(kjellander): Add verification of deflicker output file. | 92 // TODO(kjellander): Add verification of deflicker output file. |
93 | 93 |
94 printf("\nAverage run time = %d us / frame\n", | 94 printf("\nAverage run time = %d us / frame\n", |
95 static_cast<int>(avg_runtime / frameNum / NumRuns)); | 95 static_cast<int>(avg_runtime / frameNum / NumRuns)); |
96 printf("Min run time = %d us / frame\n\n", | 96 printf("Min run time = %d us / frame\n\n", |
97 static_cast<int>(min_runtime / frameNum)); | 97 static_cast<int>(min_runtime / frameNum)); |
98 } | 98 } |
99 | 99 |
100 } // namespace webrtc | 100 } // namespace webrtc |
OLD | NEW |