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 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 int16_t* ptr_noiseEstLogQuantile = NULL; | 61 int16_t* ptr_noiseEstLogQuantile = NULL; |
62 int16_t* ptr_noiseEstQuantile = NULL; | 62 int16_t* ptr_noiseEstQuantile = NULL; |
63 int16x4_t kExp2Const16x4 = vdup_n_s16(kExp2Const); | 63 int16x4_t kExp2Const16x4 = vdup_n_s16(kExp2Const); |
64 int32x4_t twentyOne32x4 = vdupq_n_s32(21); | 64 int32x4_t twentyOne32x4 = vdupq_n_s32(21); |
65 int32x4_t constA32x4 = vdupq_n_s32(0x1fffff); | 65 int32x4_t constA32x4 = vdupq_n_s32(0x1fffff); |
66 int32x4_t constB32x4 = vdupq_n_s32(0x200000); | 66 int32x4_t constB32x4 = vdupq_n_s32(0x200000); |
67 | 67 |
68 int16_t tmp16 = WebRtcSpl_MaxValueW16(inst->noiseEstLogQuantile + offset, | 68 int16_t tmp16 = WebRtcSpl_MaxValueW16(inst->noiseEstLogQuantile + offset, |
69 inst->magnLen); | 69 inst->magnLen); |
70 | 70 |
71 // Guarantee a Q-domain as high as possible and still fit in int16 | 71 // Guarantee a Q-domain as high as possible and still fit in int16_t |
72 inst->qNoise = 14 - (int) WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(kExp2Const, | 72 inst->qNoise = 14 - (int) WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(kExp2Const, |
73 tmp16, | 73 tmp16, |
74 21); | 74 21); |
75 | 75 |
76 int32x4_t qNoise32x4 = vdupq_n_s32(inst->qNoise); | 76 int32x4_t qNoise32x4 = vdupq_n_s32(inst->qNoise); |
77 | 77 |
78 for (ptr_noiseEstLogQuantile = &inst->noiseEstLogQuantile[offset], | 78 for (ptr_noiseEstLogQuantile = &inst->noiseEstLogQuantile[offset], |
79 ptr_noiseEstQuantile = &inst->noiseEstQuantile[0]; | 79 ptr_noiseEstQuantile = &inst->noiseEstQuantile[0]; |
80 ptr_noiseEstQuantile < &inst->noiseEstQuantile[inst->magnLen - 3]; | 80 ptr_noiseEstQuantile < &inst->noiseEstQuantile[inst->magnLen - 3]; |
81 ptr_noiseEstQuantile += 4, ptr_noiseEstLogQuantile += 4) { | 81 ptr_noiseEstQuantile += 4, ptr_noiseEstLogQuantile += 4) { |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 | 589 |
590 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); | 590 int16x4_t result_low = vrshrn_n_s32(tmp32_low, 14); |
591 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); | 591 int16x4_t result_high = vrshrn_n_s32(tmp32_high, 14); |
592 vst1q_s16(p_start_out, vcombine_s16(result_low, result_high)); | 592 vst1q_s16(p_start_out, vcombine_s16(result_low, result_high)); |
593 | 593 |
594 p_start_buffer += 8; | 594 p_start_buffer += 8; |
595 p_start_window += 8; | 595 p_start_window += 8; |
596 p_start_out += 8; | 596 p_start_out += 8; |
597 } | 597 } |
598 } | 598 } |
OLD | NEW |