//Extracting Channel Estimates for Distributed Alamouti Receiver Combining
// //Extracting Channel Estimates for Distributed Alamouti Receiver Combining
temp_in_ifft_ptr=&temp_in_ifft_1[0];
// temp_in_ifft_ptr = &temp_in_ifft_1[0];
i=symbol_offset;
// i = symbol_offset;
for(j=0;j<(frame_parms->N_RB_UL*12);j++){
// for(j=0; j<(frame_parms->N_RB_UL*12); j++) {
temp_in_ifft_ptr[j]=ul_ch_estimates[aa][i];
// temp_in_ifft_ptr[j] = ul_ch_estimates[aa][i];
i++;
// i++;
}
// }
switch(frame_parms->N_RB_DL){
// switch (frame_parms->N_RB_DL) {
case6:
// case 6:
idft128((int16_t*)&temp_in_ifft_0[0],// Performing IFFT on Combined Channel Estimates
// idft128((int16_t*) &temp_in_ifft_0[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_0,
// temp_out_ifft_0,
1);
// 1);
idft128((int16_t*)&temp_in_ifft_1[0],// Performing IFFT on Combined Channel Estimates
// idft128((int16_t*) &temp_in_ifft_1[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_1,
// temp_out_ifft_1,
1);
// 1);
break;
// break;
case25:
// case 25:
idft512((int16_t*)&temp_in_ifft_0[0],// Performing IFFT on Combined Channel Estimates
// idft512((int16_t*) &temp_in_ifft_0[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_0,
// temp_out_ifft_0,
1);
// 1);
idft512((int16_t*)&temp_in_ifft_1[0],// Performing IFFT on Combined Channel Estimates
// idft512((int16_t*) &temp_in_ifft_1[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_1,
// temp_out_ifft_1,
1);
// 1);
break;
// break;
case50:
// case 50:
idft1024((int16_t*)&temp_in_ifft_0[0],// Performing IFFT on Combined Channel Estimates
// idft1024((int16_t*) &temp_in_ifft_0[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_0,
// temp_out_ifft_0,
1);
// 1);
idft1024((int16_t*)&temp_in_ifft_1[0],// Performing IFFT on Combined Channel Estimates
// idft1024((int16_t*) &temp_in_ifft_1[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_1,
// temp_out_ifft_1,
1);
// 1);
break;
// break;
case100:
// case 100:
idft2048((int16_t*)&temp_in_ifft_0[0],// Performing IFFT on Combined Channel Estimates
// idft2048((int16_t*) &temp_in_ifft_0[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_0,
// temp_out_ifft_0,
1);
// 1);
idft2048((int16_t*)&temp_in_ifft_1[0],// Performing IFFT on Combined Channel Estimates
// idft2048((int16_t*) &temp_in_ifft_1[0], // Performing IFFT on Combined Channel Estimates
temp_out_ifft_1,
// temp_out_ifft_1,
1);
// 1);
break;
// break;
}
// }
// because the ifft is not power preserving, we should apply the factor sqrt(power_correction) here, but we rather apply power_correction here and nothing after the next fft
// // because the ifft is not power preserving, we should apply the factor sqrt(power_correction) here, but we rather apply power_correction here and nothing after the next fft