From: Andre Noll Date: Sat, 17 Oct 2009 10:48:15 +0000 (+0200) Subject: rename vector_fmul_add() vector_fmul_reverse_c() and make them static. X-Git-Tag: v0.4.1~89 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=df6606e438a34c7bfc325e5f320843d1e97d3f7a;p=paraslash.git rename vector_fmul_add() vector_fmul_reverse_c() and make them static. --- diff --git a/wmadec_filter.c b/wmadec_filter.c index e8388c03..c49489b7 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -629,18 +629,21 @@ static int decode_exp_vlc(struct private_wmadec_data *s, int ch) return 0; } -static void vector_fmul_add(float *dst, const float *src0, const float *src1, +/* compute src0 * src1 + src2 */ +static inline void vector_mult_add(float *dst, const float *src0, const float *src1, const float *src2, int len) { int i; + for (i = 0; i < len; i++) dst[i] = src0[i] * src1[i] + src2[i]; } -static void vector_fmul_reverse_c(float *dst, const float *src0, +static inline void vector_mult_reverse(float *dst, const float *src0, const float *src1, int len) { int i; + src1 += len - 1; for (i = 0; i < len; i++) dst[i] = src0[i] * src1[-i]; @@ -662,14 +665,14 @@ static void wma_window(struct private_wmadec_data *s, float *out) block_len = s->block_len; bsize = s->frame_len_bits - s->block_len_bits; - vector_fmul_add(out, in, s->windows[bsize], out, block_len); + vector_mult_add(out, in, s->windows[bsize], out, block_len); } else { block_len = 1 << s->prev_block_len_bits; n = (s->block_len - block_len) / 2; bsize = s->frame_len_bits - s->prev_block_len_bits; - vector_fmul_add(out + n, in + n, s->windows[bsize], out + n, + vector_mult_add(out + n, in + n, s->windows[bsize], out + n, block_len); memcpy(out + n + block_len, in + n + block_len, @@ -684,7 +687,7 @@ static void wma_window(struct private_wmadec_data *s, float *out) block_len = s->block_len; bsize = s->frame_len_bits - s->block_len_bits; - vector_fmul_reverse_c(out, in, s->windows[bsize], block_len); + vector_mult_reverse(out, in, s->windows[bsize], block_len); } else { block_len = 1 << s->next_block_len_bits; @@ -693,7 +696,7 @@ static void wma_window(struct private_wmadec_data *s, float *out) memcpy(out, in, n * sizeof(float)); - vector_fmul_reverse_c(out + n, in + n, s->windows[bsize], + vector_mult_reverse(out + n, in + n, s->windows[bsize], block_len); memset(out + n + block_len, 0, n * sizeof(float));