OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 "webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h" | 11 #include "webrtc/modules/remote_bitrate_estimator/test/estimators/nada.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 #include <memory> | 14 #include <memory> |
15 #include <numeric> | 15 #include <numeric> |
16 | 16 |
17 #include "webrtc/base/arraysize.h" | 17 #include "webrtc/base/arraysize.h" |
18 #include "webrtc/base/common.h" | 18 #include "webrtc/base/common.h" |
| 19 #include "webrtc/base/constructormagic.h" |
19 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h" | 20 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.h" |
20 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" | 21 #include "webrtc/modules/remote_bitrate_estimator/test/packet.h" |
| 22 #include "webrtc/modules/remote_bitrate_estimator/test/packet_sender.h" |
21 #include "webrtc/test/gtest.h" | 23 #include "webrtc/test/gtest.h" |
22 #include "webrtc/base/constructormagic.h" | |
23 #include "webrtc/modules/remote_bitrate_estimator/test/packet_sender.h" | |
24 #include "webrtc/test/testsupport/fileutils.h" | 24 #include "webrtc/test/testsupport/fileutils.h" |
25 | 25 |
26 namespace webrtc { | 26 namespace webrtc { |
27 namespace testing { | 27 namespace testing { |
28 namespace bwe { | 28 namespace bwe { |
29 | 29 |
30 class FilterTest : public ::testing::Test { | 30 class FilterTest : public ::testing::Test { |
31 public: | 31 public: |
32 void MedianFilterConstantArray() { | 32 void MedianFilterConstantArray() { |
33 std::fill_n(raw_signal_, kNumElements, kSignalValue); | 33 std::fill_n(raw_signal_, kNumElements, kSignalValue); |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 for (int i = 1; i < kNumElements; ++i) { | 489 for (int i = 1; i < kNumElements; ++i) { |
490 EXPECT_EQ( | 490 EXPECT_EQ( |
491 exp_smoothed[i], | 491 exp_smoothed[i], |
492 static_cast<int64_t>(exp_smoothed[i - 1] * (1.0f - kAlpha) + 0.5f)); | 492 static_cast<int64_t>(exp_smoothed[i - 1] * (1.0f - kAlpha) + 0.5f)); |
493 } | 493 } |
494 } | 494 } |
495 | 495 |
496 } // namespace bwe | 496 } // namespace bwe |
497 } // namespace testing | 497 } // namespace testing |
498 } // namespace webrtc | 498 } // namespace webrtc |
OLD | NEW |