| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 + ((WEBRTC_SPL_MUL_16_16(a, (b & 0xffff) >> 1) + 0x4000) >> 15)) | 56 + ((WEBRTC_SPL_MUL_16_16(a, (b & 0xffff) >> 1) + 0x4000) >> 15)) |
| 57 #endif | 57 #endif |
| 58 #endif | 58 #endif |
| 59 | 59 |
| 60 #define WEBRTC_SPL_MUL_16_32_RSFT11(a, b) \ | 60 #define WEBRTC_SPL_MUL_16_32_RSFT11(a, b) \ |
| 61 (WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 5) + \ | 61 (WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 5) + \ |
| 62 (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x0200) >> 10)) | 62 (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x0200) >> 10)) |
| 63 #define WEBRTC_SPL_MUL_16_32_RSFT14(a, b) \ | 63 #define WEBRTC_SPL_MUL_16_32_RSFT14(a, b) \ |
| 64 (WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 2) + \ | 64 (WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 2) + \ |
| 65 (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x1000) >> 13)) | 65 (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x1000) >> 13)) |
| 66 #define WEBRTC_SPL_MUL_16_32_RSFT15(a, b) \ | 66 #define WEBRTC_SPL_MUL_16_32_RSFT15(a, b) \ |
| 67 ((WEBRTC_SPL_MUL_16_16(a, (b) >> 16) << 1) \ | 67 ((WEBRTC_SPL_MUL_16_16(a, (b) >> 16) * (1 << 1)) + \ |
| 68 + (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x2000) >> 14)) | 68 (((WEBRTC_SPL_MUL_16_U16(a, (uint16_t)(b)) >> 1) + 0x2000) >> 14)) |
| 69 | 69 |
| 70 #define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \ | 70 #define WEBRTC_SPL_MUL_16_16_RSFT(a, b, c) \ |
| 71 (WEBRTC_SPL_MUL_16_16(a, b) >> (c)) | 71 (WEBRTC_SPL_MUL_16_16(a, b) >> (c)) |
| 72 | 72 |
| 73 #define WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, c) \ | 73 #define WEBRTC_SPL_MUL_16_16_RSFT_WITH_ROUND(a, b, c) \ |
| 74 ((WEBRTC_SPL_MUL_16_16(a, b) + ((int32_t) \ | 74 ((WEBRTC_SPL_MUL_16_16(a, b) + ((int32_t) \ |
| 75 (((int32_t)1) << ((c) - 1)))) >> (c)) | 75 (((int32_t)1) << ((c) - 1)))) >> (c)) |
| 76 | 76 |
| 77 // C + the 32 most significant bits of A * B | 77 // C + the 32 most significant bits of A * B |
| 78 #define WEBRTC_SPL_SCALEDIFF32(A, B, C) \ | 78 #define WEBRTC_SPL_SCALEDIFF32(A, B, C) \ |
| (...skipping 1554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1633 // This function multiply a 16-bit word by a 16-bit word, and accumulate this | 1633 // This function multiply a 16-bit word by a 16-bit word, and accumulate this |
| 1634 // value to a 32-bit integer. | 1634 // value to a 32-bit integer. |
| 1635 // | 1635 // |
| 1636 // Input: | 1636 // Input: |
| 1637 // - a : The value of the first 16-bit word. | 1637 // - a : The value of the first 16-bit word. |
| 1638 // - b : The value of the second 16-bit word. | 1638 // - b : The value of the second 16-bit word. |
| 1639 // - c : The value of an 32-bit integer. | 1639 // - c : The value of an 32-bit integer. |
| 1640 // | 1640 // |
| 1641 // Return Value: The value of a * b + c. | 1641 // Return Value: The value of a * b + c. |
| 1642 // | 1642 // |
| OLD | NEW |