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 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 0.00910872, 0.00903832, 0.00896134, 0.00887763, 0.00878706, | 68 0.00910872, 0.00903832, 0.00896134, 0.00887763, 0.00878706, |
69 0.00868949, 0.00858478, 0.00847280, 0.00835343, 0.00822653, 0.00809199, | 69 0.00868949, 0.00858478, 0.00847280, 0.00835343, 0.00822653, 0.00809199, |
70 0.00794970, 0.00779956, 0.00764145, 0.00747530, 0.00730103, | 70 0.00794970, 0.00779956, 0.00764145, 0.00747530, 0.00730103, |
71 0.00711857, 0.00692787, 0.00672888, 0.00652158, 0.00630597, | 71 0.00711857, 0.00692787, 0.00672888, 0.00652158, 0.00630597, |
72 0.00608208, 0.00584994, 0.00560962, 0.00536124, 0.00510493, 0.00484089, | 72 0.00608208, 0.00584994, 0.00560962, 0.00536124, 0.00510493, 0.00484089, |
73 0.00456935, 0.00429062, 0.00400505, 0.00371310, 0.00341532, | 73 0.00456935, 0.00429062, 0.00400505, 0.00371310, 0.00341532, |
74 0.00311238, 0.00280511, 0.00249452, 0.00218184, 0.00186864, | 74 0.00311238, 0.00280511, 0.00249452, 0.00218184, 0.00186864, |
75 0.00155690, 0.00124918, 0.00094895, 0.00066112, 0.00039320, 0.00015881 | 75 0.00155690, 0.00124918, 0.00094895, 0.00066112, 0.00039320, 0.00015881 |
76 }; | 76 }; |
77 | 77 |
78 double WebRtcIsac_LevDurb(double *a, double *k, double *r, int order) | 78 double WebRtcIsac_LevDurb(double *a, double *k, double *r, size_t order) |
79 { | 79 { |
80 | 80 |
81 double sum, alpha; | 81 double sum, alpha; |
82 int m, m_h, i; | 82 size_t m, m_h, i; |
83 alpha = 0; //warning -DH | 83 alpha = 0; //warning -DH |
84 a[0] = 1.0; | 84 a[0] = 1.0; |
85 if (r[0] < LEVINSON_EPS) { /* if r[0] <= 0, set LPC coeff. to zero */ | 85 if (r[0] < LEVINSON_EPS) { /* if r[0] <= 0, set LPC coeff. to zero */ |
86 for (i = 0; i < order; i++) { | 86 for (i = 0; i < order; i++) { |
87 k[i] = 0; | 87 k[i] = 0; |
88 a[i+1] = 0; | 88 a[i+1] = 0; |
89 } | 89 } |
90 } else { | 90 } else { |
91 a[1] = k[0] = -r[1]/r[0]; | 91 a[1] = k[0] = -r[1]/r[0]; |
92 alpha = r[0] + r[1] * k[0]; | 92 alpha = r[0] + r[1] * k[0]; |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 { | 526 { |
527 res_nrg += aPolynom[j] * corrMat[subFrameCntr][n-j] * | 527 res_nrg += aPolynom[j] * corrMat[subFrameCntr][n-j] * |
528 aPolynom[n]; | 528 aPolynom[n]; |
529 } | 529 } |
530 } | 530 } |
531 | 531 |
532 /* add hearing threshold and compute the gain */ | 532 /* add hearing threshold and compute the gain */ |
533 gain[subFrameCntr] = S_N_R / (sqrt(res_nrg) / *varscale + H_T_H); | 533 gain[subFrameCntr] = S_N_R / (sqrt(res_nrg) / *varscale + H_T_H); |
534 } | 534 } |
535 } | 535 } |
OLD | NEW |