Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: webrtc/common_audio/signal_processing/filter_ar_fast_q12_armv7.S

Issue 1230503003: Update a ton of audio code to use size_t more correctly and in general reduce (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Resync Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 @}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698