diff --git a/src/common_audio/signal_processing/signal_processing_unittest.cc b/src/common_audio/signal_processing/signal_processing_unittest.cc index 4394bbd6a..606b2694b 100644 --- a/src/common_audio/signal_processing/signal_processing_unittest.cc +++ b/src/common_audio/signal_processing/signal_processing_unittest.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -394,8 +394,8 @@ TEST_F(SplTest, RandTest) { TEST_F(SplTest, SignalProcessingTest) { const int kVectorSize = 4; int A[] = {1, 2, 33, 100}; + const WebRtc_Word16 kHanning[4] = { 2399, 8192, 13985, 16384 }; WebRtc_Word16 b16[kVectorSize]; - WebRtc_Word32 b32[kVectorSize]; WebRtc_Word16 bTmp16[kVectorSize]; WebRtc_Word32 bTmp32[kVectorSize]; @@ -404,26 +404,27 @@ TEST_F(SplTest, SignalProcessingTest) { for (int kk = 0; kk < kVectorSize; ++kk) { b16[kk] = A[kk]; - b32[kk] = A[kk]; } EXPECT_EQ(2, WebRtcSpl_AutoCorrelation(b16, kVectorSize, 1, bTmp32, &bScale)); - WebRtcSpl_ReflCoefToLpc(b16, kVectorSize, bTmp16); -// for (int kk = 0; kk < kVectorSize; ++kk) { -// EXPECT_EQ(aTmp16[kk], bTmp16[kk]); -// } - WebRtcSpl_LpcToReflCoef(bTmp16, kVectorSize, b16); -// for (int kk = 0; kk < kVectorSize; ++kk) { -// EXPECT_EQ(a16[kk], b16[kk]); -// } - WebRtcSpl_AutoCorrToReflCoef(b32, kVectorSize, bTmp16); -// for (int kk = 0; kk < kVectorSize; ++kk) { -// EXPECT_EQ(aTmp16[kk], bTmp16[kk]); -// } + // TODO(bjornv): Activate the Reflection Coefficient tests when refactoring. +// WebRtcSpl_ReflCoefToLpc(b16, kVectorSize, bTmp16); +//// for (int kk = 0; kk < kVectorSize; ++kk) { +//// EXPECT_EQ(aTmp16[kk], bTmp16[kk]); +//// } +// WebRtcSpl_LpcToReflCoef(bTmp16, kVectorSize, b16); +//// for (int kk = 0; kk < kVectorSize; ++kk) { +//// EXPECT_EQ(a16[kk], b16[kk]); +//// } +// WebRtcSpl_AutoCorrToReflCoef(b32, kVectorSize, bTmp16); +//// for (int kk = 0; kk < kVectorSize; ++kk) { +//// EXPECT_EQ(aTmp16[kk], bTmp16[kk]); +//// } + WebRtcSpl_GetHanningWindow(bTmp16, kVectorSize); -// for (int kk = 0; kk < kVectorSize; ++kk) { -// EXPECT_EQ(aTmp16[kk], bTmp16[kk]); -// } + for (int kk = 0; kk < kVectorSize; ++kk) { + EXPECT_EQ(kHanning[kk], bTmp16[kk]); + } for (int kk = 0; kk < kVectorSize; ++kk) { b16[kk] = A[kk];