/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/audio_processing/ns/noise_suppression_x.h"
#include <assert.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include "webrtc/common_audio/signal_processing/include/real_fft.h"
#include "webrtc/modules/audio_processing/ns/nsx_core.h"
#include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
#if defined(WEBRTC_HAS_NEON)
/* Tables are defined in ARM assembly files. */
extern const int16_t WebRtcNsx_kLogTable[9];
extern const int16_t WebRtcNsx_kCounterDiv[201];
extern const int16_t WebRtcNsx_kLogTableFrac[256];
#else
static const int16_t WebRtcNsx_kLogTable[9] = {
0, 177, 355, 532, 710, 887, 1065, 1242, 1420
};
static const int16_t WebRtcNsx_kCounterDiv[201] = {
32767, 16384, 10923, 8192, 6554, 5461, 4681, 4096, 3641, 3277, 2979, 2731,
2521, 2341, 2185, 2048, 1928, 1820, 1725, 1638, 1560, 1489, 1425, 1365, 1311,
1260, 1214, 1170, 1130, 1092, 1057, 1024, 993, 964, 936, 910, 886, 862, 840,
819, 799, 780, 762, 745, 728, 712, 697, 683, 669, 655, 643, 630, 618, 607,
596, 585, 575, 565, 555, 546, 537, 529, 520, 512, 504, 496, 489, 482, 475,
468, 462, 455, 449, 443, 437, 431, 426, 420, 415, 410, 405, 400, 395, 390,
386, 381, 377, 372, 368, 364, 360, 356, 352, 349, 345, 341, 338, 334, 331,
328, 324, 321, 318, 315, 312, 309, 306, 303, 301, 298, 295, 293, 290, 287,
285, 282, 280, 278, 275, 273, 271, 269, 266, 264, 262, 260, 258, 256, 254,
252, 250, 248, 246, 245, 243, 241, 239, 237, 236, 234, 232, 231, 229, 228,
226, 224, 223, 221, 220, 218, 217, 216, 214, 213, 211, 210, 209, 207, 206,
205, 204, 202, 201, 200, 199, 197, 196, 195, 194, 193, 192, 191, 189, 188,
187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,
172, 172, 171, 170, 169, 168, 167, 166, 165, 165, 164, 163
};
static const int16_t WebRtcNsx_kLogTableFrac[256] = {
0, 1, 3, 4, 6, 7, 9, 10, 11, 13, 14, 16, 17, 18, 20, 21,
22, 24, 25, 26, 28, 29, 30, 32, 33, 34, 36, 37, 38, 40, 41, 42,
44, 45, 46, 47, 49, 50, 51, 52, 54, 55, 56, 57, 59, 60, 61, 62,
63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81,
82, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 97, 98, 99,
100, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146,
147, 148, 149, 150, 151, 152, 153, 154, 155, 155, 156, 157, 158, 159, 160,
161, 162, 163, 164, 165, 166, 167, 168, 169, 169, 170, 171, 172, 173, 174,
175, 176, 177, 178, 178, 179, 180, 181, 182, 183, 184, 185, 185, 186, 187,
188, 189, 190, 191, 192, 192, 193, 194, 195, 196, 197, 198, 198, 199, 200,
201, 202, 203, 203, 204, 205, 206, 207, 208, 208, 209, 210, 211, 212, 212,
213, 214, 215, 216, 216, 217, 218, 219, 220, 220, 221, 222, 223, 224, 224,
225, 226, 227, 228, 228, 229, 230, 231, 231, 232, 233, 234, 234, 235, 236,
237, 238, 238, 239, 240, 241, 241, 242, 243, 244, 244, 245, 246, 247, 247,
248, 249, 249, 250, 251, 252, 252, 253, 254, 255, 255
};
#endif // WEBRTC_HAS_NEON
// Skip first frequency bins during estimation. (0 <= value < 64)
static const size_t kStartBand = 5;
// hybrib Hanning & flat window
static const int16_t kBlocks80w128x[128] = {
0, 536, 1072, 1606, 2139, 2669, 3196, 3720, 4240, 4756, 5266,
5771, 6270, 6762, 7246, 7723, 8192, 8652, 9102, 9543, 9974, 10394,
10803, 11200, 11585, 11958, 12318, 12665, 12998, 13318, 13623, 13913, 14189,
14449, 14694, 14924, 15137, 15334, 15515, 15679, 15826, 15956, 16069, 16165,
16244, 16305, 16349, 16375, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16375, 16349, 16305, 16244, 16165, 16069, 15956,
15826, 15679, 15515, 15334, 15137, 14924, 14694, 14449, 14189, 13913, 13623,
13318, 12998, 12665, 12318, 11958, 11585, 11200, 10803, 10394, 9974, 9543,
9102, 8652, 8192, 7723, 7246, 6762, 6270, 5771, 5266, 4756, 4240,
3720, 3196, 2669, 2139, 1606, 1072, 536
};
// hybrib Hanning & flat window
static const int16_t kBlocks160w256x[256] = {
0, 268, 536, 804, 1072, 1339, 1606, 1872,
2139, 2404, 2669, 2933, 3196, 3459, 3720, 3981,
4240, 4499, 4756, 5012, 5266, 5520, 5771, 6021,
6270, 6517, 6762, 7005, 7246, 7486, 7723, 7959,
8192, 8423, 8652, 8878, 9102, 9324, 9543, 9760,
9974, 10185, 10394, 10600, 10803, 11003, 11200, 11394,
11585, 11773, 11958, 12140, 12318, 12493, 12665, 12833,
12998, 13160, 13318, 13472, 13623, 13770, 13913, 14053,
14189, 14321, 14449, 14574, 14694, 14811, 14924, 15032,
15137, 15237, 15334, 15426, 15515, 15599, 15679, 15754,
15826, 15893, 15956, 16015, 16069, 16119, 16165, 16207,
16244, 16277, 16305, 16329, 16349, 16364, 16375, 16382,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384,
16384, 16382, 16375, 16364, 16349, 16329, 16305, 16277,
16244, 16207, 16165, 16119, 16069, 16015, 15956, 15893,
15826, 15754, 15679, 15599, 15515, 15426, 15334, 15237,
15137, 15032, 14924, 14811, 14694, 14574, 14449, 14321,
14189, 14053, 13913, 13770, 13623, 13472, 13318, 13160,
12998, 12833, 12665, 12493, 12318, 12140, 11958, 11773,
11585, 11394, 11200, 11003, 10803, 10600, 10394, 10185,
9974, 9760, 9543, 9324, 9102, 8878, 8652, 8423,
8192, 7959, 7723, 7486, 7246, 7005, 6762, 6517,
6270, 6021, 5771, 5520, 5266, 5012, 4756, 4499,
4240, 3981, 3720, 3459, 3196, 2933, 2669, 2404,
2139, 1872, 1606, 1339, 1072, 804, 536, 268
};
// Gain factor1 table: Input value in Q8 and output value in Q13
// original floating point code
// if (gain > blim) {
// factor1 = 1.0 + 1.3 * (gain - blim);
// if (gain * factor1 > 1.0) {
// factor1 = 1.0 / gain;
// }
// } else {
// factor1 = 1.0;
// }
static const int16_t kFactor1Table[257] = {
8192, 8192, 8192, 8192, 8192, 8192, 8192,
8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,
8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,
8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,
8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,
8192, 8192, 8233, 8274, 8315, 8355, 8396, 8436, 8475, 8515, 8554, 8592, 8631, 8669,
8707, 8745, 8783, 8820, 8857, 8894, 8931, 8967, 9003, 9039, 9075, 9111, 9146, 9181,
9216, 9251, 9286, 9320, 9354, 9388, 9422, 9456, 9489, 9523, 9556, 9589, 9622, 9655,
9687, 9719, 9752, 9784, 9816, 9848, 9879, 9911, 9942, 9973, 10004, 10035, 10066,
10097, 10128, 10158, 10188, 10218, 10249, 10279, 10308, 10338, 10368, 10397, 10426,
10456, 10485, 10514, 10543, 10572, 10600, 10629, 10657, 10686, 10714, 10742, 10770,
10798, 10826, 10854, 10882, 10847, 10810, 10774,
没有合适的资源?快使用搜索试试~ 我知道了~
webrtc APM模块
共1123个文件
h:385个
plo:228个
cc:202个
2星 需积分: 38 22 下载量 93 浏览量
2018-06-19
15:37:37
上传
评论 1
收藏 3.16MB ZIP 举报
温馨提示
用makefile编译生成的webrtc APM模块(AEC AGC NS NETEQ)
资源推荐
资源详情
资源评论
收起资源包目录
webrtc APM模块 (1123个子文件)
configure.ac 3KB
Makefile.am 6KB
Makefile.am 5KB
Makefile.am 4KB
Makefile.am 2KB
Makefile.am 761B
Makefile.am 722B
Makefile.am 301B
Makefile.am 137B
AUTHORS 181B
nsx_core.c 85KB
entropy_coding.c 61KB
ns_core.c 57KB
nsx_core_mips.c 54KB
analog_agc.c 48KB
lpc_tables.c 36KB
fft4g.c 36KB
constants.c 25KB
vad_core.c 25KB
digital_agc.c 25KB
nsx_core_neon.c 23KB
pitch_estimator.c 22KB
resample_by_2_internal.c 20KB
complex_fft_mips.c 19KB
lpc_analysis.c 18KB
encode_lpc_swb.c 17KB
encode.c 17KB
resample.c 16KB
min_max_operations_mips.c 16KB
pitch_filter.c 15KB
filterbanks.c 15KB
pitch_lag_tables.c 15KB
vad_filterbank.c 14KB
cb_search.c 14KB
opus_interface.c 13KB
g722_encode.c 12KB
enhancer_interface.c 12KB
unpack_bits.c 12KB
g722_decode.c 12KB
pack_bits.c 11KB
do_plc.c 11KB
resample_by_2_mips.c 10KB
iLBC_testprogram.c 10KB
downsample_fast_mips.c 10KB
nsx_core_c.c 10KB
complex_fft.c 10KB
spl_sqrt_floor_mips.c 9KB
complex_bit_reverse_mips.c 9KB
downsample_fast_neon.c 9KB
arith_routines_logist.c 9KB
arith_routines_hist.c 8KB
ilbc.c 8KB
splitting_filter.c 8KB
lpc_shape_swb16_tables.c 8KB
pitch_gain_tables.c 8KB
decode.c 8KB
min_max_operations_neon.c 8KB
levinson_durbin.c 8KB
filter_ar_fast_q12_mips.c 8KB
resample_fractional.c 8KB
filter_functions.c 7KB
spectrum_ar_model_tables.c 7KB
iLBC_test.c 7KB
ring_buffer.c 7KB
randomization_functions.c 6KB
smooth.c 6KB
cross_correlation_mips.c 6KB
decode_residual.c 6KB
iLBC_testLib.c 6KB
resample_by_2.c 6KB
vad_sp.c 6KB
resample_48khz.c 6KB
min_max_operations.c 5KB
lpc_shape_swb12_tables.c 5KB
lpc_gain_swb_tables.c 5KB
simple_interpolate_lsf.c 5KB
spl_sqrt.c 5KB
vector_scaling_operations.c 5KB
refiner.c 5KB
spl_init.c 4KB
xcorr_coef.c 4KB
poly_to_lsp.c 4KB
complex_bit_reverse.c 4KB
intialize.c 4KB
state_search.c 4KB
get_sync_seq.c 4KB
g711.c 4KB
state_construct.c 4KB
cb_search_core.c 4KB
init_decode.c 3KB
division_operations.c 3KB
simple_lpc_analysis.c 3KB
decoder_interpolate_lsf.c 3KB
get_hanning_window.c 3KB
real_fft.c 3KB
cross_correlation_neon.c 3KB
webrtc_vad.c 3KB
gain_quant.c 3KB
vad_gmm.c 3KB
cb_mem_energy.c 3KB
共 1123 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
- lq8001072019-12-15不能編譯,makefile裏面有很多原作者電腦的目錄呼拉z2019-12-17那可以把目录修改成自己的啊
呼拉z
- 粉丝: 5
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功