Update code to upstream revision r789

Very minor changes.
This commit is contained in:
Arun Raghavan 2011-10-21 10:03:40 +05:30
parent 693d686b0f
commit 4d764a17f0
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# Revision changelog (version - date, svn rev. from upstream that was merged)
# 0.1 - 19 Oct 2011, r767
# 0.1 - 21 Oct 2011, r789
AC_INIT([webrtc-audio-processing], [0.1])
AM_INIT_AUTOMAKE([tar-ustar])

View File

@ -736,6 +736,7 @@ int WebRtcAec_GetDelayMetrics(void* handle, int* median, int* std) {
int delay_values = 0;
int num_delay_values = 0;
int my_median = 0;
const int kMsPerBlock = (PART_LEN * 1000) / self->splitSampFreq;
float l1_norm = 0;
if (self == NULL) {
@ -779,13 +780,13 @@ int WebRtcAec_GetDelayMetrics(void* handle, int* median, int* std) {
break;
}
}
*median = my_median;
*median = my_median * kMsPerBlock;
// Calculate the L1 norm, with median value as central moment
for (i = 0; i < kMaxDelay; i++) {
l1_norm += (float) (fabs(i - my_median) * self->aec->delay_histogram[i]);
}
*std = (int) (l1_norm / (float) num_delay_values + 0.5f);
*std = (int) (l1_norm / (float) num_delay_values + 0.5f) * kMsPerBlock;
// Reset histogram
memset(self->aec->delay_histogram, 0, sizeof(self->aec->delay_histogram));

View File

@ -28,12 +28,12 @@
// - Do we really support PowerPC? Probably not. Remove WEBRTC_MAC_INTEL
// from build/common.gypi as well.
#if defined(WIN32)
// Windows & Windows Mobile
// Windows & Windows Mobile.
#if !defined(WEBRTC_TARGET_PC)
#define WEBRTC_TARGET_PC
#endif
#elif defined(__APPLE__)
// Mac OS X
// Mac OS X.
#if defined(__LITTLE_ENDIAN__ )
#if !defined(WEBRTC_TARGET_MAC_INTEL)
#define WEBRTC_TARGET_MAC_INTEL