资源简介
从webrtc抠出来的代码实现无需噪音样本的降噪.具体使用请查看我的博客
代码片段和文件信息
/*
* 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.
*/
/* analog_agc.c
*
* Using a feedback system determines an appropriate analog volume level
* given an input signal and current volume level. Targets a conservative
* signal level and is intended for use with a digital AGC to apply
* additional gain.
*
*/
#include
#include
#ifdef AGC_DEBUG //test log
#include
#endif
#include “analog_agc.h“
/* The slope of in Q13*/
static const int16_t kSlope1[8] = {21793 12517 7189 4129 2372 1362 472 78};
/* The offset in Q14 */
static const int16_t kOffset1[8] = {25395 23911 22206 20737 19612 18805 17951
17367};
/* The slope of in Q13*/
static const int16_t kSlope2[8] = {2063 1731 1452 1218 1021 857 597 337};
/* The offset in Q14 */
static const int16_t kOffset2[8] = {18432 18379 18290 18177 18052 17920 17670
17286};
static const int16_t kMuteGuardTimeMs = 8000;
static const int16_t kInitCheck = 42;
/* Default settings if config is not used */
#define AGC_DEFAULT_TARGET_LEVEL 3
#define AGC_DEFAULT_COMP_GAIN 9
/* This is the target level for the analog part in ENV scale. To convert to RMS scale you
* have to add OFFSET_ENV_TO_RMS.
*/
#define ANALOG_TARGET_LEVEL 11
#define ANALOG_TARGET_LEVEL_2 5 // ANALOG_TARGET_LEVEL / 2
/* Offset between RMS scale (analog part) and ENV scale (digital part). This value actually
* varies with the FIXED_ANALOG_TARGET_LEVEL hence we should in the future replace it with
* a table.
*/
#define OFFSET_ENV_TO_RMS 9
/* The reference input level at which the digital part gives an output of targetLevelDbfs
* (desired level) if we have no compression gain. This level should be set high enough not
* to compress the peaks due to the dynamics.
*/
#define DIGITAL_REF_AT_0_COMP_GAIN 4
/* Speed of reference level decrease.
*/
#define DIFF_REF_TO_ANALOG 5
#ifdef MIC_LEVEL_FEEDBACK
#define NUM_BLOCKS_IN_SAT_BEFORE_CHANGE_TARGET 7
#endif
/* Size of analog gain table */
#define GAIN_TBL_LEN 32
/* Matlab code:
* fprintf(1 ‘\t%i %i %i %i\n‘ round(10.^(linspace(01032)/20) * 2^12));
*/
/* Q12 */
static const uint16_t kGainTableAnalog[GAIN_TBL_LEN] = {4096 4251 4412 4579 4752
4932 5118 5312 5513 5722 5938 6163 6396 6638 6889 7150 7420 7701 7992
8295 8609 8934 9273 9623 9987 10365 10758 11165 11587 12025 12480 12953};
/* Gain/Suppression tables for virtual Mic (in Q10) */
static const uint16_t kGainTableVirtualMic[128] = {1052 1081 1110 1141 1172 1204
1237 1271 1305 1341 1378 1416 1454 1494 1535 1577 1620 1664 1710 175
- 上一篇:白盒测试 实验报告
- 下一篇:片上网络NOC基本架构
相关资源
- PCA图像降噪最新算法-LPGPCA代码
- YMU831数字主动降噪 芯片 YAMAHA
- ajhifddimkapgcifgcodmmfdlknahffk_3_4.crx
- 基于DSP的智能降噪耳机技术.pdf
- sipjs+FreeSWITCH+webrtc电话呼入、呼出、转
- 支持webrtc的sip js demo
- webrtc中AEC代码解读.zip
- vue+node(socket.io)+webRTC一对一视频通
- WebRTC实时通信系列webrtc-web-master.zip
- webrtc回声消除原理及延时估算方法.
- webrtc aec3
- 一种基于单片机的可编程自动增益放
- VCA820可控增益放大器原理.wps
- 基于AD603程控增益大功率宽带直流放大
- webrtc新版语音流程图
- 基于tomcat7利用webrtc API实现一对一视频
- audio jungle水印 降噪移除专用SRM模型
- 音视频WebRTC实时互动直播技术实战视
- webrtc 视频数据流流程图
评论
共有 条评论