Remove unneeded G167 define from AEC.

Review URL: http://webrtc-codereview.appspot.com/114001

git-svn-id: http://webrtc.googlecode.com/svn/trunk@369 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2011-08-15 21:40:38 +00:00
parent 241c4d0e8d
commit 3296d76c50
2 changed files with 3 additions and 35 deletions

View File

@ -451,13 +451,6 @@ int WebRtcAec_InitAec(aec_t *aec, int sampFreq)
aec->seed = 777; aec->seed = 777;
aec->delayEstCtr = 0; aec->delayEstCtr = 0;
// Features on by default (G.167)
#ifdef G167
aec->adaptToggle = 1;
aec->nlpToggle = 1;
aec->cnToggle = 1;
#endif
// Metrics disabled by default // Metrics disabled by default
aec->metricsMode = 0; aec->metricsMode = 0;
WebRtcAec_InitMetrics(aec); WebRtcAec_InitMetrics(aec);
@ -727,28 +720,17 @@ static void ProcessBlock(aec_t *aec, const short *farend,
// Scale error signal inversely with far power. // Scale error signal inversely with far power.
WebRtcAec_ScaleErrorSignal(aec, ef); WebRtcAec_ScaleErrorSignal(aec, ef);
#ifdef G167 // Filter adaptation
if (aec->adaptToggle) { WebRtcAec_FilterAdaptation(aec, fft, ef);
#endif
// Filter adaptation
WebRtcAec_FilterAdaptation(aec, fft, ef);
#ifdef G167
}
#endif
NonLinearProcessing(aec, output, outputH); NonLinearProcessing(aec, output, outputH);
#if defined(AEC_DEBUG) || defined(G167) #ifdef AEC_DEBUG
for (i = 0; i < PART_LEN; i++) { for (i = 0; i < PART_LEN; i++) {
eInt16[i] = (short)WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, e[i], eInt16[i] = (short)WEBRTC_SPL_SAT(WEBRTC_SPL_WORD16_MAX, e[i],
WEBRTC_SPL_WORD16_MIN); WEBRTC_SPL_WORD16_MIN);
} }
#endif #endif
#ifdef G167
if (aec->nlpToggle == 0) {
memcpy(output, eInt16, sizeof(eInt16));
}
#endif
if (aec->metricsMode == 1) { if (aec->metricsMode == 1) {
for (i = 0; i < PART_LEN; i++) { for (i = 0; i < PART_LEN; i++) {
@ -1035,14 +1017,8 @@ static void NonLinearProcessing(aec_t *aec, short *output, short *outputH)
WebRtcAec_OverdriveAndSuppress(aec, hNl, hNlFb, efw); WebRtcAec_OverdriveAndSuppress(aec, hNl, hNlFb, efw);
#ifdef G167
if (aec->cnToggle) {
ComfortNoise(aec, efw, comfortNoiseHband, aec->noisePow, hNl);
}
#else
// Add comfort noise. // Add comfort noise.
ComfortNoise(aec, efw, comfortNoiseHband, aec->noisePow, hNl); ComfortNoise(aec, efw, comfortNoiseHband, aec->noisePow, hNl);
#endif
// Inverse error fft. // Inverse error fft.
fft[0] = efw[0][0]; fft[0] = efw[0][0];

View File

@ -20,7 +20,6 @@
#include "signal_processing_library.h" #include "signal_processing_library.h"
#include "typedefs.h" #include "typedefs.h"
//#define G167 // for running G167 tests
//#define UNCONSTR // time-unconstrained filter //#define UNCONSTR // time-unconstrained filter
//#define AEC_DEBUG // for recording files //#define AEC_DEBUG // for recording files
@ -126,13 +125,6 @@ typedef struct {
int noiseEstCtr; int noiseEstCtr;
// Toggles for G.167 testing
#ifdef G167
short adaptToggle; // Filter adaptation
short nlpToggle; // Nonlinear processing
short cnToggle; // Comfort noise
#endif
power_level_t farlevel; power_level_t farlevel;
power_level_t nearlevel; power_level_t nearlevel;
power_level_t linoutlevel; power_level_t linoutlevel;