| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 int16x4_t countDiv_16x4 = vdup_n_s16(countDiv); | 201 int16x4_t countDiv_16x4 = vdup_n_s16(countDiv); |
| 202 int16x8_t countProd_16x8 = vdupq_n_s16(countProd); | 202 int16x8_t countProd_16x8 = vdupq_n_s16(countProd); |
| 203 int16x8_t tmp16x8_0 = vdupq_n_s16(countDiv); | 203 int16x8_t tmp16x8_0 = vdupq_n_s16(countDiv); |
| 204 int16x8_t prod16x8 = vqrdmulhq_s16(WIDTHFACTOR_16x8, tmp16x8_0); | 204 int16x8_t prod16x8 = vqrdmulhq_s16(WIDTHFACTOR_16x8, tmp16x8_0); |
| 205 int16x8_t tmp16x8_1; | 205 int16x8_t tmp16x8_1; |
| 206 int16x8_t tmp16x8_2; | 206 int16x8_t tmp16x8_2; |
| 207 int16x8_t tmp16x8_3; | 207 int16x8_t tmp16x8_3; |
| 208 uint16x8_t tmp16x8_4; | 208 uint16x8_t tmp16x8_4; |
| 209 int32x4_t tmp32x4; | 209 int32x4_t tmp32x4; |
| 210 | 210 |
| 211 for (i = 0; i < inst->magnLen - 7; i += 8) { | 211 for (i = 0; i + 7 < inst->magnLen; i += 8) { |
| 212 // Compute delta. | 212 // Compute delta. |
| 213 // Smaller step size during startup. This prevents from using | 213 // Smaller step size during startup. This prevents from using |
| 214 // unrealistic values causing overflow. | 214 // unrealistic values causing overflow. |
| 215 tmp16x8_0 = vdupq_n_s16(factor); | 215 tmp16x8_0 = vdupq_n_s16(factor); |
| 216 vst1q_s16(deltaBuff, tmp16x8_0); | 216 vst1q_s16(deltaBuff, tmp16x8_0); |
| 217 | 217 |
| 218 int j; | 218 int j; |
| 219 for (j = 0; j < 8; j++) { | 219 for (j = 0; j < 8; j++) { |
| 220 if (inst->noiseEstDensity[offset + i + j] > 512) { | 220 if (inst->noiseEstDensity[offset + i + j] > 512) { |
| 221 // Get values for deltaBuff by shifting intead of dividing. | 221 // Get values for deltaBuff by shifting intead of dividing. |
| (...skipping 367 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 |