[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v1.0-dev-305-gbe4208d
Colin Guthrie
gitmailer-noreply at 0pointer.de
Wed May 11 02:55:15 PDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.
The master branch has been updated
from 8eed56961481bded395005cfd1729c045c23b289 (commit)
- Log -----------------------------------------------------------------
be4208d echo-cancel: Remove unnecessary noalign attribute
e678bea echo-cancel: Handle alignment requirement manually
-----------------------------------------------------------------------
Summary of changes:
src/modules/echo-cancel/adrian-aec.c | 13 +++++++++----
src/modules/echo-cancel/adrian-aec.h | 3 ++-
2 files changed, 11 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
commit e678beaf14fcba69bc679e3c8bcf406dff1f7242
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Mon May 9 13:40:24 2011 +0530
echo-cancel: Handle alignment requirement manually
PA_ALIGNED can't always guarantee that the alignment we want (the GCC
man page suggests that the linker might not be able to meet the
alignment requirements we desire). Instead, we now allocate some extra
memory and guaratee that the alignment we require is met.
diff --git a/src/modules/echo-cancel/adrian-aec.c b/src/modules/echo-cancel/adrian-aec.c
index 04b31e9..dfe8ada 100644
--- a/src/modules/echo-cancel/adrian-aec.c
+++ b/src/modules/echo-cancel/adrian-aec.c
@@ -12,6 +12,7 @@
#include <math.h>
#include <string.h>
+#include <stdint.h>
#include <pulse/xmalloc.h>
@@ -70,7 +71,7 @@ AEC* AEC_init(int RATE, int have_vector)
a->hangover = 0;
memset(a->x, 0, sizeof(a->x));
memset(a->xf, 0, sizeof(a->xf));
- memset(a->w, 0, sizeof(a->w));
+ memset(a->w_arr, 0, sizeof(a->w_arr));
a->j = NLMS_EXT;
a->delta = 0.0f;
AEC_setambient(a, NoiseFloor);
@@ -89,10 +90,15 @@ AEC* AEC_init(int RATE, int have_vector)
a->dumpcnt = 0;
memset(a->ws, 0, sizeof(a->ws));
- if (have_vector)
+ if (have_vector) {
+ /* Get a 16-byte aligned location */
+ a->w = (REAL *) (((uintptr_t) a->w_arr) + (((uintptr_t) a->w_arr) % 16));
a->dotp = dotp_sse;
- else
+ } else {
+ /* We don't care about alignment, just use the array as-is */
+ a->w = a->w_arr;
a->dotp = dotp;
+ }
return a;
}
diff --git a/src/modules/echo-cancel/adrian-aec.h b/src/modules/echo-cancel/adrian-aec.h
index 9c722b9..efb9e27 100644
--- a/src/modules/echo-cancel/adrian-aec.h
+++ b/src/modules/echo-cancel/adrian-aec.h
@@ -306,7 +306,8 @@ struct AEC {
// NLMS-pw
REAL x[NLMS_LEN + NLMS_EXT]; // tap delayed loudspeaker signal
REAL xf[NLMS_LEN + NLMS_EXT]; // pre-whitening tap delayed signal
- PA_DECLARE_ALIGNED(16, REAL, w[NLMS_LEN]); // tap weights
+ REAL w_arr[NLMS_LEN+16]; // tap weights
+ REAL *w; // this will be a 16-byte aligned pointer into w_arr
int j; // optimize: less memory copies
double dotp_xf_xf; // double to avoid loss of precision
float delta; // noise floor to stabilize NLMS
commit be4208d0799f21663f58f50430b4883e87709480
Author: Arun Raghavan <arun.raghavan at collabora.co.uk>
Date: Tue May 10 13:33:28 2011 +0530
echo-cancel: Remove unnecessary noalign attribute
This was just introduced for debugging and should not have been in the
final commit. Won't make a difference at the moment since this function
is used as a pointer, but removing this in case we change this in the
future.
diff --git a/src/modules/echo-cancel/adrian-aec.c b/src/modules/echo-cancel/adrian-aec.c
index dfe8ada..e969e8c 100644
--- a/src/modules/echo-cancel/adrian-aec.c
+++ b/src/modules/echo-cancel/adrian-aec.c
@@ -40,7 +40,6 @@ static REAL dotp(REAL a[], REAL b[])
return sum0 + sum1;
}
-static REAL dotp_sse(REAL a[], REAL b[]) __attribute__((noinline));
static REAL dotp_sse(REAL a[], REAL b[])
{
#ifdef __SSE__
--
hooks/post-receive
PulseAudio Sound Server
More information about the pulseaudio-commits
mailing list