| 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 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 for (size_t i = 1; i < length; i++) { | 197 for (size_t i = 1; i < length; i++) { |
| 198 max_data = std::max(max_data, AbsValue(frame.data_[i])); | 198 max_data = std::max(max_data, AbsValue(frame.data_[i])); |
| 199 } | 199 } |
| 200 | 200 |
| 201 return max_data; | 201 return max_data; |
| 202 } | 202 } |
| 203 | 203 |
| 204 #if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) | 204 #if defined(WEBRTC_AUDIOPROC_FLOAT_PROFILE) |
| 205 void TestStats(const AudioProcessing::Statistic& test, | 205 void TestStats(const AudioProcessing::Statistic& test, |
| 206 const audioproc::Test::Statistic& reference) { | 206 const audioproc::Test::Statistic& reference) { |
| 207 EXPECT_NEAR(reference.instant(), test.instant, 2); | 207 EXPECT_NEAR(reference.instant(), test.instant, 1); |
| 208 EXPECT_NEAR(reference.average(), test.average, 2); | 208 EXPECT_EQ(reference.average(), test.average); |
| 209 EXPECT_NEAR(reference.maximum(), test.maximum, 2); | 209 EXPECT_EQ(reference.maximum(), test.maximum); |
| 210 EXPECT_NEAR(reference.minimum(), test.minimum, 2); | 210 EXPECT_NEAR(reference.minimum(), test.minimum, 1); |
| 211 } | 211 } |
| 212 | 212 |
| 213 void WriteStatsMessage(const AudioProcessing::Statistic& output, | 213 void WriteStatsMessage(const AudioProcessing::Statistic& output, |
| 214 audioproc::Test::Statistic* msg) { | 214 audioproc::Test::Statistic* msg) { |
| 215 msg->set_instant(output.instant); | 215 msg->set_instant(output.instant); |
| 216 msg->set_average(output.average); | 216 msg->set_average(output.average); |
| 217 msg->set_maximum(output.maximum); | 217 msg->set_maximum(output.maximum); |
| 218 msg->set_minimum(output.minimum); | 218 msg->set_minimum(output.minimum); |
| 219 } | 219 } |
| 220 #endif | 220 #endif |
| (...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2764 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), | 2764 std::tr1::make_tuple(16000, 32000, 48000, 32000, 25, 35), |
| 2765 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), | 2765 std::tr1::make_tuple(16000, 32000, 32000, 32000, 25, 0), |
| 2766 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), | 2766 std::tr1::make_tuple(16000, 32000, 16000, 32000, 25, 20), |
| 2767 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), | 2767 std::tr1::make_tuple(16000, 16000, 48000, 16000, 35, 20), |
| 2768 std::tr1::make_tuple(16000, 16000, 32000, 16000, 40, 20), | 2768 std::tr1::make_tuple(16000, 16000, 32000, 16000, 40, 20), |
| 2769 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); | 2769 std::tr1::make_tuple(16000, 16000, 16000, 16000, 0, 0))); |
| 2770 #endif | 2770 #endif |
| 2771 | 2771 |
| 2772 } // namespace | 2772 } // namespace |
| 2773 } // namespace webrtc | 2773 } // namespace webrtc |
| OLD | NEW |