Made CrossCorrelationTest valid in ARM-Neon platforms, with changes in signal_processing_unittest.cc.
Review URL: https://webrtc-codereview.appspot.com/828006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2868 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
4bfe990337
commit
0a4cdc40fc
@ -505,14 +505,23 @@ TEST_F(SplTest, CrossCorrelationTest) {
|
||||
const int kStep = 1;
|
||||
const int kSeqDimension = 6;
|
||||
|
||||
const int16_t vector16_b[kVector16Size] = {1, 4323, 1963,
|
||||
const int16_t kVector16[kVector16Size] = {1, 4323, 1963,
|
||||
WEBRTC_SPL_WORD16_MAX, WEBRTC_SPL_WORD16_MIN + 5, -3333, -876, 8483, 142};
|
||||
const int32_t expected[3] = {-266947903, -15579555, -171282001};
|
||||
int32_t vector32[kCrossCorrelationDimension] = {0};
|
||||
|
||||
WebRtcSpl_CrossCorrelation(vector32, vector16, vector16_b, kSeqDimension,
|
||||
WebRtcSpl_CrossCorrelation(vector32, vector16, kVector16, kSeqDimension,
|
||||
kCrossCorrelationDimension, kShift, kStep);
|
||||
|
||||
// WebRtcSpl_CrossCorrelationC() and WebRtcSpl_CrossCorrelationNeon()
|
||||
// are not bit-exact.
|
||||
const int32_t kExpected[kCrossCorrelationDimension] =
|
||||
{-266947903, -15579555, -171282001};
|
||||
const int32_t kExpectedNeon[kCrossCorrelationDimension] =
|
||||
{-266947901, -15579553, -171281999};
|
||||
const int32_t* expected = kExpected;
|
||||
if (WebRtcSpl_CrossCorrelation != WebRtcSpl_CrossCorrelationC) {
|
||||
expected = kExpectedNeon;
|
||||
}
|
||||
for (int i = 0; i < kCrossCorrelationDimension; ++i) {
|
||||
EXPECT_EQ(expected[i], vector32[i]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user