getting ready for long-overdue 1.2.2

This commit is contained in:
Mark Borgerding 2005-05-07 03:02:10 +00:00
parent d234beeca0
commit 4722ccb12b
6 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,10 @@
1.2.2 (May 6, 2005) The Matthew release
Replaced fixed point division with multiply&shift. Thanks to Jean-Marc Valin for the prodding.
Added C_FIXDIV calls to real fft routines to prevent possible overflow when using fixed point.
Credit to Robert Oschler of robodance for pointing me towards the bug.
1.2.1 (April 4, 2004)
compiles cleanly with just about every -W warning flag under the sun

View File

@ -1,4 +1,4 @@
KFVER=1_2_1
KFVER=1_2_2
DISTDIR=kiss_fft_v$(KFVER)
TARBALL=kiss_fft_v$(KFVER).tar.gz
@ -34,4 +34,5 @@ asm: kiss_fft.s
kiss_fft.s: kiss_fft.c kiss_fft.h _kiss_fft_guts.h
[ -e kiss_fft.s ] && mv kiss_fft.s kiss_fft.s~ || true
gcc -S kiss_fft.c -O3 -march=pentiumpro -ffast-math -fomit-frame-pointer -dA -fverbose-asm
gcc -o kiss_fft_short.s -S kiss_fft.c -O3 -march=pentiumpro -ffast-math -fomit-frame-pointer -dA -fverbose-asm -DFIXED_POINT
[ -e kiss_fft.s~ ] && diff kiss_fft.s~ kiss_fft.s || true

2
README
View File

@ -12,7 +12,7 @@ USAGE:
#include "kiss_fft.h"
kiss_fft_cfg cfg = kiss_fft_alloc( nfft ,inverse_fft );
kiss_fft_cfg cfg = kiss_fft_alloc( nfft ,is_inverse_fft ,0,0 );
while ...

View File

@ -52,8 +52,12 @@ struct kiss_fft_state{
do{ (m).r = sround( smul((a).r,(b).r) - smul((a).i,(b).i) ); \
(m).i = sround( smul((a).r,(b).i) + smul((a).i,(b).r) ); }while(0)
# define DIVSCALAR(x,k) \
(x) = sround( smul( x, 32768/k ) )
# define C_FIXDIV(c,div) \
do{ (c).r /= div; (c).i /=div; }while(0)
do { DIVSCALAR( (c).r , div); \
DIVSCALAR( (c).i , div); }while (0)
# define C_MULBYSCALAR( c, s ) \
do{ (c).r = sround( smul( (c).r , s ) ) ;\

View File

@ -27,7 +27,8 @@ else
DUMPHDR=dumphdr_$(DATATYPE)
endif
all: $(FFTUTIL) $(FASTFILT) $(FASTFILTREAL) $(PSDPNG) $(DUMPHDR)
all: $(FFTUTIL) $(FASTFILT) $(FASTFILTREAL) $(PSDPNG)
# $(DUMPHDR)
#CFLAGS=-Wall -O3 -pedantic -march=pentiumpro -ffast-math -fomit-frame-pointer $(WARNINGS)
# If the above flags do not work, try the following

View File

@ -125,6 +125,8 @@ void kiss_fftri(kiss_fftr_cfg st,const kiss_fft_cpx *freqdata,kiss_fft_scalar *t
fk = freqdata[k];
fnkc.r = freqdata[N - k].r;
fnkc.i = -freqdata[N - k].i;
C_FIXDIV( fk , 2 );
C_FIXDIV( fnkc , 2 );
C_ADD (fek, fk, fnkc);
C_SUB (tmpbuf, fk, fnkc);