| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 /* | 11 /* |
| 12 * lattice.c | 12 * lattice.c |
| 13 * | 13 * |
| 14 * Contains the normalized lattice filter routines (MA and AR) for iSAC codec | 14 * Contains the normalized lattice filter routines (MA and AR) for iSAC codec |
| 15 * | 15 * |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 #include "codec.h" | 18 #include "codec.h" |
| 19 #include "settings.h" | 19 #include "settings.h" |
| 20 #include "webrtc/base/sanitizer.h" | 20 #include "webrtc/rtc_base/sanitizer.h" |
| 21 | 21 |
| 22 #define LATTICE_MUL_32_32_RSFT16(a32a, a32b, b32) \ | 22 #define LATTICE_MUL_32_32_RSFT16(a32a, a32b, b32) \ |
| 23 ((int32_t)(WEBRTC_SPL_MUL(a32a, b32) + (WEBRTC_SPL_MUL_16_32_RSFT16(a32b, b32)
))) | 23 ((int32_t)(WEBRTC_SPL_MUL(a32a, b32) + (WEBRTC_SPL_MUL_16_32_RSFT16(a32b, b32)
))) |
| 24 /* This macro is FORBIDDEN to use elsewhere than in a function in this file and | 24 /* This macro is FORBIDDEN to use elsewhere than in a function in this file and |
| 25 its corresponding neon version. It might give unpredictable results, since a | 25 its corresponding neon version. It might give unpredictable results, since a |
| 26 general int32_t*int32_t multiplication results in a 64 bit value. | 26 general int32_t*int32_t multiplication results in a 64 bit value. |
| 27 The result is then shifted just 16 steps to the right, giving need for 48 | 27 The result is then shifted just 16 steps to the right, giving need for 48 |
| 28 bits, i.e. in the generel case, it will NOT fit in a int32_t. In the | 28 bits, i.e. in the generel case, it will NOT fit in a int32_t. In the |
| 29 cases used in here, the int32_t will be enough, since (for a good | 29 cases used in here, the int32_t will be enough, since (for a good |
| 30 reason) the involved multiplicands aren't big enough to overflow a | 30 reason) the involved multiplicands aren't big enough to overflow a |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 /* cannot use memcpy in the following */ | 313 /* cannot use memcpy in the following */ |
| 314 | 314 |
| 315 for (i=0;i<ord_1;i++) | 315 for (i=0;i<ord_1;i++) |
| 316 { | 316 { |
| 317 stateGQ0[i] = ARgQ0vec[i]; | 317 stateGQ0[i] = ARgQ0vec[i]; |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| 321 return; | 321 return; |
| 322 } | 322 } |
| OLD | NEW |