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

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

?? mp3dec.c

?? 用DSP實現MP3解壓縮的源碼文件
?? C
?? 第 1 頁 / 共 4 頁
字號:
	    } else {

		/* 
		   Long block, use this formula:

		   xr[i] = sign(is[i])*|is[i]|^(4/3)*2^0.25*(global_gain - 210) *
		   2 ^ -(scalefac_multiplier * (scalefac_l[band] + preflag *
		   pretab[band]))

		   global_gain is already in *xr

		   The preflag when set applies a pre-emphasis value from
		   the pretab table. 

		   */

		/* xr[sb][ss] *= pow(2.0, -0.5 * (1.0+gr_info->scalefac_scale)
		 * ((*scalefac)[ch].l[cb]
		 + gr_info->preflag * pretab[cb]));
		 */

		t = (1 + gr->scalefac_scale) * (gr->scalefac_l[band]
						+ gr->preflag * pretab[band]);

		if(t >= 32) { /* Only 32 values in the table */
		    myxr = (mpfloat)0.0f;
		} else
		    myxr *= Granule_pow2table_m05[t];
		ISCALE(myxr);
	    }
	}

	/* apply the sign(is[i]) * |is[i]| ^ (4/3) formula */
	
	sign = (*is < 0) ? 1 : 0; 
	t = sign ? -*is : *is;       /* t = abs(is) */
	if(t >= 200)
	    t = 199;
	
	*xr = myxr * Granule_powerscaling[t];

/*	    *xr = myxr * (mpfloat)pow((float)t, (4.0f / 3.0f)); */

	ISCALE(*xr);
	/* restore the sign */

	if(sign)
	    *xr = -*xr;

	/* advance input and output */
	
	xr++;
	is++;

	/* check if we pass into the next window in short blocks */
	if(j && !--j) {
	    j = windowlength;
	    window++;
		needc = 1;
	}
    }    
}

/* apply the selected stereo processing to the 2 xr channels, producing
   a left and right output in lr.
*/

void
Granule_process_stereo(Granule *gr, Granule *grch1, 
		       Granule_floatfreqs xr[2],
		       Granule_floatfreqs lr[2], Frame *f)
{
    int sfb;
    int i, j, sb, ch;

    /* extract some stuff from the frame header */

    int stereo = f->channels;

    /* get the correct band-boundaries table */

    struct Frame_band *bands = &Frame_bands[f->sampling_frequency];

    /* decode what stereo mode we should process */

    int i_stereo = (f->mode == MODE_JOINT_STEREO) &&
	(f->mode_extension & 0x1);
    int ms_stereo = (f->mode == MODE_JOINT_STEREO) &&
	(f->mode_extension & 0x2); 

    /* ration and positions for stereo processing */
    int is_pos[576]; 
    mpfloat is_ratio[576];

    /* the following HUGE chunk of code decodes the stereo positions and
       rations in case of special stereo modes that don't transmit using
       normal left-right signals */

    /* clear the position table */
    for(i = 0; i < 576; i++)
	is_pos[i] = 7;
    
   if ((stereo == 2) && i_stereo) {

       /* Intensity stereo mode */

       if (gr->window_switching_flag && (gr->block_type == BLOCKTYPE_3WIN)) {
	   if(gr->mixed_block_flag) {
	       int max_sfb = 0;

	       /* mixed block */

	       /* in the short block part of the spectrum, find the highest
		  non-zero frequency - process each window separately */

	       for (j = 0; j < 3; j++) {
		   int sfbcnt;
		   sfbcnt = 2;

		   for(sfb = 12; sfb >= 3; sfb--) {
		       int lines;
		       
		       /* find the last frequency line with a non-zero value */
		       
		       lines = bands->s[sfb+1] - bands->s[sfb];
		       i = 3 * bands->s[sfb] + (j + 1) * lines - 1;
		       while(lines > 0) {
			   if(xr[1][i] != 0.0f ) {
			       sfbcnt = sfb;
			       sfb = -10;
			       lines = -10;
			   }
			   lines--;
			   i--;
		       }
		   }

		   sfb = sfbcnt + 1;
		   
		   if (sfb > max_sfb)
		       max_sfb = sfb;

		   while(sfb < 12) {
		       sb = bands->s[sfb+1] - bands->s[sfb];
		       i = 3 * bands->s[sfb] + j * sb;
		       for (; sb > 0; sb--) {
			   is_pos[i] = grch1->scalefac_s[sfb][j];
			   if (is_pos[i] != 7)
			       /* ## tabelize this tan */
			       is_ratio[i] = tan(is_pos[i] * (PI / 12));
			   i++;
		       }
		       sfb++;
		   }
		   sb = bands->s[11] - bands->s[10];
		   sfb = 3 * bands->s[10] + j * sb;
		   sb = bands->s[12] - bands->s[11];
		   i = 3 * bands->s[11] + j * sb;
		   for (; sb > 0; sb--) {
		       is_pos[i] = is_pos[sfb];
		       is_ratio[i] = is_ratio[sfb];
		       i++;
		   }
	       }
	       if (max_sfb <= 3) {
		   /* find the last non-zero frequency line in the lowest 
		      3 subbands */
		   i = 2 * 18 + 17;
		   sb = -1;
		   while (i >= 0) {
		       if (xr[1][i] != (mpfloat)0.0f) {
			   sb = i;
			   break;
		       }
		       i--;
		   }
		   i = 0;
		   while(bands->l[i] <= sb)
		       i++;
		   sfb = i;
		   i = bands->l[i];
		   for (; sfb < 8; sfb++) {
		       sb = bands->l[sfb + 1] - bands->l[sfb];
		       for (; sb > 0; sb--) {
			   is_pos[i] = grch1->scalefac_l[sfb];
			   if(is_pos[i] != 7)
			       /* ## tabelize this */
			       is_ratio[i] = tan(is_pos[i] * (PI / 12));
			   i++;
		       }
		   }
	       }

	   } else {

	       /* this is a pure short block */

	       for(j = 0; j < 3; j++) {
		   int sfbcnt;
		   sfbcnt = -1;
		   for(sfb = 12; sfb >= 0; sfb--) {
		       int lines;
		       lines = bands->s[sfb + 1] - bands->s[sfb];
		       i = 3 * bands->s[sfb] + (j + 1) * lines - 1;
		       while (lines > 0) {
			   if(xr[1][i] != 0.0 ) {
			       sfbcnt = sfb;
			       sfb = -10;
			       lines = -10;
			   }
			   lines--;
			   i--;
		       }
		   }
		   sfb = sfbcnt + 1;
		   while(sfb < 12) {
		       sb = bands->s[sfb + 1] - bands->s[sfb];
		       i = 3 * bands->s[sfb] + j * sb;
		       for (; sb > 0; sb--) {
			   is_pos[i] = grch1->scalefac_s[sfb][j];
			   if (is_pos[i] != 7)
			       /* ## tabelize this */
			       is_ratio[i] = tan(is_pos[i] * (PI / 12));
			   i++;
		       }
		       sfb++;
		   }
		   
		   sb = bands->s[11] - bands->s[10];
		   sfb = 3 * bands->s[10] + j * sb;
		   sb = bands->s[12] - bands->s[11];
		   i = 3 * bands->s[11] + j * sb;
		   for (; sb > 0; sb--) {
		       is_pos[i] = is_pos[sfb];
		       is_ratio[i] = is_ratio[sfb];
		       i++;
		   }
	       }
	   }
       } else {
	   /* long block */
	   /* find the highest non-zero frequency */
	   i = 31 * 18 + 17;
	   sb = 0;
	   while (i >= 0) {
	       if(xr[1][i] != 0.0) {
		   sb = i;
		   break;
	       }
	       i--;
	   }
	   i = 0;
	   while(bands->l[i] <= sb)
	       i++;
	   sfb = i;
	   i = bands->l[i];
	   for (; sfb < 21; sfb++) {
	       sb = bands->l[sfb + 1] - bands->l[sfb];
	       for (; sb > 0; sb--) {
		   is_pos[i] = grch1->scalefac_l[sfb];
		   if (is_pos[i] != 7)
		       /* ## tabelize this */
		       is_ratio[i] = tan(is_pos[i] * (PI / 12));
		   i++;
	       }
	   }
	   sfb = bands->l[20];
	   for (sb = 576 - bands->l[21]; sb > 0; sb--) {
	       is_pos[i] = is_pos[sfb];
	       is_ratio[i] = is_ratio[sfb];
	       i++;
	   }
       }
   }
   
   /* prepare for making output */

   for(ch = 0;ch < 2; ch++)
       for(i = 0; i < 576; i++)
	   lr[ch][i] = (mpfloat)0.0f;

   /* do the stereo matrixing */

   if(stereo == 2) 
       for(i = 0; i < 576; i++) {
	   if( is_pos[i] == 7 ) {
               if(ms_stereo) {
		   lr[0][i] = (xr[0][i] + xr[1][i]) / 1.41421356;
		   lr[1][i] = (xr[0][i] - xr[1][i]) / 1.41421356;
               } else {
		   /* dual-channel mode, the most common, just copy */
		   lr[0][i] = xr[0][i];
		   lr[1][i] = xr[1][i];
               }
	   } else if (i_stereo) {
               lr[0][i] = xr[0][i] * (mpfloat)(is_ratio[i] / (1.0f + is_ratio[i]));
               lr[1][i] = xr[0][i] * (mpfloat)(1.0f / (1.0f + is_ratio[i])); 
	   ISCALE(lr[0][i]);
	   ISCALE(lr[1][i]);
	   } else {
#ifndef DSP
                printf("Illegal stereo mode!\n");
#endif
	   }
       } else
	   /* single channel mode */
	   for(i = 0; i < 576; i++)
	       lr[0][i] = xr[0][i];
}

void
Granule_reorder(Granule *gr, Granule_floatfreqs xr, 
		Granule_floatfreqs xr2, Frame *f)
{
    /* get the correct band-boundaries table */
    
    struct Frame_band *bands = &Frame_bands[f->sampling_frequency];

    int sfb, bandstart, bandsize;
    int window, i, src, dst;

    /* check the block type - we only reorder short and mixed blocks */

    if(gr->window_switching_flag && gr->block_type == BLOCKTYPE_3WIN) {
	for(i = 0; i < 576; i++)
	    xr2[i] = (mpfloat)0.0f;
	if(gr->mixed_block_flag) {
	    
	    /* lowest 2 subbands are long blocks - pass through */
	    
	    for(i = 0; i < 2 * 18; i++)
		xr2[i] = xr[i];

	    /* reorder all 3-window bands */
	    
	    bandstart = bands->s[3];
	    bandsize = bands->s[4] - bandstart;
	    for(sfb = 3; sfb < 13; sfb++) {
		src = bandstart * 3;
		for(window = 0; window < 3; window++)
		    dst = bandstart * 3 + window;
		    for(i = 0; i < bandsize; i++) {
			xr2[dst] = xr[src++];
			dst += 3;
		    }
		bandstart = bands->s[sfb];
		bandsize = bands->s[sfb + 1] - bandstart;
	    }
	} else {

	    /* short block, reorder everything  */

	    bandstart = 0;
	    bandsize = bands->s[1];
	    for(sfb = 0; sfb < 13; sfb++) {
		src = bandstart * 3;
		for(window = 0; window < 3; window++) {
		    dst = bandstart * 3 + window;
		    for(i = 0; i < bandsize; i++) {
			xr2[dst] = xr[src++];
			dst += 3;
		    }
		}
		bandstart = bands->s[sfb + 1];
		bandsize = bands->s[sfb + 2] - bandstart;
	    }
	}
    } else
	/* long block, pass through */
	for(i = 0; i < 576; i++)
	    xr2[i] = xr[i];
}

/* make some alias reduction */
#ifndef DSP
void
Granule_antialias(Granule *gr, Granule_floatfreqs xr)
{
    int i, topband, subband, upper, lower;
    mpfloat u, l;

    if(gr->window_switching_flag && gr->block_type == BLOCKTYPE_3WIN)
	if(!gr->mixed_block_flag)
	    return;       /* dont antialias short blocks */
	else
	    topband = 2-1;  /* only antialias the long part of a mixed block */
    else
	topband = NUM_SUBBANDS - 1;

    /* for each subband-pair, do 8 alias-reduction butterflies */

    upper = 17;
    lower = 18;

    for(subband = 0; subband < topband; subband++) {
	for(i = 0; i < 8; i++) {
	    u = xr[upper];
	    l = xr[lower];
	    xr[upper] = u * Granule_alias_cs[i] -
		l * Granule_alias_ca[i];
	    ISCALE(xr[upper]);
	    xr[lower] = l * Granule_alias_cs[i] +
		u * Granule_alias_ca[i];
	    ISCALE(xr[lower]);
	    upper--;
	    lower++;
	}
	upper += 26;
	lower += 10;
    }
}
#endif

/* Every odd time sample of every odd subband is multiplied by -1 to 
   compensate for the frequency inversion of the polyphase synthesis
 */

void
Granule_freqinverse(Granule *gr, Granule_floatfreqs x)
{
    int sb, dct;
    x = &x[NUM_DCTBANDS];
    for(sb = 1; sb < NUM_SUBBANDS; sb += 2) {
	for(dct = 1; dct < NUM_DCTBANDS; dct += 2)
	    x[dct] = -x[dct];
	x = &x[2 * NUM_DCTBANDS];
    }
}


void
Granule_subband_synthesis(Granule *gr, int ch, Granule_floatfreqs s,
			  PCMSample *S)
{
    int i, j, t, k;
    mpfloat band[32];
    mpfloat *v, sum, *a, *b;

    if(ch)
	S = &S[1];

    /* 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[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 */
	
	S = windowing(ch, 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(Granule *gr, Granule_floatfreqs s1,
			   Granule_floatfreqs s2,
			   PCMSample *S)
{
    int i, j, t, k, isum1, isum2;
    mpfloat band[64];
    mpfloat *v, *v2, sum, sum2, *a, *b;

    /* 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 = &s1[t];
	v2 = &s2[t];
	for(i = 0; i < 32; i++) {
	    band[i] = *v;
	    band[i+32] = *v2;
	    v = &v[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          */
	
#ifdef USE_INLINE_ASM
__asm {
	push edi
	// grab the sample pointer
	mov edi, S

	xor ebx, ebx	// loop counter 
	ALIGN 4
window_loop:
	lea ecx, [Granule_sbsynth_D + ebx*4]	// ecx = &Granule_sbsynth_D[j]
	mov eax, ebx
	add eax, [Granule_sbsynth_Vptr]		// eax = j + Granule_sbsynth_Vptr[0]
	fldz	// sum1 = 0.0
	fldz	// sum2 = 0.0
	xor edx, edx	// filt_lp1 counter 

	ALIGN 4
filt_lp1:
	fld [ecx]	// get the window coefficient (D)
	fld st(0)	// duplicate it
	fmul dword ptr [Granule_sbsynth_V + eax*4]	// multiply by Granule_sbsynth_V[eax]
	faddp st(3), st
	fmul dword ptr [Granule_sbsynth_V + 4096 + eax*4]	// same for channel 2
	faddp st(1), st
	add eax, 96
	and eax, 0x3ff
	fld [128 + ecx]	// get the next D
	fld st(0)			// dup it
	fmul dword ptr [Granule_sbsynth_V + eax*4]
	faddp st(3), st
	fmul dword ptr [Granule_sbsynth_V + 4096 + eax*4]

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人精品一区二 | 成人免费在线视频观看| 亚洲精品国产精品乱码不99| 日韩av一区二| 日本精品视频一区二区| 久久久久久久久岛国免费| 五月激情综合婷婷| 99久久99久久免费精品蜜臀| 日韩一级免费观看| 夜夜嗨av一区二区三区中文字幕| 国产乱码字幕精品高清av| 91网站视频在线观看| 国产欧美日韩中文久久| 麻豆精品精品国产自在97香蕉| 欧美亚洲动漫另类| 亚洲桃色在线一区| 9人人澡人人爽人人精品| 国产区在线观看成人精品| 伦理电影国产精品| 91精品国产欧美一区二区18| 亚洲一区视频在线| 欧美午夜免费电影| 亚洲一区二区视频在线观看| 91麻豆精品国产综合久久久久久| 综合欧美亚洲日本| 99久久综合99久久综合网站| 亚洲国产电影在线观看| 懂色av一区二区三区蜜臀| 久久久久久电影| 国产乱人伦偷精品视频免下载 | 日本伊人色综合网| 欧美精品色一区二区三区| 亚洲国产日产av| 欧洲精品视频在线观看| 亚洲一区二区三区中文字幕| 欧美天天综合网| 天天综合日日夜夜精品| 欧美一区二区私人影院日本| 奇米色一区二区| 日韩精品一区在线观看| 国产剧情av麻豆香蕉精品| 日本一区免费视频| 91小视频免费观看| 午夜视黄欧洲亚洲| 欧美va亚洲va香蕉在线| 国产成人亚洲综合色影视| 1000部国产精品成人观看| 91久久精品一区二区三区| 视频一区二区三区中文字幕| 欧美一区二区啪啪| 国产剧情一区在线| 亚洲欧美日本韩国| 7777精品久久久大香线蕉| 蜜臀av国产精品久久久久| 国产欧美视频在线观看| 91久久国产综合久久| 石原莉奈在线亚洲二区| 久久精品一二三| 91精品办公室少妇高潮对白| 日本最新不卡在线| 中文字幕 久热精品 视频在线 | zzijzzij亚洲日本少妇熟睡| 一区二区三区色| 日韩欧美国产综合一区| 国产精品99久久久久久久vr| 亚洲精品成人少妇| 久久免费电影网| 色嗨嗨av一区二区三区| 久久精品二区亚洲w码| 自拍av一区二区三区| 7777女厕盗摄久久久| 成人ar影院免费观看视频| 亚洲国产日日夜夜| 国产午夜精品一区二区 | 91在线视频观看| 日本视频一区二区三区| 国产精品久久久久久亚洲伦| 欧美一区永久视频免费观看| 不卡在线视频中文字幕| 美女国产一区二区| 亚洲高清视频在线| 欧美经典一区二区三区| 欧美丰满美乳xxx高潮www| 成人激情开心网| 国精产品一区一区三区mba桃花| 亚洲综合激情网| 国产精品入口麻豆原神| 欧美刺激脚交jootjob| 在线观看日韩高清av| 高清在线不卡av| 久久99精品国产.久久久久| 亚洲综合成人在线视频| 综合色天天鬼久久鬼色| 欧美国产乱子伦| 久久中文字幕电影| 欧美肥大bbwbbw高潮| 日本道色综合久久| 91美女片黄在线观看91美女| 国内精品国产三级国产a久久| 首页国产丝袜综合| 一区二区三区日韩| 亚洲精品中文在线观看| 17c精品麻豆一区二区免费| 国产人妖乱国产精品人妖| 久久久午夜精品理论片中文字幕| 亚洲男人的天堂在线aⅴ视频| 久久久久国产精品麻豆| 2022国产精品视频| 欧美成人国产一区二区| 欧美一级一级性生活免费录像| 欧美三级电影网站| 欧美日韩在线亚洲一区蜜芽| 色综合久久久久久久| 色狠狠桃花综合| 在线亚洲人成电影网站色www| 99vv1com这只有精品| 97精品久久久午夜一区二区三区| 99re热视频精品| 99re8在线精品视频免费播放| 91免费在线看| 在线免费观看成人短视频| 欧美视频在线播放| 欧美日韩大陆一区二区| 5858s免费视频成人| 欧美一区二区三区在线观看 | 国产精品久久久久久久久免费桃花| 欧美国产精品一区二区三区| 日本一区二区三级电影在线观看| 日本一区二区三区高清不卡| 欧美—级在线免费片| 亚洲男女毛片无遮挡| 亚洲一区二区精品3399| 麻豆免费精品视频| 东方欧美亚洲色图在线| 色天天综合久久久久综合片| 欧美日韩夫妻久久| xfplay精品久久| 亚洲婷婷综合色高清在线| 一区二区三区欧美激情| 视频一区视频二区在线观看| 国产一区二区精品久久| 99精品欧美一区二区三区小说 | 国产欧美日韩三区| 亚洲女人小视频在线观看| 亚洲综合激情另类小说区| 经典三级在线一区| 91麻豆国产自产在线观看| 91精品国产综合久久久久久久久久 | 色综合一个色综合亚洲| 欧美三级韩国三级日本一级| 精品国产乱码久久久久久老虎 | 免费在线观看一区二区三区| 国产精品一区二区免费不卡| 91丨porny丨最新| 日韩一区二区三区高清免费看看| 久久久久久综合| 亚洲成人在线免费| 国产成人在线色| 欧美日韩高清影院| 老汉av免费一区二区三区 | 国产精品一区免费视频| 日本道色综合久久| 久久奇米777| 亚洲国产精品久久久久秋霞影院 | 在线亚洲精品福利网址导航| 欧美不卡视频一区| 亚洲自拍与偷拍| 成人午夜免费电影| 91精品在线麻豆| 亚洲国产成人精品视频| 国产91色综合久久免费分享| 在线91免费看| 亚洲天堂中文字幕| 国产乱国产乱300精品| 日韩一区二区三区在线观看| 亚洲精品国产无套在线观| 国产成人免费视频| 欧美精品一区视频| 日本人妖一区二区| 欧美在线观看禁18| 亚洲女同ⅹxx女同tv| 成人av网站大全| 国产色91在线| 国产精品主播直播| 久久亚洲精精品中文字幕早川悠里| 亚洲国产精品自拍| 91丨九色丨国产丨porny| 国产精品久久毛片av大全日韩| 国产一区二区成人久久免费影院| 欧美剧在线免费观看网站 | 国产成人高清在线| 久久久久久久久久久久久久久99 | 91在线无精精品入口| 国产视频一区在线播放| 激情小说欧美图片| 欧美xxxx在线观看| 久久99久久久欧美国产| 精品黑人一区二区三区久久| 国内精品不卡在线| 国产欧美在线观看一区|