亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mixfft.c

?? 任意混合基的FFT
?? C
?? 第 1 頁 / 共 2 頁
字號:

#include <math.h>
#include <stdio.h>
#include <stdlib.h>


/************************************************************************
  fft(int n, double xRe[], double xIm[], double yRe[], double yIm[])
 ------------------------------------------------------------------------
  NOTE : This is copyrighted material, Not public domain. See below.
 ------------------------------------------------------------------------
  Input/output:
      int n          transformation length.
      double xRe[]   real part of input sequence.
      double xIm[]   imaginary part of input sequence.
      double yRe[]   real part of output sequence.
      double yIm[]   imaginary part of output sequence.
 ------------------------------------------------------------------------
  Function:
      The procedure performs a fast discrete Fourier transform (FFT) of
      a complex sequence, x, of an arbitrary length, n. The output, y,
      is also a complex sequence of length n.

      y[k] = sum(x[m]*exp(-i*2*pi*k*m/n), m=0..(n-1)), k=0,...,(n-1)

      The largest prime factor of n must be less than or equal to the
      constant maxPrimeFactor defined below.
 ------------------------------------------------------------------------
  Author:
      Jens Joergen Nielsen            For non-commercial use only.
      Bakkehusene 54                  A $100 fee must be paid if used
      DK-2970 Hoersholm               commercially. Please contact.
      DENMARK

      E-mail : jjn@get2net.dk   All rights reserved. October 2000.
      Homepage : http://home.get2net.dk/jjn
 ------------------------------------------------------------------------
  Implementation notes:
      The general idea is to factor the length of the DFT, n, into
      factors that are efficiently handled by the routines.

      A number of short DFT's are implemented with a minimum of
      arithmetical operations and using (almost) straight line code
      resulting in very fast execution when the factors of n belong
      to this set. Especially radix-10 is optimized.

      Prime factors, that are not in the set of short DFT's are handled
      with direct evaluation of the DFP expression.

      Please report any problems to the author. 
      Suggestions and improvements are welcomed.
 ------------------------------------------------------------------------
  Benchmarks:                   
      The Microsoft Visual C++ compiler was used with the following 
      compile options:
      /nologo /Gs /G2 /W4 /AH /Ox /D "NDEBUG" /D "_DOS" /FR
      and the FFTBENCH test executed on a 50MHz 486DX :
      
      Length  Time [s]  Accuracy [dB]

         128   0.0054     -314.8   
         256   0.0116     -309.8   
         512   0.0251     -290.8   
        1024   0.0567     -313.6   
        2048   0.1203     -306.4   
        4096   0.2600     -291.8   
        8192   0.5800     -305.1   
         100   0.0040     -278.5   
         200   0.0099     -280.3   
         500   0.0256     -278.5   
        1000   0.0540     -278.5   
        2000   0.1294     -280.6   
        5000   0.3300     -278.4   
       10000   0.7133     -278.5   
 ------------------------------------------------------------------------
  The following procedures are used :
      factorize       :  factor the transformation length.
      transTableSetup :  setup table with sofar-, actual-, and remainRadix.
      permute         :  permutation allows in-place calculations.
      twiddleTransf   :  twiddle multiplications and DFT's for one stage.
      initTrig        :  initialise sine/cosine table.
      fft_4           :  length 4 DFT, a la Nussbaumer.
      fft_5           :  length 5 DFT, a la Nussbaumer.
      fft_10          :  length 10 DFT using prime factor FFT.
      fft_odd         :  length n DFT, n odd.
*************************************************************************/

#define  maxPrimeFactor        37
#define  maxPrimeFactorDiv2    (maxPrimeFactor+1)/2
#define  maxFactorCount        20

static double  c3_1 = -1.5000000000000E+00;  /*  c3_1 = cos(2*pi/3)-1;          */
static double  c3_2 =  8.6602540378444E-01;  /*  c3_2 = sin(2*pi/3);            */
                                          
static double  u5   =  1.2566370614359E+00;  /*  u5   = 2*pi/5;                 */
static double  c5_1 = -1.2500000000000E+00;  /*  c5_1 = (cos(u5)+cos(2*u5))/2-1;*/
static double  c5_2 =  5.5901699437495E-01;  /*  c5_2 = (cos(u5)-cos(2*u5))/2;  */
static double  c5_3 = -9.5105651629515E-01;  /*  c5_3 = -sin(u5);               */
static double  c5_4 = -1.5388417685876E+00;  /*  c5_4 = -(sin(u5)+sin(2*u5));   */
static double  c5_5 =  3.6327126400268E-01;  /*  c5_5 = (sin(u5)-sin(2*u5));    */
static double  c8   =  7.0710678118655E-01;  /*  c8 = 1/sqrt(2);    */

static double   pi;
static int      groupOffset,dataOffset,blockOffset,adr;
static int      groupNo,dataNo,blockNo,twNo;
static double   omega, tw_re,tw_im;
static double   twiddleRe[maxPrimeFactor], twiddleIm[maxPrimeFactor],
                trigRe[maxPrimeFactor], trigIm[maxPrimeFactor],
                zRe[maxPrimeFactor], zIm[maxPrimeFactor];
static double   vRe[maxPrimeFactorDiv2], vIm[maxPrimeFactorDiv2];
static double   wRe[maxPrimeFactorDiv2], wIm[maxPrimeFactorDiv2];

void factorize(int n, int *nFact, int fact[])
{
    int i,j,k;
    int nRadix;
    int radices[7];
    int factors[maxFactorCount];

    nRadix    =  6;  
    radices[1]=  2;
    radices[2]=  3;
    radices[3]=  4;
    radices[4]=  5;
    radices[5]=  8;
    radices[6]= 10;

    if (n==1)
    {
        j=1;
        factors[1]=1;
    }
    else j=0;
    i=nRadix;
    while ((n>1) && (i>0))
    {
      if ((n % radices[i]) == 0)
      {
        n=n / radices[i];
        j=j+1;
        factors[j]=radices[i];
      }
      else  i=i-1;
    }
    if (factors[j] == 2)   /*substitute factors 2*8 with 4*4 */
    {   
      i = j-1;
      while ((i>0) && (factors[i] != 8)) i--;
      if (i>0)
      {
        factors[j] = 4;
        factors[i] = 4;
      }
    }
    if (n>1)
    {
        for (k=2; k<sqrt(n)+1; k++)
            while ((n % k) == 0)
            {
                n=n / k;
                j=j+1;
                factors[j]=k;
            }
        if (n>1)
        {
            j=j+1;
            factors[j]=n;
        }
    }               
    for (i=1; i<=j; i++)         
    {
      fact[i] = factors[j-i+1];
    }
    *nFact=j;
}   /* factorize */

/****************************************************************************
  After N is factored the parameters that control the stages are generated.
  For each stage we have:
    sofar   : the product of the radices so far.
    actual  : the radix handled in this stage.
    remain  : the product of the remaining radices.
 ****************************************************************************/

void transTableSetup(int sofar[], int actual[], int remain[],
                     int *nFact,
                     int *nPoints)
{
    int i;

    factorize(*nPoints, nFact, actual);
    if (actual[1] > maxPrimeFactor)
    {
        printf("\nPrime factor of FFT length too large : %6d",actual[1]);
        printf("\nPlease modify the value of maxPrimeFactor in mixfft.c");
        exit(1);
    }
    remain[0]=*nPoints;
    sofar[1]=1;
    remain[1]=*nPoints / actual[1];
    for (i=2; i<=*nFact; i++)
    {
        sofar[i]=sofar[i-1]*actual[i-1];
        remain[i]=remain[i-1] / actual[i];
    }
}   /* transTableSetup */

/****************************************************************************
  The sequence y is the permuted input sequence x so that the following
  transformations can be performed in-place, and the final result is the
  normal order.
 ****************************************************************************/

void permute(int nPoint, int nFact,
             int fact[], int remain[],
             double xRe[], double xIm[],
             double yRe[], double yIm[])

{
    int i,j,k;
    int count[maxFactorCount]; 

    for (i=1; i<=nFact; i++) count[i]=0;
    k=0;
    for (i=0; i<=nPoint-2; i++)
    {
        yRe[i] = xRe[k];
        yIm[i] = xIm[k];
        j=1;
        k=k+remain[j];
        count[1] = count[1]+1;
        while (count[j] >= fact[j])
        {
            count[j]=0;
            k=k-remain[j-1]+remain[j+1];
            j=j+1;
            count[j]=count[j]+1;
        }
    }
    yRe[nPoint-1]=xRe[nPoint-1];
    yIm[nPoint-1]=xIm[nPoint-1];
}   /* permute */


/****************************************************************************
  Twiddle factor multiplications and transformations are performed on a
  group of data. The number of multiplications with 1 are reduced by skipping
  the twiddle multiplication of the first stage and of the first group of the
  following stages.
 ***************************************************************************/

void initTrig(int radix)
{
    int i;
    double w,xre,xim;

    w=2*pi/radix;
    trigRe[0]=1; trigIm[0]=0;
    xre=cos(w); 
    xim=-sin(w);
    trigRe[1]=xre; trigIm[1]=xim;
    for (i=2; i<radix; i++)
    {
        trigRe[i]=xre*trigRe[i-1] - xim*trigIm[i-1];
        trigIm[i]=xim*trigRe[i-1] + xre*trigIm[i-1];
    }
}   /* initTrig */

void fft_4(double aRe[], double aIm[])
{
    double  t1_re,t1_im, t2_re,t2_im;
    double  m2_re,m2_im, m3_re,m3_im;

    t1_re=aRe[0] + aRe[2]; t1_im=aIm[0] + aIm[2];
    t2_re=aRe[1] + aRe[3]; t2_im=aIm[1] + aIm[3];

    m2_re=aRe[0] - aRe[2]; m2_im=aIm[0] - aIm[2];
    m3_re=aIm[1] - aIm[3]; m3_im=aRe[3] - aRe[1];

    aRe[0]=t1_re + t2_re; aIm[0]=t1_im + t2_im;
    aRe[2]=t1_re - t2_re; aIm[2]=t1_im - t2_im;
    aRe[1]=m2_re + m3_re; aIm[1]=m2_im + m3_im;
    aRe[3]=m2_re - m3_re; aIm[3]=m2_im - m3_im;
}   /* fft_4 */


void fft_5(double aRe[], double aIm[])
{    
    double  t1_re,t1_im, t2_re,t2_im, t3_re,t3_im;
    double  t4_re,t4_im, t5_re,t5_im;
    double  m2_re,m2_im, m3_re,m3_im, m4_re,m4_im;
    double  m1_re,m1_im, m5_re,m5_im;
    double  s1_re,s1_im, s2_re,s2_im, s3_re,s3_im;
    double  s4_re,s4_im, s5_re,s5_im;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美一区二区三区鸳鸯浴| 舔着乳尖日韩一区| 亚洲成人免费视频| 91色视频在线| 欧美一区二区三区在线视频| 中文字幕免费不卡在线| 男人的天堂久久精品| 99国产精品久久久久久久久久| 欧美一区二区在线观看| 亚洲午夜av在线| 成人av第一页| 日本一区二区三区免费乱视频| 午夜婷婷国产麻豆精品| 日本韩国欧美三级| 国产精品视频一二三| 黄网站免费久久| 欧美日韩国产在线播放网站| 中文字幕日韩欧美一区二区三区| 麻豆国产一区二区| 日韩欧美一区二区在线视频| 亚洲国产精品一区二区尤物区| 97se亚洲国产综合自在线观| 国产丝袜欧美中文另类| 激情综合网天天干| 日韩欧美亚洲一区二区| 首页国产丝袜综合| 欧美网站大全在线观看| 艳妇臀荡乳欲伦亚洲一区| 94-欧美-setu| 亚洲欧美日韩中文字幕一区二区三区| 成人午夜av在线| 国产免费成人在线视频| 国产激情精品久久久第一区二区| 久久综合狠狠综合| 韩国v欧美v亚洲v日本v| 久久久噜噜噜久久中文字幕色伊伊| 美女久久久精品| 久久这里只有精品首页| 国产一区二区三区在线观看精品 | 轻轻草成人在线| 欧美色网站导航| 日韩福利电影在线| 日韩一区二区在线观看视频| 麻豆国产精品一区二区三区 | 久久疯狂做爰流白浆xx| 精品三级在线观看| 成熟亚洲日本毛茸茸凸凹| 国产色婷婷亚洲99精品小说| 国产99久久久久| 亚洲裸体xxx| 在线成人高清不卡| 韩国av一区二区| 国产精品久久久久婷婷| 日本道免费精品一区二区三区| 首页欧美精品中文字幕| 91精品欧美一区二区三区综合在| 美女视频网站久久| 国产精品久久久久永久免费观看 | 一区二区三区蜜桃网| 欧美日韩美少妇| 日本sm残虐另类| 国产三级精品在线| 色老综合老女人久久久| 日韩电影一区二区三区| 欧美国产激情二区三区| 欧美日韩一卡二卡| 国产福利一区在线观看| 亚洲一区二区三区四区的| 日韩一卡二卡三卡四卡| 不卡欧美aaaaa| 日韩国产精品大片| 国产精品久久久久久久久免费桃花| 日本国产一区二区| 精品一区二区成人精品| 亚洲美女淫视频| 久久这里只有精品视频网| 91麻豆蜜桃一区二区三区| 日本91福利区| 综合色中文字幕| 精品国产一区二区精华| 色综合视频一区二区三区高清| 免费成人美女在线观看.| 日韩一区有码在线| 26uuu色噜噜精品一区| 色婷婷综合五月| 成人性生交大片免费看视频在线| 日韩精品一区第一页| 亚洲欧美在线视频| 国产日韩亚洲欧美综合| 欧美一区日韩一区| 日本黄色一区二区| 99综合电影在线视频| 韩国欧美一区二区| 日韩电影免费在线看| 亚洲一区二区三区中文字幕在线| 国产亚洲精品超碰| 精品国产免费一区二区三区四区 | 91视视频在线直接观看在线看网页在线看| 日本午夜一本久久久综合| 亚洲人精品午夜| 国产精品蜜臀av| 久久精品一区二区三区av| 欧美一级国产精品| 欧美日韩成人综合天天影院 | 99久久精品国产观看| 国产在线视视频有精品| 免费看日韩a级影片| 一区二区不卡在线视频 午夜欧美不卡在| 久久久久久久av麻豆果冻| 欧美一级黄色大片| 日韩写真欧美这视频| 91精品综合久久久久久| 欧美乱熟臀69xxxxxx| 欧美日韩一区二区三区四区| 欧美一级高清大全免费观看| 欧美日韩一二三区| 欧美日韩精品久久久| 欧美日韩综合不卡| 在线观看91精品国产麻豆| 欧美午夜免费电影| 欧美午夜宅男影院| 在线播放91灌醉迷j高跟美女 | 欧美吞精做爰啪啪高潮| 欧美视频一区二区三区四区| 欧美羞羞免费网站| 51午夜精品国产| 欧美成人猛片aaaaaaa| 久久色视频免费观看| 国产欧美久久久精品影院| 国产日产欧产精品推荐色| 亚洲欧洲精品一区二区精品久久久| 亚洲丝袜自拍清纯另类| 亚洲激情五月婷婷| 免费看日韩a级影片| 国产美女精品在线| 99视频在线精品| 欧美午夜精品一区| 精品久久久久久亚洲综合网 | 亚洲精品在线观看网站| 欧美精品一区二区久久婷婷| 中文一区在线播放| 一区二区三区精品视频在线| 丝袜亚洲另类欧美综合| 国产自产高清不卡| 色婷婷综合激情| 91精品国产综合久久久蜜臀图片| 26uuu亚洲综合色| 中文字幕一区二区三区蜜月| 五月激情六月综合| 国产精品一区二区久久不卡| 99国产精品久久久久久久久久久| 欧美日韩国产一级| 国产欧美一区二区精品婷婷| 亚洲欧美日韩国产另类专区| 美女一区二区久久| 色8久久人人97超碰香蕉987| 欧美va在线播放| 亚洲欧美视频在线观看| 韩国一区二区在线观看| 91成人免费在线视频| www国产精品av| 亚洲图片一区二区| 成人免费福利片| 日韩欧美亚洲一区二区| 一区二区三区毛片| 成人美女视频在线观看| 欧美一级夜夜爽| 亚洲自拍另类综合| 大美女一区二区三区| 91精品国产综合久久蜜臀| 国产精品国产精品国产专区不片| 麻豆成人久久精品二区三区红| 欧洲一区在线电影| 国产精品久久久99| 国产麻豆视频一区二区| 欧美一级国产精品| 午夜久久福利影院| 日本丶国产丶欧美色综合| 国产精品美女www爽爽爽| 精品一区二区三区视频在线观看 | 亚洲电影视频在线| 欧美久久一区二区| 中文在线一区二区| 国产一区二区久久| 欧美一区二区免费观在线| 亚洲精品乱码久久久久久久久 | 国产a精品视频| 精品日本一线二线三线不卡| 亚洲午夜在线视频| 色综合欧美在线| 一区二区三区在线免费播放| 9l国产精品久久久久麻豆| 国产精品亲子乱子伦xxxx裸| 国产九九视频一区二区三区| 亚洲精品一区二区三区在线观看 | 亚洲国产精品影院| 欧美性猛交一区二区三区精品| 亚洲丝袜制服诱惑| 91蝌蚪porny| 亚洲综合视频在线|