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 "webrtc/modules/audio_processing/ns/nsx_core.h" | 11 #include "webrtc/modules/audio_processing/ns/nsx_core.h" |
12 | 12 |
13 #include <arm_neon.h> | 13 #include <arm_neon.h> |
14 | 14 |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/rtc_base/checks.h" |
16 | 16 |
17 // Constants to compensate for shifting signal log(2^shifts). | 17 // Constants to compensate for shifting signal log(2^shifts). |
18 const int16_t WebRtcNsx_kLogTable[9] = { | 18 const int16_t WebRtcNsx_kLogTable[9] = { |
19 0, 177, 355, 532, 710, 887, 1065, 1242, 1420 | 19 0, 177, 355, 532, 710, 887, 1065, 1242, 1420 |
20 }; | 20 }; |
21 | 21 |
22 const int16_t WebRtcNsx_kCounterDiv[201] = { | 22 const int16_t WebRtcNsx_kCounterDiv[201] = { |
23 32767, 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731, | 23 32767, 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731, |
24 2521, 2341, 2185, 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311, | 24 2521, 2341, 2185, 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311, |
25 1260, 1214, 1170, 1130, 1092, 1057, 1024, 993, 964, 936, 910, 886, 862, 840, | 25 1260, 1214, 1170, 1130, 1092, 1057, 1024, 993, 964, 936, 910, 886, 862, 840, |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 p_start_out += 8; | 597 p_start_out += 8; |
598 } | 598 } |
599 int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer)); | 599 int32x4_t tmp32_low = vmull_s16(vget_low_s16(window), vget_low_s16(buffer)); |
600 int32x4_t tmp32_high = vmull_s16(vget_high_s16(window), | 600 int32x4_t tmp32_high = vmull_s16(vget_high_s16(window), |
601 vget_high_s16(buffer)); | 601 vget_high_s16(buffer)); |
602 | 602 |
603 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); | 603 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); |
604 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); | 604 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); |
605 vst1q_s16(p_start_out, vcombine_s16(result_low, result_high)); | 605 vst1q_s16(p_start_out, vcombine_s16(result_low, result_high)); |
606 } | 606 } |
OLD | NEW |