diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-12-31 09:00:37 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-12-31 09:00:37 +0400 |
commit | c8f62a4aedc1e6fd6ab3091f95df301f38d1488b (patch) | |
tree | 08fefd258b6b0b71534b39c41b2171a69b9bd7c7 /celt | |
parent | e1f846208e5d584673fc171009ada085538c7c56 (diff) |
Improving the accuracy of the fixed-point radix-3 and radix-5
Diffstat (limited to 'celt')
-rw-r--r-- | celt/kiss_fft.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/celt/kiss_fft.c b/celt/kiss_fft.c index 79df7ee1..a7bdde81 100644 --- a/celt/kiss_fft.c +++ b/celt/kiss_fft.c @@ -167,7 +167,12 @@ static void kf_bfly3( kiss_twiddle_cpx epi3; kiss_fft_cpx * Fout_beg = Fout; +#ifdef FIXED_POINT + epi3.r = -16384; + epi3.i = -28378; +#else epi3 = st->twiddles[fstride*m]; +#endif for (i=0;i<N;i++) { Fout = Fout_beg + i*mm; @@ -215,13 +220,19 @@ static void kf_bfly5( kiss_fft_cpx *Fout0,*Fout1,*Fout2,*Fout3,*Fout4; int i, u; kiss_fft_cpx scratch[13]; - const kiss_twiddle_cpx * twiddles = st->twiddles; const kiss_twiddle_cpx *tw; kiss_twiddle_cpx ya,yb; kiss_fft_cpx * Fout_beg = Fout; - ya = twiddles[fstride*m]; - yb = twiddles[fstride*2*m]; +#ifdef FIXED_POINT + ya.r = 10126; + ya.i = -31164; + yb.r = -26510; + yb.i = -19261; +#else + ya = st->twiddles[fstride*m]; + yb = st->twiddles[fstride*2*m]; +#endif tw=st->twiddles; for (i=0;i<N;i++) |