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

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

?? fastsb.c

?? mp3 播放器 ADS環境下使用,請認真閱讀您的文件
?? C
字號:
/***********************************************
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];
	  }
    }
}


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级电影网站| 91在线国产观看| 国产高清精品在线| 99久久伊人精品| 欧美日韩国产另类一区| 久久综合九色欧美综合狠狠| 中文字幕一区在线观看视频| 亚洲成人777| 韩国女主播成人在线| 91在线无精精品入口| 日韩你懂的在线播放| 国产精品的网站| 免费观看30秒视频久久| 成人白浆超碰人人人人| 欧美日韩成人综合在线一区二区| xvideos.蜜桃一区二区| 一区二区三区国产豹纹内裤在线| 久久成人综合网| 91蜜桃婷婷狠狠久久综合9色| 91麻豆精品国产91久久久久久| 国产精品久久毛片av大全日韩| 日韩精品成人一区二区在线| 成人黄色小视频| 欧美一区二区视频在线观看2020| 日本一区二区综合亚洲| 日韩电影在线一区二区三区| 99re热这里只有精品视频| 日韩一区二区在线观看视频| 亚洲精品视频在线观看网站| 国产麻豆91精品| 欧美日本一区二区| 中文天堂在线一区| 美女诱惑一区二区| 欧美性生交片4| 国产精品久久久久久久久免费樱桃 | 亚洲va韩国va欧美va精品| 国产福利精品一区二区| 91精品国产一区二区三区蜜臀| 亚洲欧洲成人av每日更新| 久久精品999| 欧美日韩中文字幕一区二区| 国产精品午夜免费| 精彩视频一区二区三区| 欧洲一区二区三区免费视频| 国产精品免费aⅴ片在线观看| 久久精品国产99国产精品| 色999日韩国产欧美一区二区| 国产婷婷一区二区| 国模娜娜一区二区三区| 日韩一区二区三区av| 亚洲综合一二区| 97se亚洲国产综合自在线| 久久久久亚洲综合| 久久国产综合精品| 日韩欧美中文一区| 日韩精品一二区| 欧美日韩黄色一区二区| 亚洲综合图片区| 一本大道久久a久久综合| 中文字幕色av一区二区三区| 成人手机电影网| 国产欧美在线观看一区| 久久99在线观看| 日韩欧美一区中文| 免费高清在线一区| 日韩一级完整毛片| 麻豆精品一区二区综合av| 欧美一区二区网站| 美女性感视频久久| 日韩欧美中文字幕制服| 麻豆成人免费电影| 日韩视频一区在线观看| 蜜臀久久99精品久久久久久9| 欧美一区二区三区视频免费 | 欧美一三区三区四区免费在线看| 亚洲国产精品久久艾草纯爱| 欧美视频一区在线观看| 午夜精品aaa| 欧美一区二区播放| 精品一区二区免费在线观看| 精品国产91乱码一区二区三区 | 欧美国产日产图区| 波多野结衣中文字幕一区| 亚洲国产成人私人影院tom| 成人激情免费视频| 亚洲黄一区二区三区| 欧美偷拍一区二区| 日韩精品一区第一页| 日韩一级成人av| 国产成人免费在线视频| 国产农村妇女毛片精品久久麻豆 | 国产精品久久久久久久久免费丝袜| 成人app在线观看| 一区二区三区在线看| 欧美揉bbbbb揉bbbbb| 免费观看一级欧美片| 国产午夜精品久久久久久免费视 | 中文一区一区三区高中清不卡| av电影天堂一区二区在线观看| 亚洲人成网站在线| 欧美日韩在线一区二区| 奇米色一区二区三区四区| 久久精品在线免费观看| 91老师片黄在线观看| 午夜精品福利久久久| 精品国产乱码久久久久久免费| 国产91精品一区二区麻豆网站| 亚洲日本电影在线| 91精品在线免费观看| 高清国产一区二区| 亚洲一区二区三区免费视频| 欧美电视剧免费观看| 99久久精品国产一区二区三区 | 欧美一级精品大片| 国产91高潮流白浆在线麻豆| 亚洲一区二区三区四区的 | 国产精品影视网| 一区二区三区四区在线免费观看| 日韩一区二区三区电影| 99麻豆久久久国产精品免费优播| 午夜亚洲福利老司机| 久久亚洲二区三区| 色婷婷国产精品综合在线观看| 秋霞电影网一区二区| 中文字幕一区二区在线观看| 91精品国产综合久久精品| 福利一区福利二区| 日韩高清不卡一区二区| 日韩美女视频19| 精品国产91洋老外米糕| 欧美性色欧美a在线播放| 久久狠狠亚洲综合| 亚洲午夜精品网| 中文字幕免费观看一区| 欧美一区二区精品久久911| 91麻豆精品视频| 国产一区二区美女| 婷婷中文字幕一区三区| 国产精品―色哟哟| 精品久久国产老人久久综合| 欧美丝袜丝交足nylons图片| 成人性生交大片免费看视频在线 | 欧美大胆人体bbbb| 在线亚洲一区二区| 丁香啪啪综合成人亚洲小说| 秋霞午夜鲁丝一区二区老狼| 亚洲欧美日韩中文字幕一区二区三区 | 亚洲免费观看高清| 国产欧美综合在线观看第十页| 在线综合视频播放| 色偷偷成人一区二区三区91| 国产成人丝袜美腿| 狠狠色丁香久久婷婷综合_中| 亚洲国产精品欧美一二99| 日韩理论电影院| 国产欧美精品区一区二区三区| 7777精品伊人久久久大香线蕉的| 91黄视频在线观看| 99久久99久久精品免费观看| 国产成人啪午夜精品网站男同| 国内久久精品视频| 久久不见久久见免费视频7| 天堂在线一区二区| 亚洲欧美日韩在线不卡| 亚洲国产精品黑人久久久| xnxx国产精品| 亚洲精品在线观| 日韩精品中午字幕| 欧美一区二区三区爱爱| 欧美美女黄视频| 欧美日韩国产美女| 欧美日韩国产免费| 欧美剧在线免费观看网站| 欧美日韩三级一区| 欧美另类久久久品| 欧美日韩不卡一区| 欧美精品九九99久久| 欧美日韩国产综合一区二区 | 日韩不卡一区二区| 五月婷婷综合网| 日本一不卡视频| 欧美综合色免费| 欧美日韩一区二区欧美激情| 欧美日韩精品欧美日韩精品| 欧美日韩免费视频| 欧美日韩国产高清一区| 欧美疯狂做受xxxx富婆| 欧美一级淫片007| 欧美成人aa大片| 久久久久久久久蜜桃| 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲激情图片qvod| 亚洲国产视频在线| 性欧美疯狂xxxxbbbb| 免费在线视频一区| 狠狠色伊人亚洲综合成人| 国产中文字幕一区| 成人午夜av影视| 91麻豆免费看片| 欧美疯狂性受xxxxx喷水图片|