资源简介
fftw库,c实现快速傅里叶变换和逆变换。
代码片段和文件信息
/*
Copyright (c) 2003-2010 Mark Borgerding
All rights reserved.
Redistribution and use in source and binary forms with or without modification are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the author nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include “_kiss_fft_guts.h“
/* The guts header contains all the multiplication and addition macros that are defined for
fixed or floating point complex numbers. It also delares the kf_ internal functions.
*/
static void kf_bfly2(
kiss_fft_cpx * Fout
const size_t fstride
const kiss_fft_cfg st
int m
)
{
kiss_fft_cpx * Fout2;
kiss_fft_cpx * tw1 = st->twiddles;
kiss_fft_cpx t;
Fout2 = Fout + m;
do{
C_FIXDIV(*Fout2); C_FIXDIV(*Fout22);
C_MUL (t *Fout2 *tw1);
tw1 += fstride;
C_SUB( *Fout2 *Fout t );
C_ADDTO( *Fout t );
++Fout2;
++Fout;
}while (--m);
}
static void kf_bfly4(
kiss_fft_cpx * Fout
const size_t fstride
const kiss_fft_cfg st
const size_t m
)
{
kiss_fft_cpx *tw1*tw2*tw3;
kiss_fft_cpx scratch[6];
size_t k=m;
const size_t m2=2*m;
const size_t m3=3*m;
tw3 = tw2 = tw1 = st->twiddles;
do {
C_FIXDIV(*Fout4); C_FIXDIV(Fout[m]4); C_FIXDIV(Fout[m2]4); C_FIXDIV(Fout[m3]4);
C_MUL(scratch[0]Fout[m] *tw1 );
C_MUL(scratch[1]Fout[m2] *tw2 );
C_MUL(scratch[2]Fout[m3] *tw3 );
C_SUB( scratch[5] *Fout scratch[1] );
C_ADDTO(*Fout scratch[1]);
C_ADD( scratch[3] scratch[0] scratch[2] );
C_SUB( scratch[4] scratch[0] scratch[2] );
C_SUB( Fout[m2] *Fout scratch[3] );
tw1 += fstride;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 120 2012-07-18 04:54 kiss_fft130\.hg_archival.txt
文件 110 2012-07-18 04:54 kiss_fft130\.hgignore
文件 1086 2012-07-18 04:54 kiss_fft130\.hgtags
文件 5070 2012-07-18 04:54 kiss_fft130\CHANGELOG
文件 1475 2012-07-18 04:54 kiss_fft130\COPYING
文件 1437 2012-07-18 04:54 kiss_fft130\Makefile
文件 5627 2012-07-18 04:54 kiss_fft130\README
文件 2419 2012-07-18 04:54 kiss_fft130\README.simd
文件 2126 2012-07-18 04:54 kiss_fft130\TIPS
文件 5798 2012-07-18 04:54 kiss_fft130\_kiss_fft_guts.h
文件 12660 2012-07-18 04:54 kiss_fft130\kiss_fft.c
文件 3301 2012-07-18 04:54 kiss_fft130\kiss_fft.h
文件 10621 2012-07-18 04:54 kiss_fft130\kissfft.hh
文件 2692 2012-07-18 04:54 kiss_fft130\test\Makefile
文件 1936 2012-07-18 04:54 kiss_fft130\test\benchfftw.c
文件 3293 2012-07-18 04:54 kiss_fft130\test\benchkiss.c
文件 2187 2012-07-18 04:54 kiss_fft130\test\compfft.py
文件 4283 2012-07-18 04:54 kiss_fft130\test\doit.c
文件 2614 2012-07-18 04:54 kiss_fft130\test\fastfir.py
文件 4794 2012-07-18 04:54 kiss_fft130\test\fft.py
文件 3009 2012-07-18 04:54 kiss_fft130\test\mk_test.py
文件 1126 2012-07-18 04:54 kiss_fft130\test\pstats.c
文件 94 2012-07-18 04:54 kiss_fft130\test\pstats.h
文件 653 2012-07-18 04:54 kiss_fft130\test\tailscrap.m
文件 4658 2012-07-18 04:54 kiss_fft130\test\test_real.c
文件 1677 2012-07-18 04:54 kiss_fft130\test\test_vs_dft.c
文件 2064 2012-07-18 04:54 kiss_fft130\test\testcpp.cc
文件 3575 2012-07-18 04:54 kiss_fft130\test\testkiss.py
文件 2687 2012-07-18 04:54 kiss_fft130\test\twotonetest.c
文件 1678 2012-07-18 04:54 kiss_fft130\tools\Makefile
文件 6470 2012-07-18 04:54 kiss_fft130\tools\fftutil.c
............此处省略10个文件信息
评论
共有 条评论