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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? fastsb.c

?? armmp3 armmp3,基于arm7的mp3嵌入式開(kāi)發(fā)程序
?? C
字號(hào):
/***********************************************
copyright by Haia Tech
www.haia2004.com
************************************************/



/* Fast Inverse DCT implemented using Lee's algorithm */
/*
  The DCT matrix for N values is defined as:

  D(i,j) = cos((2*j+1)*i*PI/(2*N))

  Lee's fast-DCT algorithm, as used here, needs an 8-value DCT
  and an 16-value DCT matrix.
*/
#include "dewindow.h" 
#include "common.h"
#include <math.h> 

void matrix_mul16(double in1[16][16], double in2[16][16],double out[16][16]);
void fast_idct(double *in, double *out);
void fast_idct_init();


static int Granule_sbsynth_Vptr[2]={64,64};
typedef double BB[2][1024];
static BB Granule_sbsynth_V;

static double A16[16][16], A8[8][8];       /* DCT matrix         */
static double G16[16][16], G8[8][8];       /* Output butterfly   */
static double H16[16][16], H8[8][8];       /* Scaling            */

static double B16[16][16], B8[8][8];       /* B = G * DCT * H    */


void matrix_mul16(double in1[16][16],
		  double in2[16][16],
		  double out[16][16]);

void matrix_mul8(double in1[8][8],
		 double in2[8][8],
		 double out[8][8]);

void Granule_subband_synthesis(int ch, SS s, short SAM[2][SSLIMIT][SBLIMIT])
{
    int i, j, t, k;
	long is;
    double band[32];
    double *v, sum, *d;
	short *S=&SAM[0][0][0];

    /* We have 18 time-vectors of 32 subband magnitudes each. For every
       vector of 32 magnitudes, the subband synthesis generates 32
       PCM samples, so the result of 18 of these is 18*32=576 samples.
     */

    /* go through each time window */
	
    for(t = 0; t < 18; t++)
	{
	/* extract the subband strengths */
  	    v = &s[0][t];
		for(i = 0; i < 32; i++)
		{
	      band[i] = *v;
	      v = &v[18];
		}
	/* advance the buffer position */
	   Granule_sbsynth_Vptr[ch] = (Granule_sbsynth_Vptr[ch] - 64) & 0x3ff;
	   v = &Granule_sbsynth_V[ch][Granule_sbsynth_Vptr[ch]];

	   fast_idct(band, v);

	/* 32*16=512 mac's */
    /*      15          */
    /* Sj =SIGM W(j+32i) */
    /*     i=0          */

	  v = &Granule_sbsynth_V[ch][0];
      for (j = 0; j < 32; j++) 
	  {
        d = &D_coex[j];
	    k = j + Granule_sbsynth_Vptr[ch];
	    sum = 0.0f;
	    for(i = 0; i < 8; i++) 
		{
	      sum += d[0] * v[k];
	      k = (k + 96) & 0x3ff;
	      sum += d[32] * v[k];
	      k = (k + 32) & 0x3ff; 
	      d = &d[64];
		}
	
	  /* convert to integer, and clip the output */
 	    is = (long)(sum*32768);
	
	    if(is >= 32768) 
	      is = 32767;
	    else if(is < -32768)
	      is = -32768;
	    *S = (short)is;
	    S++;
	  }
    }
}

/* 18 * (4096+1024) = 92160 MAC's per call, with 2 calls per frame and
   38 frames per second this is 7 million MAC's per second.

   18 * (384 * 2 + 1024) = 32256 MAC's per call using Lee's fast DCT! That
   is just 2.4 million MAC's per second!

	We need a buffer of 1024 floats per channel.

   */

void Granule_subband_synthesis2(SS s1,SS s2,short  SAM[2][SSLIMIT][SBLIMIT])
{
    int i, j, t, k;
    double band[64];
    double *v1, *v2, sum, sum2, *d;
	double *v;
	long is;
	short *S=&SAM[0][0][0];

    /* We have 18 time-vectors of 32 subband magnitudes each. For every
       vector of 32 magnitudes, the subband synthesis generates 32
       PCM samples, so the result of 18 of these is 18*32=576 samples.
     */

    /* go through each time window */

    for(t = 0; t < 18; t++) 
	{

	/* extract the subband strengths */

	   v1 = &s1[0][t];
	   v2 = &s2[0][t];
	   for(i = 0; i < 32; i++)
	   {
	     band[i] = *v1;
	     band[i+32] = *v2;
	     v1 = &v1[18];
	     v2 = &v2[18];
	   }

	/* advance the buffer position */

 	  Granule_sbsynth_Vptr[0] = (Granule_sbsynth_Vptr[0] - 64) & 0x3ff;
	  v = &(Granule_sbsynth_V[0][Granule_sbsynth_Vptr[0]]);
	
	/* calculate 64 values for each channel and insert them into the 1024 wide buffer */

	  fast_idct(band, v);
//	  fast_idct(&band[32], &v[1024]);
         
	/* 32*16*2=1024 mac's */
	
	/* windowing - calculate 32 samples. each sample is the sum of 16 terms */
	
	/*     15          */
	/* Sj = E W(j+32i) */
	/*    i=0          */
	
	  v = &Granule_sbsynth_V[0][0];
	  for (j = 0; j < 32; j++)
	  { 
	    d = &D_coex[j];
	    k = j + Granule_sbsynth_Vptr[0];
	    
	    sum = (double)0.0f;
	    sum2 = (double)0.0f;
	    for(i = 0; i < 8; i++) 
		{
		   sum += d[0] * v[k];
		   sum2 += d[0] * v[k+1024];
		   k = (k + 96) & 0x3ff;

		   sum += d[32] * v[k];
		   sum2 += d[32] * v[k+1024];
		   k = (k + 32) & 0x3ff; 
		   d = &d[64];
	    }
	    /* convert to integer, and clip the output */
//      if(j%2)
	  {
		is=(long) (sum*32768);
// OVERFLOW_CHECKING
	    if(is >= 32768) 
		  *S = 32767;	
		else if(is < -32768) 
		  *S = -32768;
		else 
  		  *S = (short)is;

		S++;
	    
		is=(long) (sum*32768);
	    if(is >= 32768) 
		  *(S) = 32767;
		else if(is < -32768) 
		  *(S) = -32768;
		else 
		  *(S) = (short)is;

	    S++;

	  }
	  }
    }
}


void fast_idct_init()
{
    int i,j;
    double t16[16][16], t8[8][8];


    /* create the 16 matrixes */

    for(i = 0; i < 16; i++) {
	  for(j = 0; j < 16; j++) 
	  {
	    A16[i][j] = cos((2*j+1)*i*PI/32);
	    if(i == j || j == (i + 1))
		  G16[i][j] = 1.0f;
	    else
		  G16[i][j] = 0.0f;
	    if(i == j)
		  H16[i][j] = 1.0f/(2*cos((2*i+1)*PI/64));
	    else
		  H16[i][j] = 0.0;
	  }
    }

    /* create the 8 matrixes */

    for(i = 0; i < 8; i++) {
	  for(j = 0; j < 8; j++) 
	  {
	    A8[i][j] = cos((2*j+1)*i*PI/16);
	    if(i == j || j == (i + 1))
		  G8[i][j] = 1.0f;
	    else
		  G8[i][j] = 0.0f;
	    if(i == j)
		  H8[i][j] = 1.0f/(2*cos((2*i+1)*PI/32));
	    else
		  H8[i][j] = 0.0f;
	  }
    }

    /* generate the B matrixes */

    matrix_mul16(A16, H16, t16);
    matrix_mul16(G16, t16, B16);

    matrix_mul8(A8, H8, t8);
    matrix_mul8(G8, t8, B8);
}

/* This is a two-level implementation of Lee's fast-DCT algorithm */
/* 
   The 32 input values are split in two 16-value vectors using an
   even butterfly and an odd butterfly. The odd values are taken
   through Lee's odd path using a 16x16 DCT matrix (A16) and appropriate
   scaling (G16*A16*H16). The even values are further split into
   two 8-value vectors using even and odd butterflies into ee and eo.
   The ee values are fed through an 8x8 DCT matrix (A8) while the eo
   values are fed through the odd path using G8*A8*H8.

   This two-level configuration uses 384 muls and 432 adds, compared
   to the direct 32x32 DCT which uses 1024 muls and 992 adds.
*/

void fast_idct(double *in, double *out)
{
    double even[16], odd[16], ee[8], eo[8];
    double s1, s2;
    double t[32];
    int i, j;
	static int init=1;

    if(init)
	{
		fast_idct_init();
		init=0;
	}
	/* input butterflies - level 1 */
    /* 32 adds */

    for(i = 0; i < 16; i++) {
	   even[i] = in[i] + in[31-i];
	   odd[i] = in[i] - in[31-i];
    }

    /* input butterflies - level 2 */
    /* 16 adds */

    for(i = 0; i < 8; i++) {
	   ee[i] = even[i] + even[15-i];
	   eo[i] = even[i] - even[15-i];
    }

    /* multiply the even_even vector (ee) with the ee matrix (A8) */
    /* multiply the even_odd vector (eo) with the eo matrix (B8) */
    /* 128 muls, 128 adds */

    for(i = 0; i < 8; i++) {
	  s1 = 0.0;
	  s2 = 0.0;
	  for(j = 0; j < 8; j += 2) 
	  {
	    s1 += A8[i][j] * ee[j] +
		A8[i][j+1] * ee[j+1];
	    s2 += B8[i][j] * eo[j] +
		B8[i][j+1] * eo[j+1];
	  }
	  t[i*4] = s1;
	  t[i*4+2] = s2;
    }


    /* multiply the odd vector (odd) with the odd matrix (B16) */
    /* 256 muls, 256 adds */

    for(i = 0; i < 16; i++) 
	{
	  s1 = 0.0;
	  for(j = 0; j < 16; j += 4) 
	  {
	    s1 += B16[i][j] * odd[j] +
		B16[i][j+1] * odd[j+1] +
		B16[i][j+2] * odd[j+2] +
		B16[i][j+3] * odd[j+3];
	  }
	  t[i*2+1] = s1;
    }

    /* the output vector t now is expanded to 64 values using the
       symmetric property of the cosinus function */

    for(i = 0; i < 16; i++) 
	{
	  out[i] = t[i+16];
	  out[i+17] = -t[31-i];
	  out[i+32] = -t[16-i];
	  out[i+48] = -t[i];
    }
    out[16] = 0.0;
}

void matrix_mul16(double in1[16][16],
		  double in2[16][16],
		  double out[16][16])
{
    int i,j,z;

    for(i = 0; i < 16; i++) {
	  for(j = 0; j < 16; j++)
	  {
	    out[i][j] = 0.0;
	    for(z = 0; z < 16; z++)
		  out[i][j] += in1[i][z] * in2[z][j];
	  }
    } 
}

void matrix_mul8(double in1[8][8],
		 double in2[8][8],
		 double out[8][8])
{
    int i,j,z;

    for(i = 0; i < 8; i++) {
	  for(j = 0; j < 8; j++)  
	  {
	    out[i][j] = 0.0;
	    for(z = 0; z < 8; z++)
	 	  out[i][j] += in1[i][z] * in2[z][j];
	  }
    }
}


?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人免费在线观看| 色94色欧美sute亚洲13| 精品剧情在线观看| 欧美一区二区在线视频| 678五月天丁香亚洲综合网| 欧美日韩国产在线观看| 欧美精品tushy高清| 在线电影院国产精品| 69堂国产成人免费视频| 日韩午夜精品电影| 精品福利视频一区二区三区| 久久这里只有精品视频网| 久久久精品综合| 国产精品乱人伦| 亚洲精品国产无天堂网2021 | 亚洲精选在线视频| 一区二区三区四区av| 天天综合网天天综合色| 开心九九激情九九欧美日韩精美视频电影| 日本伊人午夜精品| 国产精品一区二区在线看| 成人爽a毛片一区二区免费| 99久久国产综合精品麻豆| 欧美性做爰猛烈叫床潮| 91精品国产综合久久精品图片| 国产高清在线精品| 欧美最猛性xxxxx直播| 精品视频一区三区九区| 欧美大片在线观看| 中文字幕免费不卡| 亚洲高清免费在线| 国产一区高清在线| 99视频精品在线| 51午夜精品国产| 国产欧美日韩在线| 亚洲一区二三区| 韩国欧美一区二区| 91蝌蚪porny九色| 日韩午夜在线观看视频| 国产午夜精品一区二区三区四区| 亚洲免费av网站| 免费看日韩精品| 91原创在线视频| 日韩亚洲欧美综合| 亚洲视频一二三| 麻豆一区二区在线| 91啪九色porn原创视频在线观看| 欧美一卡2卡三卡4卡5免费| 国产精品妹子av| 日韩高清电影一区| 成人激情小说乱人伦| 51精品秘密在线观看| 国产精品毛片久久久久久久| 日韩中文字幕91| 成人精品免费看| 欧美一级xxx| 亚洲精品少妇30p| 国产九九视频一区二区三区| 欧美亚洲一区二区在线观看| 国产亚洲短视频| 日韩1区2区日韩1区2区| 91在线视频在线| 精品88久久久久88久久久| 亚洲综合在线观看视频| 国产成人综合亚洲91猫咪| 欧美午夜视频网站| 国产精品电影一区二区| 九九精品一区二区| 欧美日韩你懂得| 亚洲女爱视频在线| 国产精品99久久久久久似苏梦涵| 6080国产精品一区二区| 亚洲精选视频免费看| 丁香婷婷综合网| 26uuu精品一区二区| 日韩高清在线电影| 欧美日韩综合一区| 亚洲欧美日韩一区| 风间由美性色一区二区三区| 精品国产乱码91久久久久久网站| 亚洲成va人在线观看| 91在线丨porny丨国产| 国产精品人人做人人爽人人添| 极品销魂美女一区二区三区| 欧美精品一卡两卡| 亚洲成人tv网| 欧美成人精精品一区二区频| 日本欧美一区二区在线观看| 在线免费观看日本欧美| 亚洲色图19p| 99re这里只有精品视频首页| 国产色婷婷亚洲99精品小说| 国产精品自拍av| 久久久久久久久97黄色工厂| 国产一区视频导航| 精品成人一区二区| 激情小说欧美图片| 精品国产凹凸成av人导航| 另类综合日韩欧美亚洲| 日韩欧美在线影院| 免费在线观看一区| 日韩欧美中文字幕制服| 看电视剧不卡顿的网站| 日韩精品自拍偷拍| 国产精品一区二区久久精品爱涩| 久久免费视频色| 成人三级伦理片| 亚洲欧美激情在线| 欧洲一区在线电影| 五月婷婷激情综合| 日韩一级二级三级精品视频| 亚洲午夜电影在线观看| 高清不卡一区二区| 国产精品毛片a∨一区二区三区| 国产宾馆实践打屁股91| 国产精品久久看| 日本韩国欧美国产| 亚洲国产精品天堂| 日韩一区二区影院| 国产制服丝袜一区| 国产精品国产三级国产aⅴ原创| 97精品视频在线观看自产线路二| 亚洲精品成a人| 欧美日韩高清一区二区三区| 麻豆国产精品视频| 久久精品日产第一区二区三区高清版| 国产成人啪午夜精品网站男同| 亚洲色大成网站www久久九九| 欧美性猛片aaaaaaa做受| 日韩av一区二| 亚洲国产激情av| 欧美性做爰猛烈叫床潮| 精品制服美女丁香| 国产精品久久久久久久岛一牛影视| 在线视频欧美区| 久久精品999| 国产精品精品国产色婷婷| 欧美性受xxxx黑人xyx性爽| 日产精品久久久久久久性色| 久久九九影视网| 色爱区综合激月婷婷| 久久99精品一区二区三区三区| 国产精品乱码一区二区三区软件| 欧美探花视频资源| 国产精品资源网| 亚洲综合激情小说| 久久久www免费人成精品| 色综合一个色综合亚洲| 麻豆传媒一区二区三区| 亚洲电影一级黄| 日韩视频一区在线观看| 成人中文字幕电影| 日本女人一区二区三区| 国产女人aaa级久久久级| 欧美性欧美巨大黑白大战| 国产成人在线色| 日日夜夜精品免费视频| 国产精品国产三级国产| 欧美电影免费观看高清完整版| 色综合久久久久网| 久久99精品久久久久久国产越南| 一区二区日韩av| 中文av一区二区| 欧美成人一区二区三区片免费| 色天使色偷偷av一区二区| 国产一区二区免费在线| 午夜激情久久久| 亚洲色图在线视频| 国产偷国产偷亚洲高清人白洁| 91.xcao| 91麻豆国产自产在线观看| 国产精品香蕉一区二区三区| 日韩国产欧美在线观看| 亚洲精品第一国产综合野| 欧美不卡一区二区| 欧美在线观看视频一区二区| 不卡免费追剧大全电视剧网站| 久久精品国产99国产精品| 亚洲国产精品嫩草影院| 最新日韩av在线| 国产亚洲一本大道中文在线| 91精品国产综合久久久久久漫画| 色又黄又爽网站www久久| 国产成人免费xxxxxxxx| 久草中文综合在线| 日韩精品一区第一页| 亚洲综合色婷婷| 亚洲精品成人a在线观看| 国产精品久线观看视频| 国产日韩欧美一区二区三区综合 | 亚洲欧美国产三级| 国产精品天美传媒| 久久久美女毛片| 久久久久久久久久电影| 欧美va亚洲va| 精品欧美乱码久久久久久| 欧美一区二区三区视频| 在线电影院国产精品| 欧美酷刑日本凌虐凌虐| 欧美日韩一区二区欧美激情|