void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias) { int i, k; sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; const sample_t * window = a52_imdct_window; complex_t buf[128]; for (i = 0; i < 128; i++) { k = fftorder[i]; t_r = pre1[i].real; t_i = pre1[i].imag; buf[i].real = t_i * data[255-k] + t_r * data[k]; buf[i].imag = t_r * data[255-k] - t_i * data[k]; } ifft128 (buf); /* Post IFFT complex multiply plus IFFT complex conjugate*/ /* Window and convert to real valued signal */ for (i = 0; i < 64; i++) { /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */ t_r = post1[i].real; t_i = post1[i].imag; a_r = t_r * buf[i].real + t_i * buf[i].imag; a_i = t_i * buf[i].real - t_r * buf[i].imag; b_r = t_i * buf[127-i].real + t_r * buf[127-i].imag; b_i = t_r * buf[127-i].real - t_i * buf[127-i].imag; w_1 = window[2*i]; w_2 = window[255-2*i]; data[2*i] = delay[2*i] * w_2 - a_r * w_1 + bias; data[255-2*i] = delay[2*i] * w_1 + a_r * w_2 + bias; delay[2*i] = a_i; w_1 = window[2*i+1]; w_2 = window[254-2*i]; data[2*i+1] = delay[2*i+1] * w_2 + b_r * w_1 + bias; data[254-2*i] = delay[2*i+1] * w_1 - b_r * w_2 + bias; delay[2*i+1] = b_i; } }
void a52_imdct_512 (sample_t * data, sample_t * delay, sample_t bias) { int i, k; sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; const sample_t * window = a52_imdct_window; complex_t buf[128]; for (i = 0; i < 128; i++) { k = fftorder[i]; t_r = pre1[i].real; t_i = pre1[i].imag; BUTTERFLY_0 (buf[i].real, buf[i].imag, t_r, t_i, data[k], data[255-k]); } ifft128 (buf); /* Post IFFT complex multiply plus IFFT complex conjugate*/ /* Window and convert to real valued signal */ for (i = 0; i < 64; i++) { /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */ t_r = post1[i].real; t_i = post1[i].imag; BUTTERFLY_0 (a_r, a_i, t_i, t_r, buf[i].imag, buf[i].real); BUTTERFLY_0 (b_r, b_i, t_r, t_i, buf[127-i].imag, buf[127-i].real); w_1 = window[2*i]; w_2 = window[255-2*i]; BUTTERFLY_B (data[255-2*i], data[2*i], w_2, w_1, a_r, delay[2*i]); delay[2*i] = a_i; w_1 = window[2*i+1]; w_2 = window[254-2*i]; BUTTERFLY_B (data[2*i+1], data[254-2*i], w_1, w_2, b_r, delay[2*i+1]); delay[2*i+1] = b_i; } }