Fix index bug in ofdm.c demod
authorokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 14 Jun 2017 17:53:59 +0000 (17:53 +0000)
committerokcsampson <okcsampson@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 14 Jun 2017 17:53:59 +0000 (17:53 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3192 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/ofdm.c

index f9ae1c12f96c9d3fa222ce65613cc0e0742dd0a5..3fd6d8ab910ee5b11da72f6a485d1b36135fa95b 100644 (file)
@@ -621,9 +621,9 @@ void ofdm_demod(struct OFDM *ofdm, int *rx_bits, COMP *rxbuf_in) {
     for (rr = 0; rr < OFDM_ROWSPERFRAME; rr++) {
         for (i = 1; i < (OFDM_NC + 1); i++) {
             if (ofdm->phase_est_en == true) {
-                rx_corr = rx_sym[rr][i] * cexpf(I * aphase_est_pilot[i]);
+                rx_corr = rx_sym[rr+1][i] * cexpf(I * aphase_est_pilot[i]);
             } else {
-                rx_corr = rx_sym[rr][i];
+                rx_corr = rx_sym[rr+1][i];
             }
 
             ofdm->rx_np[(rr * OFDM_ROWSPERFRAME) + (i - 1)] = rx_corr;