Don't bother multiplying when the window's value is one or zero
This commit is contained in:
parent
227ad2f82d
commit
f28062fe6a
2 changed files with 48 additions and 11 deletions
|
@ -274,9 +274,15 @@ CELTMode *celt_mode_create(int Fs, int channels, int frame_size, int lookahead,
|
|||
|
||||
for (i=0;i<2*N;i++)
|
||||
mode->window[i] = 0;
|
||||
#ifndef FIXED_POINT
|
||||
for (i=0;i<mode->overlap;i++)
|
||||
mode->window[N4+i] = mode->window[2*N-N4-i-1]
|
||||
= Q15ONE*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap));
|
||||
#else
|
||||
for (i=0;i<mode->overlap;i++)
|
||||
mode->window[N4+i] = mode->window[2*N-N4-i-1]
|
||||
= MIN32(32767,32768.*sin(.5*M_PI* sin(.5*M_PI*(i+.5)/mode->overlap) * sin(.5*M_PI*(i+.5)/mode->overlap)));
|
||||
#endif
|
||||
for (i=0;i<N2;i++)
|
||||
mode->window[N-N4+i] = Q15ONE;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue