Fix gcc 4.6 unused variable warnings in audio_processing.
Issues: http://code.google.com/p/webrtc/issues/detail?id=54 http://code.google.com/p/webrtc/issues/detail?id=55 Review URL: http://webrtc-codereview.appspot.com/121003 git-svn-id: http://webrtc.googlecode.com/svn/trunk@434 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
6724cf8183
commit
7f593c1e62
@ -1306,7 +1306,7 @@ static void UpdateLevel(power_level_t *level, const short *in)
|
|||||||
|
|
||||||
static void UpdateMetrics(aec_t *aec)
|
static void UpdateMetrics(aec_t *aec)
|
||||||
{
|
{
|
||||||
float dtmp, dtmp2, dtmp3;
|
float dtmp, dtmp2;
|
||||||
|
|
||||||
const float actThresholdNoisy = 8.0f;
|
const float actThresholdNoisy = 8.0f;
|
||||||
const float actThresholdClean = 40.0f;
|
const float actThresholdClean = 40.0f;
|
||||||
@ -1372,7 +1372,6 @@ static void UpdateMetrics(aec_t *aec)
|
|||||||
suppressedEcho = aec->linoutlevel.averagelevel - safety * aec->linoutlevel.minlevel;
|
suppressedEcho = aec->linoutlevel.averagelevel - safety * aec->linoutlevel.minlevel;
|
||||||
|
|
||||||
dtmp2 = 10 * (float)log10(echo / suppressedEcho + 1e-10f);
|
dtmp2 = 10 * (float)log10(echo / suppressedEcho + 1e-10f);
|
||||||
dtmp3 = 10 * (float)log10(aec->nearlevel.averagelevel / suppressedEcho + 1e-10f);
|
|
||||||
|
|
||||||
aec->aNlp.instant = dtmp2;
|
aec->aNlp.instant = dtmp2;
|
||||||
if (dtmp > aec->aNlp.max) {
|
if (dtmp > aec->aNlp.max) {
|
||||||
|
@ -545,10 +545,8 @@ static void rftbsub_128_C(float *a) {
|
|||||||
|
|
||||||
void aec_rdft_forward_128(float *a) {
|
void aec_rdft_forward_128(float *a) {
|
||||||
const int n = 128;
|
const int n = 128;
|
||||||
int nw;
|
|
||||||
float xi;
|
float xi;
|
||||||
|
|
||||||
nw = ip[0];
|
|
||||||
bitrv2_32or128(n, ip + 2, a);
|
bitrv2_32or128(n, ip + 2, a);
|
||||||
cftfsub_128(a);
|
cftfsub_128(a);
|
||||||
rftfsub_128(a);
|
rftfsub_128(a);
|
||||||
@ -559,9 +557,7 @@ void aec_rdft_forward_128(float *a) {
|
|||||||
|
|
||||||
void aec_rdft_inverse_128(float *a) {
|
void aec_rdft_inverse_128(float *a) {
|
||||||
const int n = 128;
|
const int n = 128;
|
||||||
int nw;
|
|
||||||
|
|
||||||
nw = ip[0];
|
|
||||||
a[1] = 0.5f * (a[0] - a[1]);
|
a[1] = 0.5f * (a[0] - a[1]);
|
||||||
a[0] -= a[1];
|
a[0] -= a[1];
|
||||||
rftbsub_128(a);
|
rftbsub_128(a);
|
||||||
|
@ -176,7 +176,6 @@ int EstimateSkew(const int* rawSkew,
|
|||||||
float y = 0;
|
float y = 0;
|
||||||
float xy = 0;
|
float xy = 0;
|
||||||
float xAvg = 0;
|
float xAvg = 0;
|
||||||
float yAvg = 0;
|
|
||||||
float denom = 0;
|
float denom = 0;
|
||||||
float skew = 0;
|
float skew = 0;
|
||||||
|
|
||||||
@ -223,7 +222,6 @@ int EstimateSkew(const int* rawSkew,
|
|||||||
}
|
}
|
||||||
assert(n > 0);
|
assert(n > 0);
|
||||||
xAvg = x / n;
|
xAvg = x / n;
|
||||||
yAvg = y / n;
|
|
||||||
denom = x2 - xAvg*x;
|
denom = x2 - xAvg*x;
|
||||||
|
|
||||||
if (denom != 0) {
|
if (denom != 0) {
|
||||||
|
@ -212,7 +212,6 @@ void WebRtcAecm_InitEchoPathCore(AecmCore_t* aecm, const WebRtc_Word16* echo_pat
|
|||||||
//
|
//
|
||||||
int WebRtcAecm_InitCore(AecmCore_t * const aecm, int samplingFreq)
|
int WebRtcAecm_InitCore(AecmCore_t * const aecm, int samplingFreq)
|
||||||
{
|
{
|
||||||
int retVal = 0;
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
WebRtc_Word32 tmp32 = PART_LEN1 * PART_LEN1;
|
WebRtc_Word32 tmp32 = PART_LEN1 * PART_LEN1;
|
||||||
WebRtc_Word16 tmp16 = PART_LEN1;
|
WebRtc_Word16 tmp16 = PART_LEN1;
|
||||||
@ -220,7 +219,7 @@ int WebRtcAecm_InitCore(AecmCore_t * const aecm, int samplingFreq)
|
|||||||
if (samplingFreq != 8000 && samplingFreq != 16000)
|
if (samplingFreq != 8000 && samplingFreq != 16000)
|
||||||
{
|
{
|
||||||
samplingFreq = 8000;
|
samplingFreq = 8000;
|
||||||
retVal = -1;
|
return -1;
|
||||||
}
|
}
|
||||||
// sanity check of sampling frequency
|
// sanity check of sampling frequency
|
||||||
aecm->mult = (WebRtc_Word16)samplingFreq / 8000;
|
aecm->mult = (WebRtc_Word16)samplingFreq / 8000;
|
||||||
@ -245,7 +244,7 @@ int WebRtcAecm_InitCore(AecmCore_t * const aecm, int samplingFreq)
|
|||||||
|
|
||||||
if (WebRtcAecm_InitDelayEstimator(aecm->delay_estimator) != 0)
|
if (WebRtcAecm_InitDelayEstimator(aecm->delay_estimator) != 0)
|
||||||
{
|
{
|
||||||
retVal = -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize to reasonable values
|
// Initialize to reasonable values
|
||||||
|
@ -660,11 +660,9 @@ WebRtc_Word16 WebRtcAgc_ProcessVad(AgcVad_t *state, // (i) VAD state
|
|||||||
WebRtc_Word16 buf2[4];
|
WebRtc_Word16 buf2[4];
|
||||||
WebRtc_Word16 HPstate;
|
WebRtc_Word16 HPstate;
|
||||||
WebRtc_Word16 zeros, dB;
|
WebRtc_Word16 zeros, dB;
|
||||||
WebRtc_Word16 *buf1_ptr;
|
|
||||||
|
|
||||||
// process in 10 sub frames of 1 ms (to save on memory)
|
// process in 10 sub frames of 1 ms (to save on memory)
|
||||||
nrg = 0;
|
nrg = 0;
|
||||||
buf1_ptr = &buf1[0];
|
|
||||||
HPstate = state->HPstate;
|
HPstate = state->HPstate;
|
||||||
for (subfr = 0; subfr < 10; subfr++)
|
for (subfr = 0; subfr < 10; subfr++)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user