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 | 12 |
13 iLBC Speech Coder ANSI-C Source Code | 13 iLBC Speech Coder ANSI-C Source Code |
14 | 14 |
15 WebRtcIlbcfix_CreateAugmentedVec.c | 15 WebRtcIlbcfix_CreateAugmentedVec.c |
16 | 16 |
17 ******************************************************************/ | 17 ******************************************************************/ |
18 | 18 |
19 #include "defines.h" | 19 #include "defines.h" |
20 #include "constants.h" | 20 #include "constants.h" |
21 #include "webrtc/base/sanitizer.h" | 21 #include "webrtc/rtc_base/sanitizer.h" |
22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" | 22 #include "webrtc/common_audio/signal_processing/include/signal_processing_librar
y.h" |
23 | 23 |
24 /*----------------------------------------------------------------* | 24 /*----------------------------------------------------------------* |
25 * Recreate a specific codebook vector from the augmented part. | 25 * Recreate a specific codebook vector from the augmented part. |
26 * | 26 * |
27 *----------------------------------------------------------------*/ | 27 *----------------------------------------------------------------*/ |
28 | 28 |
29 void WebRtcIlbcfix_CreateAugmentedVec( | 29 void WebRtcIlbcfix_CreateAugmentedVec( |
30 size_t index, /* (i) Index for the augmented vector to be | 30 size_t index, /* (i) Index for the augmented vector to be |
31 created */ | 31 created */ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 tempbuff2+SUBL+5. Since ppo=buffer-index, we cannot read any more than | 72 tempbuff2+SUBL+5. Since ppo=buffer-index, we cannot read any more than |
73 |index| elements from |ppo|. | 73 |index| elements from |ppo|. |
74 | 74 |
75 |cbVec| is declared to be SUBL elements long in WebRtcIlbcfix_CbConstruct. | 75 |cbVec| is declared to be SUBL elements long in WebRtcIlbcfix_CbConstruct. |
76 Therefore, we can only write SUBL-index elements to cbVec+index. | 76 Therefore, we can only write SUBL-index elements to cbVec+index. |
77 | 77 |
78 These two conditions limit the number of elements to copy. | 78 These two conditions limit the number of elements to copy. |
79 */ | 79 */ |
80 WEBRTC_SPL_MEMCPY_W16(cbVec+index, ppo, WEBRTC_SPL_MIN(SUBL-index, index)); | 80 WEBRTC_SPL_MEMCPY_W16(cbVec+index, ppo, WEBRTC_SPL_MIN(SUBL-index, index)); |
81 } | 81 } |
OLD | NEW |