OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" | 11 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" |
12 #include "webrtc/typedefs.h" | 12 #include "webrtc/typedefs.h" |
13 | 13 |
14 // Filter ar_g_Q0[] and ar_f_Q0[] through an AR filter with coefficients | 14 // Filter ar_g_Q0[] and ar_f_Q0[] through an AR filter with coefficients |
15 // cth_Q15[] and sth_Q15[]. | 15 // cth_Q15[] and sth_Q15[]. |
16 void WebRtcIsacfix_FilterArLoop(int16_t* ar_g_Q0, // Input samples | 16 void WebRtcIsacfix_FilterArLoop(int16_t* ar_g_Q0, // Input samples |
17 int16_t* ar_f_Q0, // Input samples | 17 int16_t* ar_f_Q0, // Input samples |
18 int16_t* cth_Q15, // Filter coefficients | 18 int16_t* cth_Q15, // Filter coefficients |
19 int16_t* sth_Q15, // Filter coefficients | 19 int16_t* sth_Q15, // Filter coefficients |
20 int16_t order_coef) { // order of the filter | 20 size_t order_coef) { // order of the filter |
21 int n = 0; | 21 int n = 0; |
22 | 22 |
23 for (n = 0; n < HALF_SUBFRAMELEN - 1; n++) { | 23 for (n = 0; n < HALF_SUBFRAMELEN - 1; n++) { |
24 int count = order_coef - 1; | 24 int count = (int)(order_coef - 1); |
minyue-webrtc
2015/08/12 16:08:08
I do not know what if order_coef = 0 here (but tha
Peter Kasting
2015/08/14 22:32:26
In practice this never happens; we always pass in
| |
25 int offset; | 25 int offset; |
26 #if !defined(MIPS_DSP_R1_LE) | 26 #if !defined(MIPS_DSP_R1_LE) |
27 int16_t* tmp_cth; | 27 int16_t* tmp_cth; |
28 int16_t* tmp_sth; | 28 int16_t* tmp_sth; |
29 int16_t* tmp_arg; | 29 int16_t* tmp_arg; |
30 int32_t max_q16 = 0x7fff; | 30 int32_t max_q16 = 0x7fff; |
31 int32_t min_q16 = 0xffff8000; | 31 int32_t min_q16 = 0xffff8000; |
32 #endif | 32 #endif |
33 // Declare variables used as temporary registers. | 33 // Declare variables used as temporary registers. |
34 int32_t r0, r1, r2, t0, t1, t2, t_ar; | 34 int32_t r0, r1, r2, t0, t1, t2, t_ar; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
318 : [t16a] "=&r" (t16a), [t16b] "=&r" (t16b), [r0] "=&r" (r0), | 318 : [t16a] "=&r" (t16a), [t16b] "=&r" (t16b), [r0] "=&r" (r0), |
319 [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3), | 319 [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3), |
320 [r4] "=&r" (r4), [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), | 320 [r4] "=&r" (r4), [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), |
321 [ptr2] "+r" (ptr2), [n] "+r" (n) | 321 [ptr2] "+r" (ptr2), [n] "+r" (n) |
322 : [input0] "r" (input0), [input1] "r" (input1), | 322 : [input0] "r" (input0), [input1] "r" (input1), |
323 [input2] "r" (input2) | 323 [input2] "r" (input2) |
324 : "hi", "lo", "memory" | 324 : "hi", "lo", "memory" |
325 ); | 325 ); |
326 #endif | 326 #endif |
327 } | 327 } |
OLD | NEW |