fixed a bug in Alamouti coding (introduced in 7bc37c5696)
This commit is contained in:
@@ -361,8 +361,6 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
else if (mimo_mode == ALAMOUTI) {
|
||||
*re_allocated = *re_allocated + 1;
|
||||
// normalization for 2 tx antennas
|
||||
amp = (int16_t)(((int32_t)tmp_amp*ONE_OVER_SQRT2_Q15)>>15);
|
||||
|
||||
switch (mod_order0) {
|
||||
case 2: //QPSK
|
||||
@@ -419,8 +417,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
||||
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]+=qam_table_s0[qam16_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]+=qam_table_s0[qam16_table_offset_im];
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
|
||||
// Antenna 1 position n Real part -> -x1*
|
||||
|
||||
@@ -450,8 +448,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
|
||||
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
|
||||
((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam16_table_offset_re];
|
||||
((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam16_table_offset_im];
|
||||
((int16_t *)&txdataF[1][tti_offset])[0]+=-(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
((int16_t *)&txdataF[1][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
|
||||
|
||||
break;
|
||||
@@ -494,8 +492,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
||||
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]+=qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]+=qam_table_s0[qam64_table_offset_im];
|
||||
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam64_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam64_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
|
||||
|
||||
// Antenna 1 => -x1*
|
||||
@@ -534,8 +532,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
|
||||
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
|
||||
((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam64_table_offset_re];
|
||||
((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam64_table_offset_im];
|
||||
((int16_t *)&txdataF[1][tti_offset])[0]+=-(qam_table_s0[qam64_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
((int16_t *)&txdataF[1][tti_offset])[1]+=(qam_table_s0[qam64_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
|
||||
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user