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];
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,
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;
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));