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

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

?? fastsb.c

?? 44b0上實現mp3解碼
?? 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一区二区三区免费野_久草精品视频
亚洲欧洲www| 极品少妇xxxx精品少妇偷拍| 日韩精品免费专区| 国产精品一区二区免费不卡| 91亚洲精品久久久蜜桃| 日韩精品影音先锋| 五月婷婷久久丁香| 不卡av免费在线观看| 欧美成人三级电影在线| 亚洲综合色噜噜狠狠| 成人av网址在线观看| 日韩欧美一级在线播放| 亚洲精品视频一区| 丁香网亚洲国际| 欧美成人video| 亚洲成人精品一区| 一本色道久久加勒比精品| 国产亚洲精品aa午夜观看| 男女性色大片免费观看一区二区| 欧美天堂亚洲电影院在线播放| 欧美激情一区二区在线| 黄网站免费久久| 日韩三级免费观看| 三级在线观看一区二区| 欧美日韩国产欧美日美国产精品| 亚洲人成影院在线观看| 99精品国产99久久久久久白柏| 精品国产乱码久久久久久蜜臀| 日韩精品一二三区| 91福利在线免费观看| 亚洲视频资源在线| www.激情成人| 亚洲欧洲无码一区二区三区| 成人一区二区在线观看| 欧美激情综合五月色丁香小说| 国产精品一级片在线观看| 2021久久国产精品不只是精品| 精品一区二区三区在线视频| 欧美一区二区三区免费大片 | 青青草国产精品亚洲专区无| 欧美日韩在线播放三区四区| 亚洲国产精品久久人人爱蜜臀 | 国产精品美女久久久久aⅴ国产馆| 九色综合狠狠综合久久| www精品美女久久久tv| 国产麻豆精品在线| 中文av一区特黄| 色香色香欲天天天影视综合网| 一区二区三区中文免费| 欧美日韩中文字幕一区| 免费在线观看视频一区| 久久久亚洲精品一区二区三区| 粉嫩av一区二区三区粉嫩| 17c精品麻豆一区二区免费| 在线观看一区日韩| 美女视频免费一区| 国产欧美视频一区二区三区| 成人av资源在线观看| 一区二区三区在线视频免费| 欧美一区二区三区啪啪| 懂色av一区二区三区免费看| 亚洲人xxxx| 欧美一二三四在线| 成人免费电影视频| 日韩电影一二三区| 久久久不卡网国产精品二区| 91论坛在线播放| 免费高清视频精品| 中文字幕人成不卡一区| 91精品午夜视频| 成人综合婷婷国产精品久久免费| 中文字幕一区不卡| 4438x成人网最大色成网站| 国产91精品在线观看| 亚洲va国产va欧美va观看| 久久久蜜桃精品| 欧美三级日韩在线| 成人网在线播放| 日本不卡中文字幕| 亚洲欧洲性图库| 欧美成人a∨高清免费观看| 91免费小视频| 国产麻豆一精品一av一免费| 亚洲夂夂婷婷色拍ww47| 亚洲国产经典视频| 欧美一区二区网站| av亚洲精华国产精华| 久国产精品韩国三级视频| 亚洲免费观看高清完整版在线观看熊| 日韩一级完整毛片| 欧美性色黄大片| 成人18精品视频| 九九视频精品免费| 五月激情六月综合| 一区二区欧美在线观看| 国产色综合一区| 欧美v日韩v国产v| 欧美美女一区二区三区| 一本大道久久a久久精二百| 国产乱码精品一区二区三| 日本欧美一区二区| 亚洲超碰精品一区二区| 最新日韩av在线| 国产欧美一区二区精品性色超碰 | 美女精品自拍一二三四| 天天综合网 天天综合色| 亚洲色图欧洲色图婷婷| 国产精品国产三级国产aⅴ入口| 精品欧美乱码久久久久久1区2区| 8x8x8国产精品| 欧美精品123区| 欧美日韩国产一区| 欧美日韩一级黄| 欧美日韩黄视频| 91精品国产乱码| 51精品视频一区二区三区| 91精品国模一区二区三区| 欧美肥大bbwbbw高潮| 7777精品伊人久久久大香线蕉的 | 视频一区二区不卡| 日韩精品1区2区3区| 日韩激情一二三区| 日本女人一区二区三区| 蜜桃视频免费观看一区| 麻豆91精品视频| 国产一区免费电影| 国产a精品视频| 国产成人午夜99999| 成人国产精品免费观看视频| 成人精品电影在线观看| 一本高清dvd不卡在线观看| 91欧美一区二区| 777精品伊人久久久久大香线蕉| 欧美xxx久久| 欧美国产视频在线| 亚洲图片欧美综合| 久久99久久99小草精品免视看| 国产精品亚洲一区二区三区妖精| 成人在线视频首页| 欧美午夜精品一区二区三区| 日韩视频一区二区| 国产欧美日韩精品a在线观看| 亚洲美女淫视频| 青青草精品视频| 国产99久久久国产精品潘金| 欧美在线视频你懂得| 日韩欧美国产午夜精品| 国产精品美女久久久久av爽李琼| 亚洲成在人线免费| 国产在线精品一区二区| 91色婷婷久久久久合中文| 日韩一区二区电影| 亚洲色欲色欲www| 麻豆高清免费国产一区| 色婷婷av一区二区三区软件 | 欧美日韩视频在线第一区| 精品少妇一区二区三区在线视频| 日本一区二区不卡视频| 午夜精品福利一区二区三区蜜桃| 国产激情视频一区二区在线观看 | 成人综合激情网| 555www色欧美视频| 国产精品电影一区二区| 麻豆91小视频| 欧洲视频一区二区| 欧美国产日韩a欧美在线观看 | 日韩理论片在线| 精品一区二区三区蜜桃| 欧美专区日韩专区| 久久久www成人免费毛片麻豆| 无码av免费一区二区三区试看| 波多野结衣中文一区| 欧美va亚洲va| 日本中文在线一区| 色噜噜狠狠成人中文综合 | 国产精品主播直播| 91精品欧美综合在线观看最新| 最新欧美精品一区二区三区| 欧美福利视频一区| 欧美日韩一区高清| **欧美大码日韩| 成人avav在线| 国产亚洲欧美日韩俺去了| 久久爱另类一区二区小说| 欧美日韩日本视频| 亚洲在线视频网站| 欧洲精品一区二区| 亚洲美腿欧美偷拍| 99在线精品观看| 国产精品美女久久久久久久网站| 韩国成人在线视频| 精品国产精品网麻豆系列| 免费成人在线播放| 日韩一区二区麻豆国产| 天天色天天操综合| 5月丁香婷婷综合| 日韩—二三区免费观看av| 欧美卡1卡2卡| 日本成人中文字幕| 26uuu欧美|