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 <stddef.h> | 11 #include <stddef.h> |
12 | 12 |
13 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" | 13 #include "webrtc/modules/audio_coding/codecs/isac/fix/source/settings.h" |
14 #include "webrtc/typedefs.h" | 14 #include "webrtc/typedefs.h" |
15 | 15 |
16 // Filter ar_g_Q0[] and ar_f_Q0[] through an AR filter with coefficients | 16 // Filter ar_g_Q0[] and ar_f_Q0[] through an AR filter with coefficients |
17 // cth_Q15[] and sth_Q15[]. | 17 // cth_Q15[] and sth_Q15[]. |
18 void WebRtcIsacfix_FilterArLoop(int16_t* ar_g_Q0, // Input samples | 18 void WebRtcIsacfix_FilterArLoop(int16_t* ar_g_Q0, // Input samples |
19 int16_t* ar_f_Q0, // Input samples | 19 int16_t* ar_f_Q0, // Input samples |
20 int16_t* cth_Q15, // Filter coefficients | 20 int16_t* cth_Q15, // Filter coefficients |
21 int16_t* sth_Q15, // Filter coefficients | 21 int16_t* sth_Q15, // Filter coefficients |
22 size_t order_coef) { // order of the filter | 22 int16_t order_coef) { // order of the filter |
23 int n = 0; | 23 int n = 0; |
24 | 24 |
25 for (n = 0; n < HALF_SUBFRAMELEN - 1; n++) { | 25 for (n = 0; n < HALF_SUBFRAMELEN - 1; n++) { |
26 int count = (int)(order_coef - 1); | 26 int count = order_coef - 1; |
27 int offset; | 27 int offset; |
28 #if !defined(MIPS_DSP_R1_LE) | 28 #if !defined(MIPS_DSP_R1_LE) |
29 int16_t* tmp_cth; | 29 int16_t* tmp_cth; |
30 int16_t* tmp_sth; | 30 int16_t* tmp_sth; |
31 int16_t* tmp_arg; | 31 int16_t* tmp_arg; |
32 int32_t max_q16 = 0x7fff; | 32 int32_t max_q16 = 0x7fff; |
33 int32_t min_q16 = 0xffff8000; | 33 int32_t min_q16 = 0xffff8000; |
34 #endif | 34 #endif |
35 // Declare variables used as temporary registers. | 35 // Declare variables used as temporary registers. |
36 int32_t r0, r1, r2, t0, t1, t2, t_ar; | 36 int32_t r0, r1, r2, t0, t1, t2, t_ar; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 : [t16a] "=&r" (t16a), [t16b] "=&r" (t16b), [r0] "=&r" (r0), | 320 : [t16a] "=&r" (t16a), [t16b] "=&r" (t16b), [r0] "=&r" (r0), |
321 [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3), | 321 [r1] "=&r" (r1), [r2] "=&r" (r2), [r3] "=&r" (r3), |
322 [r4] "=&r" (r4), [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), | 322 [r4] "=&r" (r4), [ptr0] "+r" (ptr0), [ptr1] "+r" (ptr1), |
323 [ptr2] "+r" (ptr2), [n] "+r" (n) | 323 [ptr2] "+r" (ptr2), [n] "+r" (n) |
324 : [input0] "r" (input0), [input1] "r" (input1), | 324 : [input0] "r" (input0), [input1] "r" (input1), |
325 [input2] "r" (input2) | 325 [input2] "r" (input2) |
326 : "hi", "lo", "memory" | 326 : "hi", "lo", "memory" |
327 ); | 327 ); |
328 #endif | 328 #endif |
329 } | 329 } |
OLD | NEW |