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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 END: | 149 END: |
150 pop {r4-r11} | 150 pop {r4-r11} |
151 bx lr | 151 bx lr |
152 | 152 |
153 @Reference C code: | 153 @Reference C code: |
154 @ | 154 @ |
155 @void WebRtcSpl_FilterARFastQ12(int16_t* data_in, | 155 @void WebRtcSpl_FilterARFastQ12(int16_t* data_in, |
156 @ int16_t* data_out, | 156 @ int16_t* data_out, |
157 @ int16_t* __restrict coefficients, | 157 @ int16_t* __restrict coefficients, |
158 @ int coefficients_length, | 158 @ size_t coefficients_length, |
159 @ int data_length) { | 159 @ size_t data_length) { |
160 @ int i = 0; | 160 @ size_t i = 0; |
161 @ int j = 0; | 161 @ size_t j = 0; |
162 @ | 162 @ |
163 @ assert(data_length > 0); | 163 @ assert(data_length > 0); |
164 @ assert(coefficients_length > 1); | 164 @ assert(coefficients_length > 1); |
165 @ | 165 @ |
166 @ for (i = 0; i < data_length - 1; i += 2) { | 166 @ for (i = 0; i < data_length - 1; i += 2) { |
167 @ int32_t output1 = 0; | 167 @ int32_t output1 = 0; |
168 @ int32_t sum1 = 0; | 168 @ int32_t sum1 = 0; |
169 @ int32_t output2 = 0; | 169 @ int32_t output2 = 0; |
170 @ int32_t sum2 = 0; | 170 @ int32_t sum2 = 0; |
171 @ | 171 @ |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 @ sum1 += coefficients[1] * data_out[i - 1]; | 209 @ sum1 += coefficients[1] * data_out[i - 1]; |
210 @ } | 210 @ } |
211 @ | 211 @ |
212 @ output1 = coefficients[0] * data_in[i]; | 212 @ output1 = coefficients[0] * data_in[i]; |
213 @ output1 -= sum1; | 213 @ output1 -= sum1; |
214 @ // Saturate and store the output. | 214 @ // Saturate and store the output. |
215 @ output1 = WEBRTC_SPL_SAT(134215679, output1, -134217728); | 215 @ output1 = WEBRTC_SPL_SAT(134215679, output1, -134217728); |
216 @ data_out[i] = (int16_t)((output1 + 2048) >> 12); | 216 @ data_out[i] = (int16_t)((output1 + 2048) >> 12); |
217 @ } | 217 @ } |
218 @} | 218 @} |
OLD | NEW |