| 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 <algorithm> | 11 #include <algorithm> |
| 12 #include <sstream> | 12 #include <sstream> |
| 13 | 13 |
| 14 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
| 14 #include "webrtc/test/gtest.h" | 15 #include "webrtc/test/gtest.h" |
| 15 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | |
| 16 | 16 |
| 17 static const size_t kVector16Size = 9; | 17 static const size_t kVector16Size = 9; |
| 18 static const int16_t vector16[kVector16Size] = {1, -15511, 4323, 1963, | 18 static const int16_t vector16[kVector16Size] = {1, -15511, 4323, 1963, |
| 19 WEBRTC_SPL_WORD16_MAX, 0, WEBRTC_SPL_WORD16_MIN + 5, -3333, 345}; | 19 WEBRTC_SPL_WORD16_MAX, 0, WEBRTC_SPL_WORD16_MIN + 5, -3333, 345}; |
| 20 | 20 |
| 21 class SplTest : public testing::Test { | 21 class SplTest : public testing::Test { |
| 22 protected: | 22 protected: |
| 23 SplTest() { | 23 SplTest() { |
| 24 WebRtcSpl_Init(); | 24 WebRtcSpl_Init(); |
| 25 } | 25 } |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 // 12-15 are skipped to account for the filter lag. | 598 // 12-15 are skipped to account for the filter lag. |
| 599 for (size_t i = 0; i < 12; ++i) { | 599 for (size_t i = 0; i < 12; ++i) { |
| 600 EXPECT_EQ(kRefValue32kHz1, out_vector[i]); | 600 EXPECT_EQ(kRefValue32kHz1, out_vector[i]); |
| 601 EXPECT_EQ(kRefValue16kHz1, out_vector_w16[i]); | 601 EXPECT_EQ(kRefValue16kHz1, out_vector_w16[i]); |
| 602 } | 602 } |
| 603 for (size_t i = 16; i < 2 * kBlockSize; ++i) { | 603 for (size_t i = 16; i < 2 * kBlockSize; ++i) { |
| 604 EXPECT_EQ(kRefValue32kHz2, out_vector[i]); | 604 EXPECT_EQ(kRefValue32kHz2, out_vector[i]); |
| 605 EXPECT_EQ(kRefValue16kHz2, out_vector_w16[i]); | 605 EXPECT_EQ(kRefValue16kHz2, out_vector_w16[i]); |
| 606 } | 606 } |
| 607 } | 607 } |
| OLD | NEW |