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

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

?? fastsb.c

?? 基于samsung s3c44b0x 的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一区二区三区免费野_久草精品视频
日本aⅴ精品一区二区三区| 91麻豆自制传媒国产之光| 亚洲欧美国产高清| 久久久久久久综合日本| 91精品国产免费| 日韩午夜三级在线| 精品理论电影在线观看| 日韩午夜在线观看视频| 日韩欧美在线综合网| 精品国产凹凸成av人导航| 精品少妇一区二区三区免费观看 | 精品视频999| 99久久精品久久久久久清纯| av成人老司机| 在线精品视频小说1| 欧美日韩国产精品自在自线| 91精品国产综合久久香蕉的特点| 91精品国产综合久久婷婷香蕉 | 精品99一区二区三区| 欧美成人福利视频| 久久久无码精品亚洲日韩按摩| 国产亚洲综合性久久久影院| 中文字幕第一页久久| 亚洲老妇xxxxxx| 日本在线观看不卡视频| 激情深爱一区二区| 91麻豆免费看片| 91精品国产综合久久精品图片 | 成人黄色综合网站| 在线欧美日韩精品| 日韩一级精品视频在线观看| 久久久99精品免费观看不卡| 一区二区理论电影在线观看| 欧美bbbbb| caoporm超碰国产精品| 欧美视频日韩视频在线观看| www精品美女久久久tv| 亚洲视频一区二区免费在线观看| 亚洲成人av中文| 国产麻豆精品久久一二三| 91在线码无精品| 精品国产伦理网| 亚洲国产综合在线| 国产精品乡下勾搭老头1| 色妹子一区二区| 欧美精品一区男女天堂| 亚洲gay无套男同| 成人网页在线观看| 日韩欧美中文字幕精品| 亚洲黄色性网站| 国v精品久久久网| 日韩欧美的一区| 亚洲电影中文字幕在线观看| 国产成人精品免费网站| 欧美二区在线观看| 亚洲色图视频免费播放| 国产成人精品三级| 久久精品国产亚洲a| 激情偷乱视频一区二区三区| 成人av动漫在线| 久久精品在线免费观看| 中文字幕一区二区三区在线播放| 精品久久久影院| 国产原创一区二区| 亚洲人成电影网站色mp4| 91国偷自产一区二区三区成为亚洲经典| 亚洲自拍偷拍av| 精品国产不卡一区二区三区| proumb性欧美在线观看| 午夜精品成人在线视频| 精品国产麻豆免费人成网站| 91啪亚洲精品| 激情图片小说一区| 亚洲在线中文字幕| 国产亚洲综合在线| 欧美挠脚心视频网站| 白白色 亚洲乱淫| 久久9热精品视频| 亚洲精品日韩专区silk| 日韩欧美国产午夜精品| 在线免费不卡视频| 国产成人免费av在线| 五月天亚洲精品| 国产精品久久久久一区二区三区| 欧美男生操女生| 色婷婷综合视频在线观看| 国产一区二区在线影院| 日韩高清中文字幕一区| 亚洲理论在线观看| 国产精品乱码久久久久久| 日韩一区二区不卡| 欧美日韩国产在线播放网站| 91欧美激情一区二区三区成人| 激情亚洲综合在线| 午夜日韩在线电影| 亚洲视频 欧洲视频| 中文字幕va一区二区三区| 精品久久人人做人人爰| 在线电影欧美成精品| 在线观看网站黄不卡| 成人av网址在线| 岛国一区二区三区| 国产成人日日夜夜| 精品一区二区三区久久久| 亚洲另类在线视频| 国产精品视频观看| 精品成人一区二区三区四区| 91精品国产综合久久香蕉的特点| 欧美喷潮久久久xxxxx| 欧美三级电影网站| 欧美日韩精品一区二区三区蜜桃| 欧美日韩三级一区二区| 欧美色爱综合网| 欧美精品18+| 欧美一区二区女人| 日韩欧美高清在线| 久久久亚洲精华液精华液精华液| 精品国产百合女同互慰| 久久精品水蜜桃av综合天堂| 久久久99久久| 国产精品乱码久久久久久 | av在线不卡网| 99re在线精品| 欧美性xxxxx极品少妇| 欧美无砖专区一中文字| 欧美日韩在线观看一区二区| 精品视频色一区| 欧美刺激午夜性久久久久久久 | 国内外成人在线| 国产mv日韩mv欧美| 色综合av在线| 91精品国产一区二区三区| 日韩精品一区二区三区在线观看| 欧美成人猛片aaaaaaa| 国产欧美日韩在线| 亚洲人成伊人成综合网小说| 亚洲成人高清在线| 精品一区二区三区免费| www.av亚洲| 5566中文字幕一区二区电影| 久久蜜桃av一区二区天堂| 国产农村妇女毛片精品久久麻豆| 亚洲人一二三区| 日韩av电影天堂| 成人精品视频网站| 欧美久久久久久久久久| 久久久国际精品| 亚洲国产欧美日韩另类综合 | 日精品一区二区三区| 久草热8精品视频在线观看| 99久久婷婷国产综合精品电影 | 欧美肥妇bbw| 国产日韩在线不卡| 午夜激情一区二区| 国产精品99久久久| 欧美日韩高清在线| 国产亚洲精品精华液| 亚洲网友自拍偷拍| 岛国一区二区在线观看| 777亚洲妇女| 亚洲免费三区一区二区| 国产在线播放一区三区四| 在线视频欧美区| 国产精品人成在线观看免费| 日本免费新一区视频| av中文字幕在线不卡| 精品久久久久久最新网址| 亚洲一区二区综合| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美日韩在线免费视频| 国产午夜亚洲精品羞羞网站| 午夜电影网亚洲视频| www.色综合.com| 久久精品人人做人人爽97| 午夜不卡av在线| 日本韩国一区二区三区视频| 久久综合色鬼综合色| 日韩电影免费在线看| 色婷婷av一区二区三区之一色屋| 中文字幕欧美三区| 国产一区在线视频| 日韩美女视频一区二区在线观看| 亚洲欧美aⅴ...| 99精品桃花视频在线观看| 国产亚洲综合av| 国产在线精品一区在线观看麻豆| 欧美裸体bbwbbwbbw| 亚洲国产乱码最新视频| 欧美在线视频你懂得| 亚洲久本草在线中文字幕| 国产 日韩 欧美大片| 久久久www免费人成精品| 久久se精品一区精品二区| 欧美精品视频www在线观看| 亚洲超碰97人人做人人爱| 一道本成人在线| 亚洲一区中文在线| 欧美亚洲丝袜传媒另类| 亚洲国产精品一区二区久久| 在线看不卡av|