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 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // We don't require bit-exact for ARM assembly code. | 172 // We don't require bit-exact for ARM assembly code. |
173 EXPECT_LE(abs(spec2time_out_expected_1[i] - data_out_1[i]), 16); | 173 EXPECT_LE(abs(spec2time_out_expected_1[i] - data_out_1[i]), 16); |
174 EXPECT_LE(abs(spec2time_out_expected_2[i] - data_out_2[i]), 16); | 174 EXPECT_LE(abs(spec2time_out_expected_2[i] - data_out_2[i]), 16); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 }; | 178 }; |
179 | 179 |
180 TEST_F(TransformTest, Time2SpecTest) { | 180 TEST_F(TransformTest, Time2SpecTest) { |
181 Time2SpecTester(WebRtcIsacfix_Time2SpecC); | 181 Time2SpecTester(WebRtcIsacfix_Time2SpecC); |
182 #ifdef WEBRTC_DETECT_NEON | 182 #if defined(WEBRTC_HAS_NEON) |
183 if ((WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) != 0) { | |
184 Time2SpecTester(WebRtcIsacfix_Time2SpecNeon); | |
185 } | |
186 #elif defined(WEBRTC_HAS_NEON) | |
187 Time2SpecTester(WebRtcIsacfix_Time2SpecNeon); | 183 Time2SpecTester(WebRtcIsacfix_Time2SpecNeon); |
188 #endif | 184 #endif |
189 } | 185 } |
190 | 186 |
191 TEST_F(TransformTest, Spec2TimeTest) { | 187 TEST_F(TransformTest, Spec2TimeTest) { |
192 Spec2TimeTester(WebRtcIsacfix_Spec2TimeC); | 188 Spec2TimeTester(WebRtcIsacfix_Spec2TimeC); |
193 #ifdef WEBRTC_DETECT_NEON | 189 #if defined(WEBRTC_HAS_NEON) |
194 if ((WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) != 0) { | |
195 Spec2TimeTester(WebRtcIsacfix_Spec2TimeNeon); | |
196 } | |
197 #elif defined(WEBRTC_HAS_NEON) | |
198 Spec2TimeTester(WebRtcIsacfix_Spec2TimeNeon); | 190 Spec2TimeTester(WebRtcIsacfix_Spec2TimeNeon); |
199 #endif | 191 #endif |
200 } | 192 } |
OLD | NEW |