📄 newmdct.c
字号:
{ 1.316524975873958e-01, /* win[SHORT_TYPE] */ 4.142135623730950e-01, 7.673269879789602e-01, 1.091308501069271e+00, /* tantab_l */ 1.303225372841206e+00, 1.569685577117490e+00, 1.920982126971166e+00, 2.414213562373094e+00, 3.171594802363212e+00, 4.510708503662055e+00, 7.595754112725146e+00, 2.290376554843115e+01, 0.98480775301220802032, /* cx */ 0.64278760968653936292, 0.34202014332566882393, 0.93969262078590842791, -0.17364817766693030343, -0.76604444311897790243, 0.86602540378443870761, 0.500000000000000e+00, -5.144957554275265e-01, /* ca */ -4.717319685649723e-01, -3.133774542039019e-01, -1.819131996109812e-01, -9.457419252642064e-02, -4.096558288530405e-02, -1.419856857247115e-02, -3.699974673760037e-03, 8.574929257125442e-01, /* cs */ 8.817419973177052e-01, 9.496286491027329e-01, 9.833145924917901e-01, 9.955178160675857e-01, 9.991605581781475e-01, 9.998991952444470e-01, 9.999931550702802e-01, }, { 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 0.000000000000000e+00, 2.283748241799531e-13, 4.037858874020686e-13, 2.146547464825323e-13, 5.461314069809755e-12, 4.921085770524055e-12, 4.343405037091838e-12, 3.732668368707687e-12, 3.093523840190885e-12, 2.430835727329466e-12, 1.734679010007751e-12, 9.748253656609281e-13, 2.797435120168326e-13, -5.456116108943413e-12, -4.878985199565852e-12, -4.240448995017367e-12, -3.559909094758253e-12, -2.858043359288075e-12, -2.156177623817898e-12, -1.475637723558782e-12, -8.371015190102975e-13, -2.599706096327376e-13, -2.382191739347913e-13, -6.423305872147834e-13, -9.400849094049688e-13, -1.122435026096556e-12, -1.183840321267481e-12, -1.122435026096556e-12, -9.400849094049688e-13, -6.423305872147841e-13, -2.382191739347918e-13, }};#define tantab_l (win[SHORT_TYPE]+3)#define cx (win[SHORT_TYPE]+12)#define ca (win[SHORT_TYPE]+20)#define cs (win[SHORT_TYPE]+28)/************************************************************************** window_subband()** PURPOSE: Overlapping window on PCM samples** SEMANTICS:* 32 16-bit pcm samples are scaled to fractional 2's complement and* concatenated to the end of the window buffer #x#. The updated window* buffer #x# is then windowed by the analysis window #c# to produce the* windowed sample #z#*************************************************************************//* * new IDCT routine written by Takehiro TOMINAGA */static const int order[] = { 0, 1,16,17, 8, 9,24,25, 4, 5,20,21,12,13,28,29, 2, 3,18,19,10,11,26,27, 6, 7,22,23,14,15,30,31};/* returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32 */inline static voidwindow_subband(const sample_t *x1, FLOAT a[SBLIMIT]){ int i; FLOAT const *wp = enwindow+10; const sample_t *x2 = &x1[238-14-286]; for (i = -15; i < 0; i++) { FLOAT w, s, t; w = wp[-10]; s = x2[-224] * w; t = x1[ 224] * w; w = wp[-9]; s += x2[-160] * w; t += x1[ 160] * w; w = wp[-8]; s += x2[- 96] * w; t += x1[ 96] * w; w = wp[-7]; s += x2[- 32] * w; t += x1[ 32] * w; w = wp[-6]; s += x2[ 32] * w; t += x1[- 32] * w; w = wp[-5]; s += x2[ 96] * w; t += x1[- 96] * w; w = wp[-4]; s += x2[ 160] * w; t += x1[-160] * w; w = wp[-3]; s += x2[ 224] * w; t += x1[-224] * w; w = wp[-2]; s += x1[-256] * w; t -= x2[ 256] * w; w = wp[-1]; s += x1[-192] * w; t -= x2[ 192] * w; w = wp[ 0]; s += x1[-128] * w; t -= x2[ 128] * w; w = wp[ 1]; s += x1[- 64] * w; t -= x2[ 64] * w; w = wp[ 2]; s += x1[ 0] * w; t -= x2[ 0] * w; w = wp[ 3]; s += x1[ 64] * w; t -= x2[- 64] * w; w = wp[ 4]; s += x1[ 128] * w; t -= x2[-128] * w; w = wp[ 5]; s += x1[ 192] * w; t -= x2[-192] * w; /* * this multiplyer could be removed, but it needs more 256 FLOAT data. * thinking about the data cache performance, I think we should not * use such a huge table. tt 2000/Oct/25 */ s *= wp[6]; w = t - s; a[30+i*2] = t + s; a[31+i*2] = wp[7] * w; wp += 18; x1--; x2++; } { FLOAT s,t,u,v; t = x1[- 16] * wp[-10]; s = x1[ -32] * wp[-2]; t += (x1[- 48] - x1[ 16]) * wp[-9]; s += x1[ -96] * wp[-1]; t += (x1[- 80] + x1[ 48]) * wp[-8]; s += x1[-160] * wp[ 0]; t += (x1[-112] - x1[ 80]) * wp[-7]; s += x1[-224] * wp[ 1]; t += (x1[-144] + x1[112]) * wp[-6]; s -= x1[ 32] * wp[ 2]; t += (x1[-176] - x1[144]) * wp[-5]; s -= x1[ 96] * wp[ 3]; t += (x1[-208] + x1[176]) * wp[-4]; s -= x1[ 160] * wp[ 4]; t += (x1[-240] - x1[208]) * wp[-3]; s -= x1[ 224]; u = s - t; v = s + t; t = a[14]; s = a[15] - t; a[31] = v + t; /* A0 */ a[30] = u + s; /* A1 */ a[15] = u - s; /* A2 */ a[14] = v - t; /* A3 */ }{ FLOAT xr; xr = a[28] - a[ 0]; a[ 0] += a[28]; a[28] = xr * wp[-2*18+7]; xr = a[29] - a[ 1]; a[ 1] += a[29]; a[29] = xr * wp[-2*18+7]; xr = a[26] - a[ 2]; a[ 2] += a[26]; a[26] = xr * wp[-4*18+7]; xr = a[27] - a[ 3]; a[ 3] += a[27]; a[27] = xr * wp[-4*18+7]; xr = a[24] - a[ 4]; a[ 4] += a[24]; a[24] = xr * wp[-6*18+7]; xr = a[25] - a[ 5]; a[ 5] += a[25]; a[25] = xr * wp[-6*18+7]; xr = a[22] - a[ 6]; a[ 6] += a[22]; a[22] = xr * SQRT2; xr = a[23] - a[ 7]; a[ 7] += a[23]; a[23] = xr * SQRT2 - a[ 7]; a[ 7] -= a[ 6]; a[22] -= a[ 7]; a[23] -= a[22]; xr = a[ 6]; a[ 6] = a[31] - xr; a[31] = a[31] + xr; xr = a[ 7]; a[ 7] = a[30] - xr; a[30] = a[30] + xr; xr = a[22]; a[22] = a[15] - xr; a[15] = a[15] + xr; xr = a[23]; a[23] = a[14] - xr; a[14] = a[14] + xr; xr = a[20] - a[ 8]; a[ 8] += a[20]; a[20] = xr * wp[-10*18+7]; xr = a[21] - a[ 9]; a[ 9] += a[21]; a[21] = xr * wp[-10*18+7]; xr = a[18] - a[10]; a[10] += a[18]; a[18] = xr * wp[-12*18+7]; xr = a[19] - a[11]; a[11] += a[19]; a[19] = xr * wp[-12*18+7]; xr = a[16] - a[12]; a[12] += a[16]; a[16] = xr * wp[-14*18+7]; xr = a[17] - a[13]; a[13] += a[17]; a[17] = xr * wp[-14*18+7]; xr = -a[20] + a[24]; a[20] += a[24]; a[24] = xr * wp[-12*18+7]; xr = -a[21] + a[25]; a[21] += a[25]; a[25] = xr * wp[-12*18+7]; xr = a[ 4] - a[ 8]; a[ 4] += a[ 8]; a[ 8] = xr * wp[-12*18+7]; xr = a[ 5] - a[ 9]; a[ 5] += a[ 9]; a[ 9] = xr * wp[-12*18+7]; xr = a[ 0] - a[12]; a[ 0] += a[12]; a[12] = xr * wp[-4*18+7]; xr = a[ 1] - a[13]; a[ 1] += a[13]; a[13] = xr * wp[-4*18+7]; xr = a[16] - a[28]; a[16] += a[28]; a[28] = xr * wp[-4*18+7]; xr = -a[17] + a[29]; a[17] += a[29]; a[29] = xr * wp[-4*18+7]; xr = SQRT2 * (a[ 2] - a[10]); a[ 2] += a[10]; a[10] = xr; xr = SQRT2 * (a[ 3] - a[11]); a[ 3] += a[11]; a[11] = xr; xr = SQRT2 * (-a[18] + a[26]); a[18] += a[26]; a[26] = xr - a[18]; xr = SQRT2 * (-a[19] + a[27]); a[19] += a[27]; a[27] = xr - a[19]; xr = a[ 2]; a[19] -= a[ 3]; a[ 3] -= xr; a[ 2] = a[31] - xr; a[31] += xr; xr = a[ 3]; a[11] -= a[19]; a[18] -= xr; a[ 3] = a[30] - xr; a[30] += xr; xr = a[18]; a[27] -= a[11]; a[19] -= xr; a[18] = a[15] - xr; a[15] += xr; xr = a[19]; a[10] -= xr; a[19] = a[14] - xr; a[14] += xr; xr = a[10]; a[11] -= xr; a[10] = a[23] - xr; a[23] += xr; xr = a[11]; a[26] -= xr; a[11] = a[22] - xr; a[22] += xr; xr = a[26]; a[27] -= xr; a[26] = a[ 7] - xr; a[ 7] += xr; xr = a[27]; a[27] = a[ 6] - xr; a[ 6] += xr; xr = SQRT2 * (a[ 0] - a[ 4]); a[ 0] += a[ 4]; a[ 4] = xr; xr = SQRT2 * (a[ 1] - a[ 5]); a[ 1] += a[ 5]; a[ 5] = xr; xr = SQRT2 * (a[16] - a[20]); a[16] += a[20]; a[20] = xr; xr = SQRT2 * (a[17] - a[21]); a[17] += a[21]; a[21] = xr; xr = -SQRT2 * (a[ 8] - a[12]); a[ 8] += a[12]; a[12] = xr - a[ 8]; xr = -SQRT2 * (a[ 9] - a[13]); a[ 9] += a[13]; a[13] = xr - a[ 9]; xr = -SQRT2 * (a[25] - a[29]); a[25] += a[29]; a[29] = xr - a[25]; xr = -SQRT2 * (a[24] + a[28]); a[24] -= a[28]; a[28] = xr - a[24]; xr = a[24] - a[16]; a[24] = xr; xr = a[20] - xr; a[20] = xr; xr = a[28] - xr; a[28] = xr; xr = a[25] - a[17]; a[25] = xr; xr = a[21] - xr; a[21] = xr; xr = a[29] - xr; a[29] = xr; xr = a[17] - a[ 1]; a[17] = xr; xr = a[ 9] - xr; a[ 9] = xr; xr = a[25] - xr; a[25] = xr; xr = a[ 5] - xr; a[ 5] = xr; xr = a[21] - xr; a[21] = xr; xr = a[13] - xr; a[13] = xr;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -