| 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 |
| 11 /* | 11 /* |
| 12 * BwEstimator.c | 12 * BwEstimator.c |
| 13 * | 13 * |
| 14 * This file contains the code for the Bandwidth Estimator designed | 14 * This file contains the code for the Bandwidth Estimator designed |
| 15 * for iSAC. | 15 * for iSAC. |
| 16 * | 16 * |
| 17 */ | 17 */ |
| 18 | 18 |
| 19 #include "bandwidth_estimator.h" | 19 #include "bandwidth_estimator.h" |
| 20 #include "settings.h" | 20 #include "settings.h" |
| 21 #include "isac.h" | 21 #include "isac.h" |
| 22 #include "webrtc/base/checks.h" | 22 #include "webrtc/rtc_base/checks.h" |
| 23 | 23 |
| 24 #include <math.h> | 24 #include <math.h> |
| 25 #include <string.h> | 25 #include <string.h> |
| 26 | 26 |
| 27 /* array of quantization levels for bottle neck info; Matlab code: */ | 27 /* array of quantization levels for bottle neck info; Matlab code: */ |
| 28 /* sprintf('%4.1ff, ', logspace(log10(5000), log10(40000), 12)) */ | 28 /* sprintf('%4.1ff, ', logspace(log10(5000), log10(40000), 12)) */ |
| 29 static const float kQRateTableWb[12] = | 29 static const float kQRateTableWb[12] = |
| 30 { | 30 { |
| 31 10000.0f, 11115.3f, 12355.1f, 13733.1f, 15264.8f, 16967.3f, | 31 10000.0f, 11115.3f, 12355.1f, 13733.1f, 15264.8f, 16967.3f, |
| 32 18859.8f, 20963.3f, 23301.4f, 25900.3f, 28789.0f, 32000.0f}; | 32 18859.8f, 20963.3f, 23301.4f, 25900.3f, 28789.0f, 32000.0f}; |
| (...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 s2nr = a_60 + b_60 * bottle_neck * 0.001 + c_60 * bottle_neck * | 1022 s2nr = a_60 + b_60 * bottle_neck * 0.001 + c_60 * bottle_neck * |
| 1023 bottle_neck * 0.000001; | 1023 bottle_neck * 0.000001; |
| 1024 break; | 1024 break; |
| 1025 default: | 1025 default: |
| 1026 s2nr = 0; | 1026 s2nr = 0; |
| 1027 } | 1027 } |
| 1028 | 1028 |
| 1029 return s2nr; | 1029 return s2nr; |
| 1030 | 1030 |
| 1031 } | 1031 } |
| OLD | NEW |