/*previous block was smaller or the same size, so use it's size to set the window length*/
block_len = 1 << s->prev_block_len_bits;
/*find the middle of the two overlapped blocks, this will be the first overlapped sample*/
- n = (s->block_len - block_len) / 2;
+ n = (s->block_len - block_len) >> 1;
bsize = s->frame_len_bits - s->prev_block_len_bits;
vector_fmul_add_add(out+n, in+n, s->windows[bsize], block_len);
} else {
block_len = 1 << s->next_block_len_bits;
- n = (s->block_len - block_len) / 2;
+ n = (s->block_len - block_len) >> 1;
bsize = s->frame_len_bits - s->next_block_len_bits;
memcpy(out, in, n*sizeof(int32_t));
#undef STEP
- return (int32_t)(r << (PRECISION / 2));
+ return (int32_t)(r << (PRECISION >> 1));
}
/* Inverse gain of circular cordic rotation in s0.31 format. */
z = phase;
/* The phase has to be somewhere between 0..pi for this to work right */
- if (z < 0xffffffff / 4) {
+ if (z < 0xffffffff >> 2) {
/* z in first quadrant, z += pi/2 to correct */
x = -x;
- z += 0xffffffff / 4;
- } else if (z < 3 * (0xffffffff / 4)) {
+ z += 0xffffffff >> 2;
+ } else if (z < 3 * (0xffffffff >> 2)) {
/* z in third quadrant, z -= pi/2 to correct */
- z -= 0xffffffff / 4;
+ z -= 0xffffffff >> 2;
} else {
/* z in fourth quadrant, z -= 3pi/2 to correct */
x = -x;
- z -= 3 * (0xffffffff / 4);
+ z -= 3 * (0xffffffff >> 2);
}
/* Each iteration adds roughly 1-bit of extra precision */
z1 = atan_table[i];
/* Decided which direction to rotate vector. Pivot point is pi/2 */
- if (z >= 0xffffffff / 4) {
+ if (z >= 0xffffffff >> 2) {
x -= y1;
y += x1;
z -= z1;